Skip to content

Commit

Permalink
usb: storage: scsiglue: Do not skip VPD if try_vpd_pages is set
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
marcosps authored and gregkh committed Jul 3, 2019
1 parent 51785bd commit 3491487
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/usb/storage/scsiglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3491487

Please sign in to comment.