Skip to contentSkip to conversation

How is dmaengine_prep_slave_single supposed to be used?

DISCUSSION Lars-Peter Clausen 2 participants 2 messages Jan 27, 2012 – Jan 30, 2012

lore
Share & tools
lore
#0 lore raw

Hi,

I've tried using dmaengine_prep_slave_single in one of my drivers an run into an issue, the dma_address attribute of the sg element is not initialized and thus the dma transfer and the DMA transfer fails.

Quoting from Documentation/dmaengine.txt:

The peripheral driver is expected to have mapped the scatterlist for the DMA operation prior to calling device_prep_slave_sg, and must keep the scatterlist mapped until the DMA operation has completed.

So this is clearly not the case with dmaengine_prep_slave_single, so I'm wondering how is ut supposed to be used and can it work properly at all?

Thanks,
- Lars

#1 lore raw
Quoted 6 lines · Lars-Peter Clausen

Hi,

I've tried using dmaengine_prep_slave_single in one of my drivers an run into an issue, the dma_address attribute of the sg element is not initialized and thus the dma transfer and the DMA transfer fails.

Quoted 9 lines

Quoting from Documentation/dmaengine.txt:

The peripheral driver is expected to have mapped the scatterlist for the DMA operation prior to calling device_prep_slave_sg, and must keep the scatterlist mapped until the DMA operation has completed.

So this is clearly not the case with dmaengine_prep_slave_single, so I'm wondering how is ut supposed to be used and can it work properly at all?

Yes this is broken now, I will fix this up

Signature · 1 line
~Vinod