Skip to content

Commit

Permalink
[SCSI] scsi_debug: Fix incorrect page length in logical block provisi…
Browse files Browse the repository at this point in the history
…oning 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>
  • Loading branch information
Martin K. Petersen authored and James Bottomley committed Mar 27, 2012
1 parent be1dd78 commit 3f0bc3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/scsi_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 3f0bc3b

Please sign in to comment.