Re: [PATCH v2 4/4] dw_dmac: return proper residue value

2013-01-24 Thread Viresh Kumar
On 24 January 2013 13:31, Andy Shevchenko wrote: > On Thu, 2013-01-24 at 10:37 +0530, Viresh Kumar wrote: >> Is there a point updating residue here? I don't have a very good knowledge of >> nollp transfers but this is what i know... >> >> The above "if" will pass if we are still doing transfers a

Re: [PATCH v2 4/4] dw_dmac: return proper residue value

2013-01-24 Thread Andy Shevchenko
On Thu, 2013-01-24 at 10:37 +0530, Viresh Kumar wrote: > On Wed, Jan 23, 2013 at 9:07 PM, Andy Shevchenko > wrote: > > diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c > > > static void dwc_scan_descriptors(struct dw_dma *dw, struct dw_dma_chan > > *dwc) > > { > > dma_addr_t

Re: [PATCH v2 4/4] dw_dmac: return proper residue value

2013-01-23 Thread Viresh Kumar
On Wed, Jan 23, 2013 at 9:07 PM, Andy Shevchenko wrote: > diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c > static void dwc_scan_descriptors(struct dw_dma *dw, struct dw_dma_chan *dwc) > { > dma_addr_t llp; > @@ -410,6 +441,8 @@ static void dwc_scan_descriptors(struct dw_dma

[PATCH v2 4/4] dw_dmac: return proper residue value

2013-01-23 Thread Andy Shevchenko
Currently the driver returns full length of the active descriptor which is wrong. We have to go throught the active descriptor and substract the length of each sent children in the chain from the total length along with the actual data in the DMA channel registers. The cyclic case is not handled b