Page MenuHomeFreeBSD

acpi_pci: Add quirk for DELAY-after-EJ0
ClosedPublic

Authored by cperciva on Mar 6 2025, 5:30 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jul 4, 8:59 AM
Unknown Object (File)
Jul 2 2025, 7:10 AM
Unknown Object (File)
Jun 26 2025, 7:12 PM
Unknown Object (File)
Jun 26 2025, 11:43 AM
Unknown Object (File)
Jun 22 2025, 10:42 PM
Unknown Object (File)
Jun 21 2025, 10:46 PM
Unknown Object (File)
Jun 17 2025, 11:47 PM
Unknown Object (File)
Jun 5 2025, 4:11 AM
Subscribers

Details

Summary

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.

MFC after: 1 month
Sponsored by: Amazon

Diff Detail

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

Event Timeline

I assume the parties in question realize that the correct behavior is the bus should be settled with _EJ0 returns, but that since that is on the older systems they don't plan to fix it?

This revision is now accepted and ready to land.Mar 14 2025, 5:57 PM
In D49252#1125653, @jhb wrote:

I assume the parties in question realize that the correct behavior is the bus should be settled with _EJ0 returns, but that since that is on the older systems they don't plan to fix it?

Yes, we've had that conversation. It might get fixed at some point, but there is no ETA and I'd like to make sure this works when 14.3 ships.

This revision was automatically updated to reflect the committed changes.