Re: [usb-storage] Re: PATCH: exclude certain commands from emulated SCSI hosts

Alan Cox
2003-04-22T15:18:21Z

On Maw, 2003-04-22 at 02:17, Matthew Dharm wrote:
> Your patches went a long way to improving things. But, then people added
> EVPD and further changed MODE_SENSE and other things. It's pretty clear
> to me that trying to change the SCSI core to not use these commands isn't
> going to happen -- so I want a way to filter them. I originally wanted a
> centralized filter (i.e. usb-storage could indicate to the mid-layer not to
> send the 'unwelcome' commands), but that got shot down in favor of a
> centralized filter-framework which could be applied by any LLDD that wanted
> to.

You already can do this. You just need to write yourself a library
routine which converts/blocks according to the filter rules (ie
read6->read10, returns errors to fancy stuff etc).