[SCSI] sd: Avoid sending extended inquiry to legacy devices
authorMartin K. Petersen <martin.petersen@oracle.com>
Wed, 29 Jul 2009 18:06:53 +0000 (14:06 -0400)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Thu, 30 Jul 2009 16:37:50 +0000 (11:37 -0500)
commitffd4bc2a984fab40ed969163efdff321490e8032
tree4e2cfd73dbf40c08094e134777bc6c0038f227de
parent19252de6818ced0def0551d64a0a2975f52a523d
[SCSI] sd: Avoid sending extended inquiry to legacy devices

Some USB devices crash when we send them an inquiry with the EVPD bit
set, regardless of page requested (i.e. including page 0).

We only need the extended inquiry to gain access to VPD pages 0xB0 and
0xB1.  These appeared in SBC2 and SBC3 respectively, so we can restrict
sending the extended inquiry to devices reporting SPC3 or higher.

This fixes bugzilla.kernel.org #13657.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
[jejb: added comment]
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/sd.c