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)
Tue, Apr 15, 12:24 AM
Unknown Object (File)
Mon, Apr 14, 4:29 PM
Unknown Object (File)
Sun, Apr 6, 9:15 AM
Unknown Object (File)
Wed, Apr 2, 1:27 PM
Unknown Object (File)
Sun, Mar 30, 4:58 AM
Unknown Object (File)
Mar 26 2025, 3:18 PM
Unknown Object (File)
Mar 23 2025, 1:14 PM
Unknown Object (File)
Mar 14 2025, 6:45 PM
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.