Re: [usb-storage] [Merging ATA passthru] on integrating SMART/ATA-Security in usb-storage driver

Matthew Dharm
2005-11-04T20:30:17Z

[-- Attachment #1: Type: text/plain, Size: 1399 bytes --]

On Fri, Nov 04, 2005 at 12:58:27PM -0600, James Bottomley wrote:
> On Fri, 2005-11-04 at 10:30 -0800, Timothy Thelin wrote:
> > And for an even more concrete example:
> > The CY7C68300B cypress bridge board (has various siblings as well
> > on their site that act very similar) implements SCSI spec 0 (ie it
> > doesn't claim to support any scsi spec). Now usb-storage sees
> > this in inquiry, and decides to export the device as a scsi2 device
> > since based on the usb-storage devs' experience most usb devices
> > really want scsi2 cdbs. So SCSI core thinks this is a scsi2 device
> > and procedes to mangle the cdbs as they're going through.
>
> What happens if you prevent USB mangling the scsi_level? I think, for
> the most part, we would handle 0 in about the same way as we handle 2.
> However, we could gate the if around the CDB[1] mangling as
>
> if (scsi_level != SCSI_UNKNOWN && scsi_level <= SCSI_2)
>
> which should fix your problem, I think.

A long time ago, usb-storage didn't mangle the scsi_level. And almost
nothing worked. Without a SCSI level, 6-byte commands get sent; only
10-byte commands will do.

Matt

--
Matthew Dharm Home: mdharm-usb@one-eyed-alien.net
Maintainer, Linux USB Mass Storage Driver

I see you've been reading alt.sex.chubby.sheep voraciously.
-- Tanya
User Friendly, 11/24/97

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]