aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2016-08-01 22:19:23 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2016-08-01 22:19:23 +0000
commit2611037c1cb42b4d05ff34235100f5d882171797 (patch)
treeca8e3982f17ec45237e4098db37eebb44f396917 /sys/dev
parent1ada904147c50b3aad694c25fd46409324e79f36 (diff)
downloadsrc-2611037c1cb42b4d05ff34235100f5d882171797.tar.gz
src-2611037c1cb42b4d05ff34235100f5d882171797.zip
Disable PCI hotplug support for slots with power controllers.
After further review of the spec, I do not think the current HotPlug code handles slots with power controllers correctly. In particular, the power state of the slot is to be inferred from other events, not from examining the state of the power control bit in SLOT_CTL. For now, disable PCI hotplug support on such slots. PR: 211081 Tested by: Jeffrey E Pieper <jeffrey.e.pieper@intel.com> MFC after: 3 days
Notes
Notes: svn path=/head/; revision=303645
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/pci_pci.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c
index 5f8638116bef..13d1b726a32f 100644
--- a/sys/dev/pci/pci_pci.c
+++ b/sys/dev/pci/pci_pci.c
@@ -932,6 +932,13 @@ pcib_probe_hotplug(struct pcib_softc *sc)
sc->pcie_link_cap = pcie_read_config(dev, PCIER_LINK_CAP, 4);
sc->pcie_slot_cap = pcie_read_config(dev, PCIER_SLOT_CAP, 4);
+ /*
+ * XXX: Handling of slots with a power controller needs to be
+ * reexamined. Ignore hotplug on such slots for now.
+ */
+ if (sc->pcie_slot_cap & PCIEM_SLOT_CAP_PCP)
+ return;
+
if (sc->pcie_slot_cap & PCIEM_SLOT_CAP_HPC)
sc->flags |= PCIB_HOTPLUG;
}