diff options
author | Jens Axboe <axboe@suse.de> | 2005-11-29 23:03:34 +0300 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-12-14 04:11:11 +0300 |
commit | 26a68019c86e1d1782984a7a5babff762cde1501 (patch) | |
tree | 7c08ae2870d2712d836bc226d0ca0f5e57de4e69 /drivers/scsi/scsi_lib.c | |
parent | 493ff4ee7f93a2b53ed60197e05aa145eec8f8f5 (diff) | |
download | linux-26a68019c86e1d1782984a7a5babff762cde1501.tar.xz |
[SCSI] scsi_lib: stricter checks for clearing use_10_for_rw
Check the asc and ascq for being "invalid command opcode" as well.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 3 |
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, * system where READ CAPACITY failed, we may have read * past the end of the disk. */ - if (cmd->device->use_10_for_rw && + if ((cmd->device->use_10_for_rw && + sshdr.asc == 0x20 && sshdr.ascq == 0x00) && (cmd->cmnd[0] == READ_10 || cmd->cmnd[0] == WRITE_10)) { cmd->device->use_10_for_rw = 0; |