Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>

authored by

Douglas Gilbert and committed by
James Bottomley
a87e3a67 a8733c7b

+1
+1
drivers/scsi/scsi_debug.c
··· 1805 1805 devip->sense_buff[5] = (ret >> 8) & 0xff; 1806 1806 devip->sense_buff[6] = ret & 0xff; 1807 1807 } 1808 + scsi_set_resid(SCpnt, scsi_bufflen(SCpnt)); 1808 1809 return check_condition_result; 1809 1810 } 1810 1811