提交 3f0bc3b3 编写于 作者: M Martin K. Petersen 提交者: James Bottomley

[SCSI] scsi_debug: Fix incorrect page length in logical block provisioning VPD

The page length for the 0xb2 VPD page is defined to be 4 bytes when no
provisioning descriptors are provided (DP=0).
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
Acked-by: NDouglas Gilbert <dgilbert@interlog.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 be1dd78d
...@@ -780,7 +780,7 @@ static int inquiry_evpd_b1(unsigned char *arr) ...@@ -780,7 +780,7 @@ static int inquiry_evpd_b1(unsigned char *arr)
/* Logical block provisioning VPD page (SBC-3) */ /* Logical block provisioning VPD page (SBC-3) */
static int inquiry_evpd_b2(unsigned char *arr) static int inquiry_evpd_b2(unsigned char *arr)
{ {
memset(arr, 0, 0x8); memset(arr, 0, 0x4);
arr[0] = 0; /* threshold exponent */ arr[0] = 0; /* threshold exponent */
if (scsi_debug_lbpu) if (scsi_debug_lbpu)
...@@ -795,7 +795,7 @@ static int inquiry_evpd_b2(unsigned char *arr) ...@@ -795,7 +795,7 @@ static int inquiry_evpd_b2(unsigned char *arr)
if (scsi_debug_lbprz) if (scsi_debug_lbprz)
arr[1] |= 1 << 2; arr[1] |= 1 << 2;
return 0x8; return 0x4;
} }
#define SDEBUG_LONG_INQ_SZ 96 #define SDEBUG_LONG_INQ_SZ 96
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册