summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2019-06-19 00:44:54 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-03 18:40:49 +0200
commit349148785b8cea9781af520fd53c29ee8087ee74 (patch)
tree4f1433c75e53822420ef9be55bb73e284b951441 /drivers
parentMerge tag 'usb-for-v5.3-part2' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff)
downloadlinux-349148785b8cea9781af520fd53c29ee8087ee74.tar.xz
linux-349148785b8cea9781af520fd53c29ee8087ee74.zip
usb: storage: scsiglue: Do not skip VPD if try_vpd_pages is set
If BLIST_TRY_VPD_PAGES is set for a device, even for an USB, it should be honored, so only set skip_vpd_pages is try_vpd_pages is not set. Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/storage/scsiglue.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
index 59190d88fa9f..30790240aec6 100644
--- a/drivers/usb/storage/scsiglue.c
+++ b/drivers/usb/storage/scsiglue.c
@@ -195,8 +195,11 @@ static int slave_configure(struct scsi_device *sdev)
*/
sdev->skip_ms_page_8 = 1;
- /* Some devices don't handle VPD pages correctly */
- sdev->skip_vpd_pages = 1;
+ /*
+ * Some devices don't handle VPD pages correctly, so skip vpd
+ * pages if not forced by SCSI layer.
+ */
+ sdev->skip_vpd_pages = !sdev->try_vpd_pages;
/* Do not attempt to use REPORT SUPPORTED OPERATION CODES */
sdev->no_report_opcodes = 1;