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

James Bottomley
2005-11-04T04:08:07Z

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].

James