opnsense-src/sys/dev/pci
Colin Percival e0235fd34a Only respond to the PCIe Attention Button if a device is already plugged in.
Prior to this commit, if PCIEM_SLOT_STA_ABP and PCIEM_SLOT_STA_PDC are
asserted simultaneously, FreeBSD sets a 5 second "hardware going away" timer
and then processes the "presence detect" change. In the (physically
challenging) case that someone presses the "attention button" and inserts
a new PCIe device at exactly the same moment, this results in FreeBSD
recognizing that the device is present, attaching it, and then detaching it
5 seconds later.

On EC2 "bare metal" hardware this is the precise sequence of events which
takes place when a new EBS volume is attached; virtual machines have no
difficulty effecting physically implausible simultaneity.

This patch changes the handling of PCIEM_SLOT_STA_ABP to only detach a
device if the presence of a device was detected *before* the interrupt
which reports the Attention Button push.

Reported by:	Matt Wilson
Reviewed by:	jhb
MFC after:	1 week
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D20499
2019-06-05 04:58:42 +00:00
..
fixup_pci.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
hostb_pci.c Add PCI methods to iterate over the PCI capabilities 2018-02-19 18:41:56 +00:00
ignore_pci.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
isa_pci.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
pci.c Extract eventfilter declarations to sys/_eventfilter.h 2019-05-20 00:38:23 +00:00
pci_host_generic.c pci: ecam: Correctly parse memory and IO region 2019-05-17 17:05:16 +00:00
pci_host_generic.h pci_host_generic*: basic implementation of bus range 2018-11-19 02:55:18 +00:00
pci_host_generic_acpi.c pci: ecam: Correctly parse memory and IO region 2019-05-17 17:05:16 +00:00
pci_host_generic_fdt.c Pass pci_base address instead of physical address to rman_manage_region(). 2019-05-29 15:53:33 +00:00
pci_host_generic_fdt.h To allow for an ACPI attachment to the generic PCIe driver split off the 2016-11-21 18:24:05 +00:00
pci_if.m Add PCI methods to iterate over the PCI capabilities 2018-02-19 18:41:56 +00:00
pci_iov.c Extract eventfilter declarations to sys/_eventfilter.h 2019-05-20 00:38:23 +00:00
pci_iov.h Permit the name of the /dev/iov entry to be set by the driver. 2016-08-03 17:09:12 +00:00
pci_iov_if.m Create a separate kobj interface for leaf-driver PCI IOV methods. 2015-05-28 22:01:50 +00:00
pci_iov_private.h Save and restore SRIOV-related config registers. 2016-05-03 19:45:24 +00:00
pci_iov_schema.c Clean up repeated "All rights reserved" 2016-03-14 17:41:17 +00:00
pci_pci.c Only respond to the PCIe Attention Button if a device is already plugged in. 2019-06-05 04:58:42 +00:00
pci_private.h Add PCI methods to iterate over the PCI capabilities 2018-02-19 18:41:56 +00:00
pci_subr.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
pci_user.c Fix stray tab. 2018-11-17 00:03:04 +00:00
pcib_if.m Create pcib_request_feature. 2017-02-25 06:11:36 +00:00
pcib_private.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
pcib_support.c Re-commit r299467 having fixed the build: 2016-05-16 09:15:50 +00:00
pcireg.h Add PCIV_INVALID definition 2018-09-26 13:16:55 +00:00
pcivar.h Extract eventfilter declarations to sys/_eventfilter.h 2019-05-20 00:38:23 +00:00
schema_private.h Clean up repeated "All rights reserved" 2016-03-14 17:41:17 +00:00
vga_pci.c Drop "All rights reserved" from my copyright statements. 2019-03-06 22:11:45 +00:00