diff options
author | Stefan Schmidt <stefan@datenfreihafen.org> | 2017-10-18 17:40:18 +0200 |
---|---|---|
committer | Stefan Schmidt <stefan@datenfreihafen.org> | 2017-10-18 17:40:18 +0200 |
commit | 396665e8320987ff43b20a62a6a1cdae57aa1cc1 (patch) | |
tree | bf778eab1ef1c9ff102bb235d9bca1a42bec7d0a /drivers/usb/storage/transport.c | |
parent | d01174fcd2c1ffefdd0554f847c4045a5c731591 (diff) | |
parent | b9f1f1ce866c28e3d9b86202441b220244754a69 (diff) |
Merge remote-tracking branch 'net-next/master'
Diffstat (limited to 'drivers/usb/storage/transport.c')
-rw-r--r-- | drivers/usb/storage/transport.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c index 1a59f335b063..a3ccb899df60 100644 --- a/drivers/usb/storage/transport.c +++ b/drivers/usb/storage/transport.c @@ -834,13 +834,25 @@ Retry_Sense: if (result == USB_STOR_TRANSPORT_GOOD) { srb->result = SAM_STAT_GOOD; srb->sense_buffer[0] = 0x0; + } + + /* + * ATA-passthru commands use sense data to report + * the command completion status, and often devices + * return Check Condition status when nothing is + * wrong. + */ + else if (srb->cmnd[0] == ATA_16 || + srb->cmnd[0] == ATA_12) { + /* leave the data alone */ + } /* * If there was a problem, report an unspecified * hardware error to prevent the higher layers from * entering an infinite retry loop. */ - } else { + else { srb->result = DID_ERROR << 16; if ((sshdr.response_code & 0x72) == 0x72) srb->sense_buffer[1] = HARDWARE_ERROR; |