ata_dev_read_id(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

ata_dev_read_id β€” read ID data from the specified device. This page is from the Kernel API Manual, bestie, and it's lowkey iconic. ✨


🌸 SYNOPSIS 🌸

int ata_dev_read_id (struct ata_device *dev , unsigned int *p_class ,
       unsigned int flags , u16 *id );

πŸ’… ARGUMENTS πŸ’…

  • dev β€” the target device, aka the one we're reading from. 🎯
  • p_class β€” pointer to the class of the target device (may be changed). ⚠️
  • flags β€” ATA_READID_* flags. 🚩
  • id β€” buffer to read IDENTIFY data into. πŸ“₯

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so ata_dev_read_id reads ID data from the specified device. It performs ATA_CMD_ID_ATA on ATA devices and ATA_CMD_ID_ATAPI on ATAPI devices. It also issues ATA_CMD_INIT_DEV_PARAMS for pre-ATA4 drives. πŸ’«

FIXME: ATA_CMD_ID_ATA is optional for early drives and right now we abort if we hit that case. 😭

LOCKING: Kernel thread context (may sleep). πŸ’€


🌈 RETURN 🌈

It returns 0 on success, -errno otherwise. Slay when it's 0, bestie. 🫢


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file to check: ./drivers/ata/libata-core.c β€” and here's the full SEE ALSO friend group, no cap:

kisses πŸ’‹ β€” from the ./drivers/ata source, dated October 2026, and this whole ata_dev_read_id(9) page is out. πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from