[PATCH v2 2/2] dmaengine: Add hisilicon k3 DMA engine driver

Vinod Koul vinod.koul at intel.com
Wed Aug 21 00:58:23 EDT 2013


On Tue, Aug 20, 2013 at 09:36:50PM +0800, zhangfei gao wrote:
> > and how do you handle when the desc is running on a phy.
> 
> Currently k3dma is used with uart.
> 
> drivers/tty/serial/amba-pl011.c
> pl011_dma_rx_irq: dmaengine_pause -> device_tx_status
> First pause channel, then get residue.
> k3_dma_tx_status:
> a) if desc in issue queue, then it still not started, return total size.
> b) otherwise get the residue via counting descriptor.
> pl011 get the residue and recaculate the pending.
Okay thanks, While looks like for uart this is usage (note this driver doesnt not
call resume. So for that you dont need resume to be implemented.

Also, the driver will call the residue and then terminate always. So again I dont
see a point of yours with what your are doing with descriptors.

And since you support PAUSE/RESUME, if someone tries to use this with sound,
this will break as sound will call pause and then resume. No resubmitting or
terminating.

> Have pass the stress test with amba-pl011.
See the example of amba-pl08x.c, I think Linux W had this in mind when he added
this and other exapmple of PAUSE and RESUME implemented in drivers

Also, again you PAUSE a channel not a trancation, so it doesnt not really matter
where the descriptor is. In phy or somehwere else! We shouldnt care

~Vinod



More information about the linux-arm-kernel mailing list