aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/scsi_debug.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2012-01-19 19:30:00 -0500
committerJames Bottomley <JBottomley@Parallels.com>2012-02-19 08:08:57 -0600
commitde13e9654e308db6bde49c779410512ad9659bc0 (patch)
tree545d1bbaedd7b103db196ddcf6e41fb7a10eb21d /drivers/scsi/scsi_debug.c
parentbd9244f7b9508a5945dcbd015db334110a9cdecf (diff)
[SCSI] scsi_debug: GET LBA STATUS response length correction
The SCSI GET LBA STATUS command was introduced in SBC-3 revision 20 in September 2009. At that time the Parameter Data Length field in the response had an associated byte offset of 8. Then in SBC-3 revision 25 (October 2010) that byte offset was changed to 4. The sg_get_lba_status utility in sg3_utils version 1.33 (released earlier today) has been changed to calculate the newer response length. However the implementation of GET LBA STATUS command in the scsi_debug driver still uses the original byte offset. modify the Parameter Data Length field value in the GET LBA STATUS command response to comply with the change in SBC-3 revision 25 Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
-rw-r--r--drivers/scsi/scsi_debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 6888b2ca5bf..d2fd0efca56 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -2220,7 +2220,7 @@ static int resp_get_lba_status(struct scsi_cmnd * scmd,
mapped = map_state(lba, &num);
memset(arr, 0, SDEBUG_GET_LBA_STATUS_LEN);
- put_unaligned_be32(16, &arr[0]); /* Parameter Data Length */
+ put_unaligned_be32(20, &arr[0]); /* Parameter Data Length */
put_unaligned_be64(lba, &arr[8]); /* LBA */
put_unaligned_be32(num, &arr[16]); /* Number of blocks */
arr[20] = !mapped; /* mapped = 0, unmapped = 1 */