diff options
author | Martin K. Petersen <mkp@mkp.net> | 2012-03-08 10:48:29 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-03-27 03:26:36 -0400 |
commit | 3f0bc3b331a371392bb64c5b211b60ec84d5a444 (patch) | |
tree | 21c748bedcd7dfeb80adc1a3e77f5212eb0ee27e /drivers/scsi/scsi_debug.c | |
parent | be1dd78de5686c062bb3103f9e86d444a10ed783 (diff) |
[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>
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
-rw-r--r-- | drivers/scsi/scsi_debug.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index e4ba924c303d..255570dd7c36 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c | |||
@@ -780,7 +780,7 @@ static int inquiry_evpd_b1(unsigned char *arr) | |||
780 | /* Logical block provisioning VPD page (SBC-3) */ | 780 | /* Logical block provisioning VPD page (SBC-3) */ |
781 | static int inquiry_evpd_b2(unsigned char *arr) | 781 | static int inquiry_evpd_b2(unsigned char *arr) |
782 | { | 782 | { |
783 | memset(arr, 0, 0x8); | 783 | memset(arr, 0, 0x4); |
784 | arr[0] = 0; /* threshold exponent */ | 784 | arr[0] = 0; /* threshold exponent */ |
785 | 785 | ||
786 | if (scsi_debug_lbpu) | 786 | if (scsi_debug_lbpu) |
@@ -795,7 +795,7 @@ static int inquiry_evpd_b2(unsigned char *arr) | |||
795 | if (scsi_debug_lbprz) | 795 | if (scsi_debug_lbprz) |
796 | arr[1] |= 1 << 2; | 796 | arr[1] |= 1 << 2; |
797 | 797 | ||
798 | return 0x8; | 798 | return 0x4; |
799 | } | 799 | } |
800 | 800 | ||
801 | #define SDEBUG_LONG_INQ_SZ 96 | 801 | #define SDEBUG_LONG_INQ_SZ 96 |