Date: Tue, 29 Apr 2025 18:30:53 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: 4373c15f1fa2 - stable/14 - pcib: Ignore power fault detected if a power controller is not present Message-ID: <202504291830.53TIUrGk023050@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4373c15f1fa2afe9e7a24f3d1be9a3582874f48d commit 4373c15f1fa2afe9e7a24f3d1be9a3582874f48d 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:26 +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 eedfc671f577..74b830be8a0a 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -1081,7 +1081,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?202504291830.53TIUrGk023050>