From: Marcos Paulo de Souza Date: Tue, 18 Jun 2019 22:44:54 +0000 (-0300) Subject: usb: storage: scsiglue: Do not skip VPD if try_vpd_pages is set X-Git-Tag: v5.4-rc1~600^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=349148785b8cea9781af520fd53c29ee8087ee74;p=platform%2Fkernel%2Flinux-rpi.git 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 Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index 59190d8..3079024 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;