Page MenuHomeFreeBSD

D49585.id152887.diff
No OneTemporary

D49585.id152887.diff

diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c
--- a/sys/dev/pci/pci_pci.c
+++ b/sys/dev/pci/pci_pci.c
@@ -799,6 +799,10 @@
SYSCTL_INT(_hw_pci, OID_AUTO, enable_pcie_hp, CTLFLAG_RDTUN,
&pci_enable_pcie_hp, 0,
"Enable support for native PCI-express HotPlug.");
+static sbintime_t pcie_hp_detach_timeout = 5 * SBT_1S;
+SYSCTL_SBINTIME_MSEC(_hw_pci, OID_AUTO, pcie_hp_detach_timeout, CTLFLAG_RWTUN,
+ &pcie_hp_detach_timeout,
+ "Attention Button delay for PCI-express Eject.");
static void
pcib_probe_hotplug(struct pcib_softc *sc)
@@ -1068,11 +1072,17 @@
&sc->pcie_ab_task, NULL);
} else if (old_slot_sta & PCIEM_SLOT_STA_PDS) {
/* Only initiate detach sequence if device present. */
- device_printf(dev,
- "Attention Button Pressed: Detaching in 5 seconds\n");
- sc->flags |= PCIB_DETACH_PENDING;
- taskqueue_enqueue_timeout(taskqueue_bus,
- &sc->pcie_ab_task, 5 * hz);
+ if (pcie_hp_detach_timeout) {
+ device_printf(dev,
+ "Attention Button Pressed: Detaching in %ld ms\n",
+ (long)(pcie_hp_detach_timeout / SBT_1MS));
+ sc->flags |= PCIB_DETACH_PENDING;
+ taskqueue_enqueue_timeout_sbt(taskqueue_bus,
+ &sc->pcie_ab_task, pcie_hp_detach_timeout,
+ SBT_1S, 0);
+ } else {
+ sc->flags |= PCIB_DETACHING;
+ }
}
}
if (sc->pcie_slot_sta & PCIEM_SLOT_STA_PFD)

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 30, 4:12 AM (11 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32445088
Default Alt Text
D49585.id152887.diff (1 KB)

Event Timeline