ata_dev_get_GTF(9)
π ata_dev_get_GTF (kernel API manual, bestie edition)
okay so this is ata_dev_get_GTF(9) from the Kernel API Manual β it lives in ./drivers/ata and it's dated October 2026, and yes I'm gonna tell you all about it π
β¨ NAME β¨
ata_dev_get_GTF β get the drive bootup default taskfile settings πΈ
π¦ SYNOPSIS π¦
int ata_dev_get_GTF (struct ata_device *dev , struct ata_acpi_gtf **gtf );
like, that's the whole signature, no cap π
π ARGUMENTS π
devβ the target ATA device, aka the drive we're doing all this for π«Άgtfβ output parameter for the buffer that's gonna hold the_GTFtaskfile arrays; you pass in the address, it hands you back the goods β¨
π DESCRIPTION π
So this one applies to both PATA and SATA drives β equal opportunity icon behavior, we love to see it π
The _GTF method has no input parameters, periodt. What it does return is a variable number of register set values (registers hex 1F1..1F7, taskfiles). And here's the thing β that <variable number>? Not known in advance, bestie π so the move is: have ACPI-CA allocate the buffer as needed and return it, then free it later. That's the whole vibe.
LOCKING: EH context. that's it, that's the note π₯
β RETURN β
- Number of taskfiles on success π
0if_GTFdoesn't exist-EINVALif_GTFis invalid π
π SEE ALSO π
Kernel file ./drivers/ata/libata-acpi.c plus literally the whole friend group:
ata_dev_acpi_handle(9)ata_acpi_handle_hotplug(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_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)
and that's the page!! source/version vibes: ./drivers/ata, October 2026, page ata_dev_get_GTF(9) β mwah, go read the kernel, ily π§π
π¦ 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