提交 26a68019 编写于 作者: J Jens Axboe 提交者: James Bottomley

[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: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 493ff4ee
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册