[8674] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Re: sc_data_direction -- will we require it?

daemon@ATHENA.MIT.EDU (Eric Youngdale)
Tue Apr 18 21:59:23 2000

Message-ID: <004401bfa9a2$b0468170$0f17a8c0@eric.home>
From: "Eric Youngdale" <eric@andante.org>
To: "Matthew Dharm" <mdharm-scsi@one-eyed-alien.net>,
	"The Linux SCSI list" <linux-scsi@vger.rutgers.edu>
Date:	Tue, 18 Apr 2000 21:57:59 -0400
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

    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" <mdharm-scsi@one-eyed-alien.net>
To: "The Linux SCSI list" <linux-scsi@vger.rutgers.edu>
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: mdharm@one-eyed-alien.net
> Engineer, Qualcomm, Inc.                         Work: mdharm@qualcomm.com
>
> 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 majordomo@vger.rutgers.edu
>


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu

home help back first fref pref prev next nref lref last post