diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2015-07-15 10:55:36 +0300 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-07-23 22:48:49 -0700 |
commit | 12306b425d0dbab7b60f54e02d67cf3dfae494d1 (patch) | |
tree | 112015efc7d82333d5eb90e6f162cdbf9af87523 /drivers | |
parent | 3e963b2d3c93e0546e911d681f37d35f0f79b54f (diff) | |
download | blackbird-op-linux-12306b425d0dbab7b60f54e02d67cf3dfae494d1.tar.gz blackbird-op-linux-12306b425d0dbab7b60f54e02d67cf3dfae494d1.zip |
scsi: Fix wrong additional sense length in descriptor format
The sense header additional sense length should be the accumulated
size of all the descriptors. Information descriptor size is 12 bytes.
When setting the additional sense length we should add 0xc instead of
0xa.
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/scsi_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_common.c b/drivers/scsi/scsi_common.c index 41432c10dda2..ee6bdf43a8ea 100644 --- a/drivers/scsi/scsi_common.c +++ b/drivers/scsi/scsi_common.c @@ -260,7 +260,7 @@ void scsi_set_sense_information(u8 *buf, u64 info) len = buf[7]; ucp = (char *)scsi_sense_desc_find(buf, len + 8, 0); if (!ucp) { - buf[7] = len + 0xa; + buf[7] = len + 0xc; ucp = buf + 8 + len; } ucp[0] = 0; |