ata_dev_get_GTF(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 _GTF taskfile 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 πŸ‘‘
  • 0 if _GTF doesn't exist
  • -EINVAL if _GTF is invalid πŸ’€

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./drivers/ata/libata-acpi.c plus literally the whole friend group:


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