svn commit: r303497 - head/sys/dev/pci
John Baldwin
jhb at FreeBSD.org
Fri Jul 29 17:54:22 UTC 2016
Author: jhb
Date: Fri Jul 29 17:54:21 2016
New Revision: 303497
URL: https://svnweb.freebsd.org/changeset/base/303497
Log:
Add a loader tunable (hw.pci.enable_pcie_hp) to disable PCI-e HotPlug.
Some systems and/or devices (such as riser cards) do not include a
non-compliant implementation of PCI-e HotPlug that can result in devices
not being attached (e.g. the HotPlug code might assume that a card is
being unplugged and will power the slot off and detach it). This
tunable can be set to 0 to disable support for PCI-e HotPlug ignoring
the incorrect HotPlug state on these slots.
PR: 211081
Reported by: Sergey Renkas <serg_ic at mail.ru> (SuperMicro X7 riser card)
Reported by: Jeffrey E Pieper <jeffrey.e.pieper at intel.com>
(Intel X520 adapter)
MFC after: 1 week
Relnotes: yes
Modified:
head/sys/dev/pci/pci_pci.c
Modified: head/sys/dev/pci/pci_pci.c
==============================================================================
--- head/sys/dev/pci/pci_pci.c Fri Jul 29 17:28:14 2016 (r303496)
+++ head/sys/dev/pci/pci_pci.c Fri Jul 29 17:54:21 2016 (r303497)
@@ -907,11 +907,19 @@ pcib_set_mem_decode(struct pcib_softc *s
/*
* PCI-express HotPlug support.
*/
+static int pci_enable_pcie_hp = 1;
+SYSCTL_INT(_hw_pci, OID_AUTO, enable_pcie_hp, CTLFLAG_RDTUN,
+ &pci_enable_pcie_hp, 0,
+ "Enable support for native PCI-express HotPlug.");
+
static void
pcib_probe_hotplug(struct pcib_softc *sc)
{
device_t dev;
+ if (!pci_enable_pcie_hp)
+ return;
+
dev = sc->dev;
if (pci_find_cap(dev, PCIY_EXPRESS, NULL) != 0)
return;
More information about the svn-src-all
mailing list