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