1ATA_SCSI_TRANSLATE(9)   libata SCSI translation/emulat   ATA_SCSI_TRANSLATE(9)
2
3
4

NAME

6       ata_scsi_translate - Translate then issue SCSI command to ATA device
7

SYNOPSIS

9       int ata_scsi_translate(struct ata_device * dev, struct scsi_cmnd * cmd,
10                              void (*done) (struct scsi_cmnd *),
11                              ata_xlat_func_t xlat_func);
12

ARGUMENTS

14       dev
15           ATA device to which the command is addressed
16
17       cmd
18           SCSI command to execute
19
20       done
21           SCSI command completion function
22
23       xlat_func
24           Actor which translates cmd to an ATA taskfile
25

DESCRIPTION

27       Our ->queuecommand function has decided that the SCSI command issued
28       can be directly translated into an ATA command, rather than handled
29       internally.
30
31       This function sets up an ata_queued_cmd structure for the SCSI command,
32       and sends that ata_queued_cmd to the hardware.
33
34       The xlat_func argument (actor) returns 0 if ready to execute ATA
35       command, else 1 to finish translation. If 1 is returned then
36       cmd->result (and possibly cmd->sense_buffer) are assumed to be set
37       reflecting an error condition or clean (early) termination.
38

LOCKING

40       spin_lock_irqsave(host lock)
41

RETURNS

43       0 on success, SCSI_ML_QUEUE_DEVICE_BUSY if the command needs to be
44       deferred.
45

AUTHOR

47       Jeff Garzik
48           Author.
49
51Kernel Hackers Manual 2.6.         June 2019             ATA_SCSI_TRANSLATE(9)
Impressum