Date: Tue, 29 Apr 2025 20:33:09 GMT From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 37032a39c5e9 - stable/13 - pcib: Ignore power fault detected if a power controller is not present Message-ID: <202504292033.53TKX9Ks056194@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=37032a39c5e9fcac3100bb7cfce3f2f3d701b5bd commit 37032a39c5e9fcac3100bb7cfce3f2f3d701b5bd Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2025-04-22 02:08:01 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2025-04-29 14:46:30 +0000 pcib: Ignore power fault detected if a power controller is not present At least some PCI-express bridges exposed by Intel Volume Management Devices report bogus power faults in their slot status register. As a workaround, ignore the power fault detected flag if the slot capability register does not indicate support for a power controller. While the PCI-e spec does not explicitly state that the PFD flag should always be zero if a power controller is not present, parts of the spec do seem to assume this. For example, the flag is included in the "Power Controller Registers" register group in 6.7.2.4, and the definition of the value for this flag seems to presume the presence of a power controller: If a Power Controller that supports power fault detection is implemented, this bit is Set when the Power Controller detects a power fault at this slot. Note that, depending on hardware capability, it is possible that a power fault can be detected at any time, independent of the Power Controller Control setting or the occupancy of the slot. If power fault detection is not supported, this bit must not be Set. PR: 285993 Reported by: Jim Long <freebsd-bugzilla@umpquanet.com> Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D49949 (cherry picked from commit 4c8b9f40cda7dd6b2de547b288d712c85998ce11) --- sys/dev/pci/pci_pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index 9e90cccdf083..86b57f28fd81 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -1072,7 +1072,8 @@ pcib_hotplug_inserted(struct pcib_softc *sc) return (false); /* A power fault implicitly turns off power to the slot. */ - if (sc->pcie_slot_sta & PCIEM_SLOT_STA_PFD) + if (sc->pcie_slot_cap & PCIEM_SLOT_CAP_PCP && + sc->pcie_slot_sta & PCIEM_SLOT_STA_PFD) return (false); /* If the MRL is disengaged, the slot is powered off. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202504292033.53TKX9Ks056194>