Page MenuHomeFreeBSD

pci: Make PCIe Eject timeout configurable
ClosedPublic

Authored by cperciva on Mon, Mar 31, 4:13 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 24, 4:02 PM
Unknown Object (File)
Thu, Apr 17, 1:30 AM
Unknown Object (File)
Mon, Apr 14, 11:56 PM
Unknown Object (File)
Thu, Apr 10, 7:32 AM
Unknown Object (File)
Sun, Apr 6, 8:52 AM
Unknown Object (File)
Sun, Apr 6, 8:51 AM
Unknown Object (File)
Fri, Apr 4, 8:43 AM
Unknown Object (File)
Fri, Apr 4, 6:28 AM
Subscribers

Details

Summary

PCIe mandates a 5 second delay between when the "Attention Button" is
pressed and when the associated device is detached; this is to allow
for the button to be pressed a second time to cancel the ejection. On
some systems this 5 second delay may not be desireable; so introduce a
hw.pci.pcie_hp_detach_timeout sysctl (which can also be set as a loader
tunable) which specifies the timeout in milliseconds (default 5000).
If set to zero, the device is detached immediately.

MFC after: 2 weeks
Sponsored by: Amazon

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Requires https://reviews.freebsd.org/D49584 to work properly (otherwise setting the sysctl(8) gets confused).

jhb added inline comments.
sys/dev/pci/pci_pci.c
798

Humm, if I had been more forward-thinking there should be a hw.pci.pcie_hp node and this should be an enable node under that.

802
1076–1086
This revision is now accepted and ready to land.Wed, Apr 2, 4:56 PM

Thanks, committed with the two minor changes you suggested.

This revision was automatically updated to reflect the committed changes.