Re: [PATCH 0/17] Clear up bidi command confusion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2015-01-29 at 15:00 +0200, Boaz Harrosh wrote:
> On 01/23/2015 03:12 PM, Christoph Hellwig wrote:
> > On Fri, Jan 23, 2015 at 01:05:30PM +0100, Bart Van Assche wrote:
> >> There is some confusion in the SCSI core and in SCSI LLDs around the
> >> meaning of sc_data_direction and whether or not this member can have the
> >> value DMA_BIDIRECTIONAL. Clear up this confusion. The patches in this
> >> series are:
> > 
> > I wonder if we should change the code to set DMA_BIDIRECTIONAL for
> > bidi commands.  That seems a lot more logical than the current
> > version.
> > 
> 
> You cannot do this. Because a Bidi Command is actually two commands
> one for the WRITE side (DMA_TO_DEVICE) which is this one, and another
> command for the READ side (DMA_FROM_DEVICE).

You're not thinking about this the correct way.  DMA_BIDIRECTIONAL is a
DMA engine flag.  We use it in SCSI for historical reasons (mainly to
prevent a translation from the SCSI version).  Since it was never used,
most SCSI drivers have code to check and reject commands with it set.
For actual bidirectional commands, you have to check scsi_bidi_command()
and programme the DMA engine separately for both phases, so the flag is
useless in this case.

The proposal is to make it the signal for bidirectional commands (in
which case most HBAs would make it do the right thing; i.e. reject) but
it still wouldn't be how you'd program the DMA enigne; that still would
have to be done in two phases as it is today.

James


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux