summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qedi
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>2023-03-22 11:22:11 +0900
committerMartin K. Petersen <martin.petersen@oracle.com>2023-03-24 21:01:32 -0400
commitf0aa59a33d2ac2267d260fe21eaf92500df8e7b4 (patch)
tree5f6414e200203a000707cadc765511aa25724a4d /drivers/scsi/qedi
parent2309df27111a51734cb9240b4d3c25f2f3c6ab06 (diff)
downloadlinux-stable-f0aa59a33d2ac2267d260fe21eaf92500df8e7b4.tar.gz
linux-stable-f0aa59a33d2ac2267d260fe21eaf92500df8e7b4.tar.bz2
linux-stable-f0aa59a33d2ac2267d260fe21eaf92500df8e7b4.zip
scsi: core: Improve scsi_vpd_inquiry() checks
Some USB-SATA adapters have broken behavior when an unsupported VPD page is probed: Depending on the VPD page number, a 4-byte header with a valid VPD page number but with a 0 length is returned. Currently, scsi_vpd_inquiry() only checks that the page number is valid to determine if the page is valid, which results in receiving only the 4-byte header for the non-existent page. This error manifests itself very often with page 0xb9 for the Concurrent Positioning Ranges detection done by sd_read_cpr(), resulting in the following error message: sd 0:0:0:0: [sda] Invalid Concurrent Positioning Ranges VPD page Prevent such misleading error message by adding a check in scsi_vpd_inquiry() to verify that the page length is not 0. Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Link: https://lore.kernel.org/r/20230322022211.116327-1-damien.lemoal@opensource.wdc.com Reviewed-by: Benjamin Block <bblock@linux.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qedi')
0 files changed, 0 insertions, 0 deletions