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

Patrick Mansfield
2005-11-07T17:24:21Z

On Mon, Nov 07, 2005 at 09:05:25AM -0800, Matthew Dharm wrote:

> Okay, what am I missing?
>
> Looking at that patch, it looks to me like if sg.c set a flag in the SCSI
> command block then scsi_core.c could use that flag in the test to determine
> if the LUN should be masked-in.
>
> HOWEVER, I keep hearing that the changes will be extensive. What am I
> missing?

Not extensive AFAICT ...

The scmd/cdb is not available until we call scsi_get_command() in the
request function. So you would have to add a field into scsi_request, set
it in sg (in both sg.c block/scsi_ioctl.c, test via sd and sg when you are
done), and add the field in scsi_cmnd, and set scmd one in
scsi_init_cmd_from_req().

But as far as black listing, it does seem like a better solution in that
user apps do not need special code.

Do the devices that require it (well so far) have useable vendor + model
strings or usb id's?

-- Patrick Mansfield