Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>

authored by

Martin K. Petersen and committed by
James Bottomley
3f0bc3b3 be1dd78d

+2 -2
+2 -2
drivers/scsi/scsi_debug.c
··· 780 780 /* Logical block provisioning VPD page (SBC-3) */ 781 781 static int inquiry_evpd_b2(unsigned char *arr) 782 782 { 783 - memset(arr, 0, 0x8); 783 + memset(arr, 0, 0x4); 784 784 arr[0] = 0; /* threshold exponent */ 785 785 786 786 if (scsi_debug_lbpu) ··· 795 795 if (scsi_debug_lbprz) 796 796 arr[1] |= 1 << 2; 797 797 798 - return 0x8; 798 + return 0x4; 799 799 } 800 800 801 801 #define SDEBUG_LONG_INQ_SZ 96