Re: [PATCH 5/5] tcm_qla2xxx: Fix confusion about DMA mapping direction

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

 



On Tue, Aug 16, 2011 at 2:35 PM, Boaz Harrosh <bharrosh@xxxxxxxxxxx> wrote:
> On 08/16/2011 02:09 PM, Nicholas A. Bellinger wrote:
> <snip>
>>> +static enum dma_data_direction tcm_qla2xxx_mapping_dir(struct se_cmd *se_cmd)
>>> +{
>>> +    if (se_cmd->t_tasks_bidi)
>>> +            return DMA_BIDIRECTIONAL;
>>> +
>>
>> Mmmm, I don't think this is correct.  It's my understanding that
>> DMA_BIDIRECTIONAL is different from SCSI bidi operation, and that the
>> individual bidi payloads should be retaining their individual
>> DMA_FROM_DEVICE and DMA_TO_DEVICE usage..  (Boaz CC'ed)
>
> Yes! DMA_BIDIRECTIONAL means that the same direct-access buffer could
> be written to and read from at the same time. For example a shared
> host-DSP buffer could be that case. It tells the (true) IOMMU to
> let both type of access on this single buffer.

OK, fair enough.  However I don't see where the cmd->data_direction gets
changed from TO_DEVICE to FROM_DEVICE for the two phases.  How does
that happen?

Do bidi commands work at all with the qla2xxx target?

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


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux