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

Matthew Dharm
2005-11-04T17:28:53Z

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

On Thu, Nov 03, 2005 at 11:08:07PM -0500, James Bottomley wrote:
> On Wed, 2005-11-02 at 15:45 -0800, Matthew Dharm wrote:
> > On Wed, Nov 02, 2005 at 02:18:52PM -0800, Timothy Thelin wrote:
> > >
> > > If you had time to spare, instead of touching usb-storage,
> > > it might be better spent resurecting SG_FLAG_LUN_INHIBIT to
> > > stop the above behavior so that SG_IO cdbs can be passed
> > > through untouched.
> > > (SG_FLAG_FUN_INHIBIT was a flag SG_IO used to support a long
> > > time ago, and I have no idea why it was dropped, but it was)
> >
> > I didn't realize that had been removed. Anyone that sends a
> > vendor-specific command to a device needs this flag to make sure it goes
> > through unmangled.
> >
> > Perhaps someone on linux-scsi can comment on why this was removed and how
> > we might get it back?
>
> I've no distinct recollection of someone removing this, but if I
> remember correctly what it used to do, it was a hack to stop us from
> mangling SCSI-3 CDB's. We fixed the mid-layer not to require the hack
> by only setting the CDB[1] lun field for SCSI-1 and SCSI-2 devices (as
> the standards mandate). What's the actual problem? No SCSI-1 or SCSI-2
> device should have any vendor specific CDBs that uses these bits in
> CDB[1].

Unfortunately, reality appears to disagree with the last "should". I've
personally seen devices with vendor-specific commands that want to control
CDB[1] in SCSI-2.

I didn't know it was removed; I only know what Timothy Thelin told me. Can
we get the feature back?

Matt

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

It was a new hope.
-- Dust Puppy
User Friendly, 12/25/1998

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