[SCSI] scsi_debug: Fix incorrect page length in logical block provisioning VPD
authorMartin K. Petersen <mkp@mkp.net>
Thu, 8 Mar 2012 15:48:29 +0000 (10:48 -0500)
committerJames Bottomley <JBottomley@Parallels.com>
Tue, 27 Mar 2012 07:26:36 +0000 (08:26 +0100)
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: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/scsi_debug.c

index e4ba924c303dabb4384868c54b9b3b3d61f2cf51..255570dd7c3622fc0ed2ebd354b7a51428c18796 100644 (file)
@@ -780,7 +780,7 @@ static int inquiry_evpd_b1(unsigned char *arr)
 /* Logical block provisioning VPD page (SBC-3) */
 static int inquiry_evpd_b2(unsigned char *arr)
 {
-       memset(arr, 0, 0x8);
+       memset(arr, 0, 0x4);
        arr[0] = 0;                     /* threshold exponent */
 
        if (scsi_debug_lbpu)
@@ -795,7 +795,7 @@ static int inquiry_evpd_b2(unsigned char *arr)
        if (scsi_debug_lbprz)
                arr[1] |= 1 << 2;
 
-       return 0x8;
+       return 0x4;
 }
 
 #define SDEBUG_LONG_INQ_SZ 96