On Sat, 2003-04-05 at 13:27, Matthew Dharm wrote:
> I don't think this will work.  I see two problems:
> 
> (1) You can't filter TEST_UNIT_READY (opcode 0).  Not a big deal, but a
> theoretical problem.

Yes, TUR has been mandatory since SCSI-1, so I didn't think this would
be a problem.  Any end signal can be used, zero was the least line of
resistance.

> (2) We need to be able to filter at the originator.  For example,
> MODE_SENSE is perfectly fine to send to a CD-ROM, but not to a hard-disk.
> We can't make that distinction with your code, unless we put the filtering
> code not in queuecommand but in places like sd.c.... or we need to change
> the filter to also take a device type.

What's wrong with

-               if(scsi_filter_cmd(SCp, &filter)) {
+               if(SCp->device->type == TYPE_DISK && scsi_filter_cmd(SCp, &filter)) {

?

The whole idea is to provide a filter library that the emulated HBA
drivers can use to cope with standard commands they don't like rather
than add extra code to the mid-layer main code paths.

James




-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to