ata_set_mode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ata_set_mode(9) β€” like, the Kernel API Manual page, but make it make sense

okay so bestie, welcome to the Kernel API Manual entry for ata_set_mode(9) ✨ this is the one that literally programs your ATA timings and then goes ahead and issues SET FEATURES - XFER β€” iconic behaviour, no notes πŸŽ€


✨ NAME ✨

ata_set_mode β€” Program timings and issue SET FEATURES - XFER 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

int ata_set_mode (struct ata_link *link , struct ata_device
**r_failed_dev );

🌸 ARGUMENTS 🌸

  • link β€” the link where the timings are gonna get programmed, bestie. this is the one getting the glow-up πŸ’…
  • r_failed_dev β€” the out parameter for the failed device πŸ‘€ like, if something goes wrong, this is where the culprit gets named.

πŸ’– DESCRIPTION πŸ’–

So this is the standard implementation of the function that tunes and sets the ATA device disk transfer mode β€” think PIO3, UDMA6, etc. like it's literally picking your speed vibe and committing to it 🏎️✨

If ata_dev_set_mode fails, the pointer to the failing device gets returned in r_failed_dev. not me pointing fingers but like. it's pointing fingers 🫡😭

LOCKING: PCI/etc. bus probe sem. πŸ”’ that's the party rule, pls respect it.

πŸ‘‘ RETURN πŸ‘‘

  • 0 on success πŸŽ‰ slay
  • negative errno otherwise πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./drivers/ata/libata-core.c β€” plus, like, the whole extended friend group of ata functions, all present and accounted for 🫢✨


okay and like, official sign-off time bestie πŸŽ€ this little masterpiece lives in ./drivers/ata, it's dated October 2026, and yeah β€” it's ata_set_mode(9) all the way down πŸ’œ go forth and program those timings, you absolute icon 🌟

πŸ“¦ where this page comes from