projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8733c7
)
[SCSI] scsi_debug: set resid to indicate no data-in when medium error
author
Douglas Gilbert
<dgilbert@interlog.com>
Sat, 18 Dec 2010 00:16:06 +0000
(19:16 -0500)
committer
James Bottomley
<James.Bottomley@suse.de>
Thu, 23 Dec 2010 05:26:49 +0000
(23:26 -0600)
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>
drivers/scsi/scsi_debug.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/scsi/scsi_debug.c
b/drivers/scsi/scsi_debug.c
index 2f1f9b079b1067fb078b74c471134bba9a7f55bb..7b310934efed5509bbc7d78969ad912874c0140e 100644
(file)
--- a/
drivers/scsi/scsi_debug.c
+++ b/
drivers/scsi/scsi_debug.c
@@
-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;
}