提交 12306b42 编写于 作者: S Sagi Grimberg 提交者: Nicholas Bellinger

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: NSagi Grimberg <sagig@mellanox.com>
Reviewed-by: NHannes Reinecke <hare@suse.de>
Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 3e963b2d
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册