dect
/
linux-2.6
Archived
13
0
Fork 0

[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>
This commit is contained in:
Douglas Gilbert 2010-12-17 19:16:06 -05:00 committed by James Bottomley
parent a8733c7baf
commit a87e3a67d5
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}