]> git.baikalelectronics.ru Git - kernel.git/commit
[libata] Set proper SK when CK_COND is set.
authorGwendal Grignou <gwendal@google.com>
Fri, 18 Jan 2013 18:56:43 +0000 (10:56 -0800)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 20 Feb 2013 22:13:17 +0000 (17:13 -0500)
commitef6a3b5e35fd1c84fd1ba958d51c3da5007fc963
treeac32afc022d5885e278b61a0f6eaf7730ccc2a92
parent15d174b38b495417ab37752e488d44a95a9294fd
[libata] Set proper SK when CK_COND is set.

When the user application sends a ATA_12 or ATA_16 PASSTHROUGH
scsi command, put the task file register in the sense data with the
proper Sense Key. Instead of NO SENSE, set RECOVERED, as
specified in [SAT2]12.2.5 Table 92.

Tested:
Using udev ata_id to generate a passthrough command, IDENTIFY:
before:
 sd 0:0:0:0: [sda] CDB: ATA command pass through(12)/Blank: \
a1 08 2e 00 01 00 00 00 00 ec 00 00
 sd 0:0:0:0: [sda] Sense Key : No Sense [current] [descriptor]
 Descriptor sense data with sense descriptors (in hex):
         72 00 00 00 00 00 00 0e 09 0c 00 00 00 00 00 3f
         00 18 00 a6 e0 50

after
 sd 0:0:0:0: [sda] CDB: ATA command pass through(12)/Blank: \
a1 08 2e 00 01 00 00 00 00 ec 00 00
 sd 0:0:0:0: [sda]  Sense Key : Recovered Error [current] [descriptor]
 Descriptor sense data with sense descriptors (in hex):
        72 01 00 1d 00 00 00 0e 09 0c 00 00 00 01 00 00
        00 00 00 00 00 50

Signed-off-by: Gwendal Grignou <gwendal@google.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-scsi.c