scsi: vpd pages are mandatory for SPC-2
authorHannes Reinecke <hare@suse.de>
Fri, 1 Apr 2016 06:57:37 +0000 (08:57 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 15 Apr 2016 20:53:08 +0000 (16:53 -0400)
VPD pages 0x0 and 0x83 are mandatory even for SPC-2, so we should be
lowering the restriction to avoid having to whitelist every SPC-2
compliant device.

Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
include/scsi/scsi_device.h

index 7d85de8551601ff23657d1a3c8f22131d482032f..a6c346df290d26fe0be34bdcd5bda2fc6bcff125 100644 (file)
@@ -542,9 +542,9 @@ static inline int scsi_device_supports_vpd(struct scsi_device *sdev)
        /*
         * Although VPD inquiries can go to SCSI-2 type devices,
         * some USB ones crash on receiving them, and the pages
-        * we currently ask for are for SPC-3 and beyond
+        * we currently ask for are mandatory for SPC-2 and beyond
         */
-       if (sdev->scsi_level > SCSI_SPC_2 && !sdev->skip_vpd_pages)
+       if (sdev->scsi_level >= SCSI_SPC_2 && !sdev->skip_vpd_pages)
                return 1;
        return 0;
 }