提交 a87e3a67 编写于 作者: D Douglas Gilbert 提交者: James Bottomley

[SCSI] scsi_debug: set resid to indicate no data-in when medium error

set resid to the requested data-in length when a MEDIUM ERROR is
simulated. This implies no valid data is returned in the data-in
buffer
Signed-off-by: NDouglas Gilbert <dgilbert@interlog.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 a8733c7b
......@@ -1805,6 +1805,7 @@ static int resp_read(struct scsi_cmnd *SCpnt, unsigned long long lba,
devip->sense_buff[5] = (ret >> 8) & 0xff;
devip->sense_buff[6] = ret & 0xff;
}
scsi_set_resid(SCpnt, scsi_bufflen(SCpnt));
return check_condition_result;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册