usb: storage: scsiglue: Do not skip VPD if try_vpd_pages is set
Subsystems (2)
PATCH v2 1/1 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.
---
Changes from v1:
changed the check of try_vpd_pages from:
sdev->try_vpd_pages == 0;
to:
!sdev->try_vpd_pages;
(as suggested by Alan Stern)
drivers/usb/storage/scsiglue.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/usb/storage/scsiglue.c +5 -2
@@ -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 ;
Signature · 1 line
2.21.0
humble ping :)
Quoted 38 lines · Marcos Paulo de Souza
If
BLIST_TRY_VPD_PAGESis set for a device, even for an USB, it should be honored, so only setskip_vpd_pagesistry_vpd_pagesis not set.Signed-off-by Marcos Paulo de Souza <[email protected]>Acked-by Alan Stern <[email protected]>---
Changes from v1:
changed the check oftry_vpd_pagesfrom:(quoted diff) +0
-0sdev->try_vpd_pages == 0; to: !sdev->try_vpd_pages; (as suggested by Alan Stern) drivers/usb/storage/scsiglue.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)drivers/usb/storage/scsiglue.c +5
-2@@ -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 ;Signature · 1 line
2.21.0
ping?
Quoted 38 lines · Marcos Paulo de Souza
If
BLIST_TRY_VPD_PAGESis set for a device, even for an USB, it should be honored, so only setskip_vpd_pagesistry_vpd_pagesis not set.Signed-off-by Marcos Paulo de Souza <[email protected]>Acked-by Alan Stern <[email protected]>---
Changes from v1:
changed the check oftry_vpd_pagesfrom:(quoted diff) +0
-0sdev->try_vpd_pages == 0; to: !sdev->try_vpd_pages; (as suggested by Alan Stern) drivers/usb/storage/scsiglue.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)drivers/usb/storage/scsiglue.c +5
-2@@ -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 ;Signature · 1 line
2.21.0