On Mon, 2013-08-12 at 10:36 -0400, Alan Stern wrote: > On Mon, 12 Aug 2013, Oliver Neukum wrote: > > > Hi, > > > > I got a bug report about an enclosure that mishandles READ_CAPACITY10. > > I don't want to introduce yet another quirk. So what about basing this > > on USB version? > > > @@ -211,8 +212,12 @@ static int slave_configure(struct scsi_device *sdev) > > /* > > * Many devices do not respond properly to READ_CAPACITY_16. > > * Tell the SCSI layer to try READ_CAPACITY_10 first. > > + * However some USB 3.0 drive enclosures return capacity > > + * modulo 2TB > > */ > > - sdev->try_rc_10_first = 1; > > + usb_version = le16_to_cpu(us->pusb_dev->descriptor.bcdUSB); > > + if (usb_version < '3' * 0x100) > > Don't you mean 0x300? '3' * 0x100 is really equal to 0x3300. Thanks. > > + sdev->try_rc_10_first = 1; > > This may be a reasonable thing to do, although there's always a risk > that it will cause a regression. I have definitely seen one or two > reports about drives doing this, but I don't remember whether they > claimed to be USB-2 or USB-3. Well, if it is USB2 we may need a quirk in addition. Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html