On Wed, 8 Sep 1999, Alan Cox wrote:

> > This flaw in Linux-SCSI requires driver to be able to handle any transfer
> > direction required by a device for a command. Usually, the direction is 
> > enforced only for common opcodes as READ*/WRITE* and friends. For non
> > usual commands the driver/controller pair must wait the first data phase 
> > asked by the device to know about the transfer direction.
> 
> Many drivers cant wait for the phase to decide. They have to use tables or
> be told

Indeed, and we should, at least, provide direction for SCSI commands asked 
by peripheral drivers that are kernel modules.

I suggest the following to be done ASAP:

1 - Add a 'direction' field to the scsi command structure that can be
    filled with the following values:
      DIR_INPUT, DIR_OUTPUT, DIR_NONE and DIR_UNKNOWN=0
      Set this field to DIR_UNKNOWN=0 by default.

2 - Make kernel modules that request SCSI IOs (basically sd.c, sr.c, ...) 
    provide the right value for the transfer direction.

(1) does &llow SCSI driver maintainers to prepare changes, but still
   handling the case of the direction being unknown.

(2) does make things correct for all IOs asked by the kernel.

I suggest you to include (1) + (2) in your current SCSI cleanups.

For applications, we must find some way for the direction to be passed to 
the kernel without breaking compatibility.

G�rard.


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

Reply via email to