opnsense-src/sys/dev/acpica
Colin Percival 55c3348ed7 acpi_pci: Add quirk for DELAY-after-EJ0
On some EC2 instances, there is a race between removing a device from
the system and making the PCI bus stop reporting the presence of the
device.  As a result, a PCI BUS_RESCAN performed immediately after
the _EJ0 method returns "sees" the device which is being ejected, which
then causes problems later (e.g. we won't recognize a new device being
plugged into that slot because we never knew it was vacant).

On other operating systems the bus is synchronously marked as needing
to be rescanned but the rescan does not occur until O(1) seconds later.

Create a new ACPI_Q_DELAY_BEFORE_EJECT_RESCAN quirk and set it in EC2
AMIs, and add a 10 ms DELAY between _EJ0 and BUS_RESCAN when tht quirk
is set.

Reviewed by:	jhb
MFC after:	1 month
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D49252
2025-03-14 11:35:35 -07:00
..
Osd pci_cfgreg: Add a PCI domain argument to the low-level register API 2023-11-29 10:31:47 -08:00
acpi.c Replace calls to bus_generic_attach with bus_attach_children 2024-12-06 17:26:16 -05:00
acpi_acad.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
acpi_apei.c apei: Mark ReadAckRegister resource as shareable 2024-01-09 16:07:34 -05:00
acpi_battery.c acpi_battery: avoid divide-by-zero when no devices have capacity info 2024-04-16 19:39:45 -04:00
acpi_bus_if.m sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
acpi_button.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
acpi_cmbat.c ACPI: Treat all 20-element _BIX entires as revision 0 2024-10-02 12:30:15 -06:00
acpi_container.c Replace calls to bus_generic_attach with bus_attach_children 2024-12-06 17:26:16 -05:00
acpi_cpu.c Replace calls to bus_generic_attach with bus_attach_children 2024-12-06 17:26:16 -05:00
acpi_dock.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
acpi_ec.c acpi: Use device_set_descf() 2024-06-02 19:38:41 -04:00
acpi_ged.c acpi: Mark the GED ithread as sleepable 2025-01-24 15:08:09 +00:00
acpi_hpet.c acpi_hpet: Make use of enum for vm_guest to improve readability 2024-03-24 23:31:22 +08:00
acpi_hpet.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
acpi_if.m sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
acpi_isab.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
acpi_lid.c acpi_lid: Remove duplicate events 2023-12-23 21:33:51 -05:00
acpi_package.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
acpi_pci.c acpi_pci: Add quirk for DELAY-after-EJ0 2025-03-14 11:35:35 -07:00
acpi_pci_link.c acpi: Use device_set_descf() 2024-06-02 19:38:41 -04:00
acpi_pcib.c acpica: Extract _OSC parsing to a common file 2024-12-12 18:00:22 +00:00
acpi_pcib_acpi.c acpi: Pass the correct device to acpi_pcib_osc 2025-01-03 16:10:41 +00:00
acpi_pcib_pci.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
acpi_pcibvar.h acpica: Extract _OSC parsing to a common file 2024-12-12 18:00:22 +00:00
acpi_pcivar.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
acpi_perf.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
acpi_powerres.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
acpi_pxm.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
acpi_quirk.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
acpi_quirks sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
acpi_resource.c acpi: Handle multiple interrupts 2024-11-19 17:14:42 +00:00
acpi_smbat.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
acpi_smbus.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
acpi_thermal.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
acpi_throttle.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
acpi_timer.c acpi_timer: remove leftovers from Garbage-collect ACPI-safe timer and friends 2024-06-21 14:06:26 +02:00
acpi_video.c newbus: globally replace device_add_child(..., -1) with DEVICE_UNIT_ANY 2024-07-24 22:22:58 -06:00
acpiio.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
acpivar.h acpi_pci: Add quirk for DELAY-after-EJ0 2025-03-14 11:35:35 -07:00