ata_scsi_translate (9) - Linux Man Pages
ata_scsi_translate: Translate then issue SCSI command to ATA device
ata_scsi_translate - Translate then issue SCSI command to ATA device
int ata_scsi_translate(struct ata_device
*dev, struct scsi_cmnd *cmd, ata_xlat_func_t xlat_func);
- ATA device to which the command is addressed
- SCSI command to execute
- Actor which translates cmd to an ATA taskfile
Our ->queuecommand function has decided that the SCSI command issued can be directly translated into an ATA command, rather than handled internally.
This function sets up an ata_queued_cmd structure for the SCSI command, and sends that ata_queued_cmd to the hardware.
The xlat_func argument (actor) returns 0 if ready to execute ATA command, else 1 to finish translation. If 1 is returned then cmd->result (and possibly cmd->sense_buffer) are assumed to be set reflecting an error condition or clean (early) termination.