Yes, this is a known limitation of the generics interface.  Perhaps Doug
has further comments.  I am wondering whether we need some sort of table
(not unlike what you already have) to set the data direction in the generics
interface if it isn't specified by the user.  The major bugaboo is going to
be vendor specific commands, as tables are not going to be of much
assistance here.

-Eric


----- Original Message -----
From: "Matthew Dharm" <[EMAIL PROTECTED]>
To: "The Linux SCSI list" <[EMAIL PROTECTED]>
Sent: Tuesday, April 18, 2000 8:14 PM
Subject: sc_data_direction -- will we require it?


> Well, I'm working on polishing up my virtual HBA for usb storage devices,
> and I realized that it would be really nice to rely on the
> sc_data_direction field to tell me which way the data transfer is going to
> go.
>
> For reference, I _have_ to get this information from somewhere.  I have to
> know ahead of time which way the data will flow to set up the USB
> transaction properly.
>
> Right now, I have my own little table of directions.  Unfortunately, it
> could be wrong in some places -- I can't really test it very well.  So I
> thought I'd just shift to using the sc_data_direction field.
>
> Unfortunately, most applications don't set this bit yet.  Any request
> which originates from within the kernel will have it set correctly.
> However, requests from userspace applications (such as cdparanoia) will
> not have it set.
>
> So, my choices are either to (a) stick with the unreliable but apparently
> functional table, or (b) use the field and be prepared to reject commands
> which don't have the field set.
>
> But, as I was thinking about it, it occured to me that the only way we
> would get people to being using this field in a widespread way would be to
> make the SCSI layers enforce this -- that is, reject any commands issued
> that didn't indicate the direction somehow.
>
> Are there any plans to do this?  Or are we going to continue to support
> old applications on 2.4.0 which don't set this field?  I realize that
> there may be lots of applications which need updating, but it's a pretty
> simple update to make and it does coincide nicely with a pretty big kernel
> release (which is a time when developers should be going back to make sure
> that their programs work with the new interface).
>
> Matt Dharm
>
> --
> Matthew Dharm                              Home: [EMAIL PROTECTED]
> Engineer, Qualcomm, Inc.                         Work: [EMAIL PROTECTED]
>
> It was a new hope.
> -- Dust Puppy
> User Friendly, 12/25/1998
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to [EMAIL PROTECTED]
>


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]

Reply via email to