aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r--drivers/scsi/scsi_lib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index ce9d73a292e2..1f2782767ca9 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -884,7 +884,8 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes,
884 * system where READ CAPACITY failed, we may have read 884 * system where READ CAPACITY failed, we may have read
885 * past the end of the disk. 885 * past the end of the disk.
886 */ 886 */
887 if (cmd->device->use_10_for_rw && 887 if ((cmd->device->use_10_for_rw &&
888 sshdr.asc == 0x20 && sshdr.ascq == 0x00) &&
888 (cmd->cmnd[0] == READ_10 || 889 (cmd->cmnd[0] == READ_10 ||
889 cmd->cmnd[0] == WRITE_10)) { 890 cmd->cmnd[0] == WRITE_10)) {
890 cmd->device->use_10_for_rw = 0; 891 cmd->device->use_10_for_rw = 0;