diff options
-rw-r--r-- | drivers/scsi/scsi_scan.c | 4 | ||||
-rw-r--r-- | drivers/scsi/sd.c | 5 | ||||
-rw-r--r-- | include/scsi/scsi_device.h | 1 | ||||
-rw-r--r-- | include/scsi/scsi_devinfo.h | 1 |
4 files changed, 10 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index a5a0bdeba857..50536cd6b3f2 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
@@ -928,7 +928,9 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result, | |||
928 | 928 | ||
929 | sdev->eh_timeout = SCSI_DEFAULT_EH_TIMEOUT; | 929 | sdev->eh_timeout = SCSI_DEFAULT_EH_TIMEOUT; |
930 | 930 | ||
931 | if (*bflags & BLIST_SKIP_VPD_PAGES) | 931 | if (*bflags & BLIST_TRY_VPD_PAGES) |
932 | sdev->try_vpd_pages = 1; | ||
933 | else if (*bflags & BLIST_SKIP_VPD_PAGES) | ||
932 | sdev->skip_vpd_pages = 1; | 934 | sdev->skip_vpd_pages = 1; |
933 | 935 | ||
934 | transport_configure_device(&sdev->sdev_gendev); | 936 | transport_configure_device(&sdev->sdev_gendev); |
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 377a5206017e..4d72831eafe5 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -2726,6 +2726,11 @@ static void sd_read_write_same(struct scsi_disk *sdkp, unsigned char *buffer) | |||
2726 | 2726 | ||
2727 | static int sd_try_extended_inquiry(struct scsi_device *sdp) | 2727 | static int sd_try_extended_inquiry(struct scsi_device *sdp) |
2728 | { | 2728 | { |
2729 | /* Attempt VPD inquiry if the device blacklist explicitly calls | ||
2730 | * for it. | ||
2731 | */ | ||
2732 | if (sdp->try_vpd_pages) | ||
2733 | return 1; | ||
2729 | /* | 2734 | /* |
2730 | * Although VPD inquiries can go to SCSI-2 type devices, | 2735 | * Although VPD inquiries can go to SCSI-2 type devices, |
2731 | * some USB ones crash on receiving them, and the pages | 2736 | * some USB ones crash on receiving them, and the pages |
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index b895784e2313..1a0d1842962e 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -154,6 +154,7 @@ struct scsi_device { | |||
154 | unsigned skip_ms_page_8:1; /* do not use MODE SENSE page 0x08 */ | 154 | unsigned skip_ms_page_8:1; /* do not use MODE SENSE page 0x08 */ |
155 | unsigned skip_ms_page_3f:1; /* do not use MODE SENSE page 0x3f */ | 155 | unsigned skip_ms_page_3f:1; /* do not use MODE SENSE page 0x3f */ |
156 | unsigned skip_vpd_pages:1; /* do not read VPD pages */ | 156 | unsigned skip_vpd_pages:1; /* do not read VPD pages */ |
157 | unsigned try_vpd_pages:1; /* attempt to read VPD pages */ | ||
157 | unsigned use_192_bytes_for_3f:1; /* ask for 192 bytes from page 0x3f */ | 158 | unsigned use_192_bytes_for_3f:1; /* ask for 192 bytes from page 0x3f */ |
158 | unsigned no_start_on_add:1; /* do not issue start on add */ | 159 | unsigned no_start_on_add:1; /* do not issue start on add */ |
159 | unsigned allow_restart:1; /* issue START_UNIT in error handler */ | 160 | unsigned allow_restart:1; /* issue START_UNIT in error handler */ |
diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h index 8670c04e199e..1fdd6fc5492b 100644 --- a/include/scsi/scsi_devinfo.h +++ b/include/scsi/scsi_devinfo.h | |||
@@ -34,4 +34,5 @@ | |||
34 | #define BLIST_SKIP_VPD_PAGES 0x4000000 /* Ignore SBC-3 VPD pages */ | 34 | #define BLIST_SKIP_VPD_PAGES 0x4000000 /* Ignore SBC-3 VPD pages */ |
35 | #define BLIST_SCSI3LUN 0x8000000 /* Scan more than 256 LUNs | 35 | #define BLIST_SCSI3LUN 0x8000000 /* Scan more than 256 LUNs |
36 | for sequential scan */ | 36 | for sequential scan */ |
37 | #define BLIST_TRY_VPD_PAGES 0x10000000 /* Attempt to read VPD pages */ | ||
37 | #endif | 38 | #endif |