From nobody Tue Sep 28 16:45:20 2021 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8327317E5EC7 for ; Tue, 28 Sep 2021 16:45:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HJljr3DDJz3wRG for ; Tue, 28 Sep 2021 16:45:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4CC6527BEF for ; Tue, 28 Sep 2021 16:45:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 18SGjKBU034133 for ; Tue, 28 Sep 2021 16:45:20 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 18SGjK2s034132 for bugs@FreeBSD.org; Tue, 28 Sep 2021 16:45:20 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 256264] Devices behind PEX 8664 PCIe Switch not detected since 11.0-RELEASE Date: Tue, 28 Sep 2021 16:45:20 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.0-RELEASE X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: jhb@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D256264 John Baldwin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jhb@FreeBSD.org, | |vangyzen@FreeBSD.org --- Comment #4 from John Baldwin --- I think the switch is claiming to support hot plug but then claiming that no child devices are present. In particular: SltCap: AttnBtn+ PwrCtrl+ MRL+ AttnInd+ PwrInd+ HotPlug+ Surprise- Slot #240, PowerLimit 25.000W; Interlock- NoCompl- SltCtl: Enable: AttnBtn+ PwrFlt+ MRL+ PresDet+ CmdCplt+ HPI= rq+ LinkChg+ Control: AttnInd Off, PwrInd Off, Power+ Interlock- SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock- Changed: MRL- PresDet- LinkState- Notice HotPlug+ in SltCap, but PresDet- (presence detect) in SltSta. Proba= bly these slots aren't really hot plug and your motherboard failed to write up = the pins correctly for this switch to wire PD as always set. You can try setti= ng 'hw.pci.enable_pcie_hp=3D0' in loader.conf or at the loader prompt as a workaround to test that theory. We already have one quirk to ignore the MRL if the DataLink Layer is active= .=20 We could similarly perhaps ignore HotPlug if the DataLink Layer is active b= it PD is clear. If the tunable works, then this patch might work as a quirk: diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index 2b86f2f50e11..5674bcd69fa7 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -967,21 +967,22 @@ pcib_probe_hotplug(struct pcib_softc *sc) return; /* - * Some devices report that they have an MRL when they actually - * do not. Since they always report that the MRL is open, child - * devices would be ignored. Try to detect these devices and - * ignore their claim of HotPlug support. - * - * If there is an open MRL but the Data Link Layer is active, - * the MRL is not real. + * Some bridges use HotPlug-capable chips but are not really + * HotPlug bridges. The bridges can advertise inconsistent + * statuses such as cards not being present or an MRL that is + * always open, but the Data Link Layer is active. Ignore + * HotPlug on such bridges. */ - if ((sc->pcie_slot_cap & PCIEM_SLOT_CAP_MRLSP) !=3D 0) { - link_sta =3D pcie_read_config(dev, PCIER_LINK_STA, 2); + link_sta =3D pcie_read_config(dev, PCIER_LINK_STA, 2); + if ((link_sta & PCIEM_LINK_STA_DL_ACTIVE) !=3D 0) { slot_sta =3D pcie_read_config(dev, PCIER_SLOT_STA, 2); - if ((slot_sta & PCIEM_SLOT_STA_MRLSS) !=3D 0 && - (link_sta & PCIEM_LINK_STA_DL_ACTIVE) !=3D 0) { + + if ((slot_sta & PCIEM_SLOT_STA_PDS) =3D=3D 0) + return; + + if ((sc->pcie_slot_cap & PCIEM_SLOT_CAP_MRLSP) !=3D 0 && + (slot_sta & PCIEM_SLOT_STA_MRLSS) !=3D 0) return; - } } /* --=20 You are receiving this mail because: You are the assignee for the bug.=