ata_acpi_handle_hotplug(9)
π ata_acpi_handle_hotplug π
okay so you're in the Kernel API Manual, section 9, and today's main character is ata_acpi_handle_hotplug β¨ bestie this is the ACPI event handler backend and it's lowkey the place where every bay/device drama gets resolved π
πΈ NAME πΈ
ata_acpi_handle_hotplug β the ACPI event handler backend, fr fr π
β¨ SYNOPSIS β¨
void ata_acpi_handle_hotplug (struct ata_port *ap , struct ata_device
*dev , u32 event );
like yes that's the whole signature, no cap π«Ά
π¦ ARGUMENTS π¦
apβ the ATA port where the ACPI event went down πdevβ the ATA device the ACPI event happened to (and yes, it can beNULL, we'll get to that π)eventβ the actual ACPI event that occurred, the whole reason we're here π«
π DESCRIPTION π
So basically all the ACPI bay / device related events end up in this function. Like, every single one. It's giving main character energy for hotplug handling π
Here's the vibe check on dev:
- if the event is port-wide, then
devisNULLπ - if the event is specific to a device, then
devpoints to it ππ
And the behaviour split, because this part matters:
- Hotplug notification (as opposed to unplug) is always handled as port-wide π
- Unplug only kills the target device on a device-wide event π
LOCKING: ACPI notify handler context. May sleep. π΄ so like, don't be weird about it.
π₯ SEE ALSO π₯
Kernel file ./drivers/ata/libata-acpi.c β go read it, iykyk πβ¨
ata_dev_acpi_handle(9)ata_acpi_dev_manage_restart(9)ata_acpi_port_power_on(9)ata_acpi_dissociate(9)ata_acpi_gtm(9)ata_acpi_stm(9)ata_dev_get_GTF(9)ata_acpi_gtm_xfermask(9)ata_acpi_cbl_pata_type(9)ata_acpi_run_tf(9)ata_acpi_exec_tfs(9)ata_acpi_push_id(9)ata_acpi_on_resume(9)ata_acpi_set_state(9)ata_acpi_on_devcfg(9)ata_acpi_on_disable(9)
okay that's the whole thing, you ate that π this lil page lives under ./drivers/ata, dated October 2026, and it's literally ata_acpi_handle_hotplug(9) β go slay your ACPI events bestie ππ§ββοΈβ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms