ata_get_xlat_func(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ata_get_xlat_func β€” the "can we even translate this SCSI thing?" check

okay so real talk, this whole page lives in the Kernel API Manual (that's the 9 in ata_get_xlat_func(9) babe, kernel-doc section, we love her) and it's basically the vibe-check bouncer at the door of libata's SCSI-to-ATA translation party. ✨


🌸 NAME 🌸

ata_get_xlat_func β€” check if SCSI to ATA translation is possible


πŸŽ€ SYNOPSIS πŸŽ€

ata_xlat_func_t ata_get_xlat_func (struct ata_device *dev , u8 *cdb );

like, that's the whole signature bestie, ata_xlat_func_t in, struct ata_device *dev and u8 *cdb are the args, and yes there's a little space before the comma in cdb ); β€” that's just how the source rolls, iykyk πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the ATA device in question, your main character of the moment πŸ‘‘
  • cdb β€” the CDB of the SCSI command we're considering. literally just the command descriptor block of the SCSI command, handing it over for inspection 🫢

✨ DESCRIPTION ✨

so what actually happens: it looks up the SCSI command you gave it, and then determines whether that SCSI command is to be translated or simulated. that's the whole job. no cap, no extra steps, no side quests. πŸ”₯

think of it as the "do we have a translator for this or are we faking it" decision point. πŸ’€


🌈 RETURN 🌈

Pointer to the translation function if possible β€” NULL if not. that's it, that's the answer. if you get NULL, it's giving "not today", and the SCSI command isn't getting a translation function from this call. 😭


πŸ’– SEE ALSO πŸ’–

first things first, the source file itself, right here:

  • Kernel file ./drivers/ata/libata-scsi.c πŸ“

and then the whole extended friend group, in exactly the order they showed up (yes I'm listing every single one, we don't do "etc." in this house πŸ’…):


and that's the whole page bestie, go read the source, it's right there in ./drivers/ata 🌸

source/version: ./drivers/ata Β· date: October 2026 β€” mwah, that's the sign-off, ily, go translate some commands πŸŽ€πŸ«ΆπŸ’œ
πŸ“¦ where this page comes from