They are essentially the same thing, but are parts of different
structures. The Scsi_Request structure is for things like ioctls and
character device requests that are pending in the queue for a device. When
the thing reaches the head of the queue, a Scsi_Cmnd gets allocated, and the
information is copied over from the Scsi_Request.
-Eric
----- Original Message -----
From: Matthew Dharm <[EMAIL PROTECTED]>
To: Douglas Gilbert <[EMAIL PROTECTED]>
Cc: Oliver Neukum <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Sunday, April 16, 2000 5:45 PM
Subject: Re: question on data direction
> What's the difference between sc_data_direction and sr_data_direction?
>
> Matt Dharm
>
> On Sun, 16 Apr 2000, Douglas Gilbert wrote:
>
> > Oliver Neukum wrote:
> > >
> > > Hi,
> > >
> > > this may be a stupid question, but ...
> > >
> > > How is a driver who has gotten a *Scsi_Cmnd supposed to know whether
the
> > > data is to be read or written ?
> >
> > Well it's a good question. In the 2.3 series of development kernels
> > a flag was added just for this purpose:
> >
> > /*
> > * These are the values that the SCpnt->sc_data_direction and
> > * SRpnt->sr_data_direction can take. These need to be set
> > * The SCSI_DATA_UNKNOWN value is essentially the default.
> > * In the event that the command creator didn't bother to
> > * set a value, you will see SCSI_DATA_UNKNOWN.
> > */
> > #define SCSI_DATA_UNKNOWN 0
> > #define SCSI_DATA_WRITE 1
> > #define SCSI_DATA_READ 2
> > #define SCSI_DATA_NONE 3
> >
> >
> > So in the lk 2.2 series a driver must either guess on the basis
> > of the SCSI opcode (probably not a good idea given non-standard
> > opcodes) or be prepared for a data transfer in either direction.
> > A combination of both policies may be useful (e.g. if the opcode
> > is READ(6), READ(10) or READ(12) then ...).
> >
> > Doug Gilbert
> >
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> > the body of a message to [EMAIL PROTECTED]
> >
>
> --
> Matthew Dharm Home: [EMAIL PROTECTED]
> Engineer, Qualcomm, Inc. Work: [EMAIL PROTECTED]
>
> What, are you one of those Microsoft-bashing Linux freaks?
> -- Customer to Greg
> User Friendly, 2/10/1999
>
>
> -
> 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]