Re: [PATCH] dmaengine: pl330: Fix some race conditions in residue calculation

2016-03-15 Thread Jon Medhurst (Tixy)
On Fri, 2016-03-11 at 13:13 +0530, Vinod Koul wrote: > On Tue, Mar 08, 2016 at 03:50:41PM +, Jon Medhurst (Tixy) wrote: > > > > The reside is requested for "a descriptor". For example if you have > > > prepared > > > two descriptors A and B and submitted them, then you can request status >

Re: [PATCH] dmaengine: pl330: Fix some race conditions in residue calculation

2016-03-15 Thread Jon Medhurst (Tixy)
On Fri, 2016-03-11 at 13:13 +0530, Vinod Koul wrote: > On Tue, Mar 08, 2016 at 03:50:41PM +, Jon Medhurst (Tixy) wrote: > > > > The reside is requested for "a descriptor". For example if you have > > > prepared > > > two descriptors A and B and submitted them, then you can request status >

Re: [PATCH] dmaengine: pl330: Fix some race conditions in residue calculation

2016-03-10 Thread Vinod Koul
On Tue, Mar 08, 2016 at 03:50:41PM +, Jon Medhurst (Tixy) wrote: > > The reside is requested for "a descriptor". For example if you have prepared > > two descriptors A and B and submitted them, then you can request status and > > reside for A and you need to calculate that for A only and not

Re: [PATCH] dmaengine: pl330: Fix some race conditions in residue calculation

2016-03-10 Thread Vinod Koul
On Tue, Mar 08, 2016 at 03:50:41PM +, Jon Medhurst (Tixy) wrote: > > The reside is requested for "a descriptor". For example if you have prepared > > two descriptors A and B and submitted them, then you can request status and > > reside for A and you need to calculate that for A only and not

Re: [PATCH] dmaengine: pl330: Fix some race conditions in residue calculation

2016-03-08 Thread Jon Medhurst (Tixy)
On Tue, 2016-03-08 at 19:45 +0530, Vinod Koul wrote: > On Tue, Mar 08, 2016 at 10:40:11AM +, Jon Medhurst (Tixy) wrote: > > On Tue, 2016-03-08 at 09:42 +0530, Vinod Koul wrote: > > > On Wed, Feb 24, 2016 at 01:14:34PM +, Jon Medhurst (Tixy) wrote: > > > > The residue calculation in

Re: [PATCH] dmaengine: pl330: Fix some race conditions in residue calculation

2016-03-08 Thread Jon Medhurst (Tixy)
On Tue, 2016-03-08 at 19:45 +0530, Vinod Koul wrote: > On Tue, Mar 08, 2016 at 10:40:11AM +, Jon Medhurst (Tixy) wrote: > > On Tue, 2016-03-08 at 09:42 +0530, Vinod Koul wrote: > > > On Wed, Feb 24, 2016 at 01:14:34PM +, Jon Medhurst (Tixy) wrote: > > > > The residue calculation in

Re: [PATCH] dmaengine: pl330: Fix some race conditions in residue calculation

2016-03-08 Thread Vinod Koul
On Tue, Mar 08, 2016 at 10:40:11AM +, Jon Medhurst (Tixy) wrote: > On Tue, 2016-03-08 at 09:42 +0530, Vinod Koul wrote: > > On Wed, Feb 24, 2016 at 01:14:34PM +, Jon Medhurst (Tixy) wrote: > > > The residue calculation in pl330_tx_status doesn't handle transitional > > > states that occur

Re: [PATCH] dmaengine: pl330: Fix some race conditions in residue calculation

2016-03-08 Thread Vinod Koul
On Tue, Mar 08, 2016 at 10:40:11AM +, Jon Medhurst (Tixy) wrote: > On Tue, 2016-03-08 at 09:42 +0530, Vinod Koul wrote: > > On Wed, Feb 24, 2016 at 01:14:34PM +, Jon Medhurst (Tixy) wrote: > > > The residue calculation in pl330_tx_status doesn't handle transitional > > > states that occur

Re: [PATCH] dmaengine: pl330: Fix some race conditions in residue calculation

2016-03-08 Thread Jon Medhurst (Tixy)
On Tue, 2016-03-08 at 09:42 +0530, Vinod Koul wrote: > On Wed, Feb 24, 2016 at 01:14:34PM +, Jon Medhurst (Tixy) wrote: > > The residue calculation in pl330_tx_status doesn't handle transitional > > states that occur at the time one descriptor (A) is completed and the > > next (B) is started.

Re: [PATCH] dmaengine: pl330: Fix some race conditions in residue calculation

2016-03-08 Thread Jon Medhurst (Tixy)
On Tue, 2016-03-08 at 09:42 +0530, Vinod Koul wrote: > On Wed, Feb 24, 2016 at 01:14:34PM +, Jon Medhurst (Tixy) wrote: > > The residue calculation in pl330_tx_status doesn't handle transitional > > states that occur at the time one descriptor (A) is completed and the > > next (B) is started.

Re: [PATCH] dmaengine: pl330: Fix some race conditions in residue calculation

2016-03-07 Thread Vinod Koul
On Wed, Feb 24, 2016 at 01:14:34PM +, Jon Medhurst (Tixy) wrote: > The residue calculation in pl330_tx_status doesn't handle transitional > states that occur at the time one descriptor (A) is completed and the > next (B) is started. Specifically, both A and B can simultaneously be in > the

Re: [PATCH] dmaengine: pl330: Fix some race conditions in residue calculation

2016-03-07 Thread Vinod Koul
On Wed, Feb 24, 2016 at 01:14:34PM +, Jon Medhurst (Tixy) wrote: > The residue calculation in pl330_tx_status doesn't handle transitional > states that occur at the time one descriptor (A) is completed and the > next (B) is started. Specifically, both A and B can simultaneously be in > the

[PATCH] dmaengine: pl330: Fix some race conditions in residue calculation

2016-02-24 Thread Jon Medhurst (Tixy)
The residue calculation in pl330_tx_status doesn't handle transitional states that occur at the time one descriptor (A) is completed and the next (B) is started. Specifically, both A and B can simultaneously be in the BUSY state and at this time the thread's 'req_running' may (or may not) be -1.

[PATCH] dmaengine: pl330: Fix some race conditions in residue calculation

2016-02-24 Thread Jon Medhurst (Tixy)
The residue calculation in pl330_tx_status doesn't handle transitional states that occur at the time one descriptor (A) is completed and the next (B) is started. Specifically, both A and B can simultaneously be in the BUSY state and at this time the thread's 'req_running' may (or may not) be -1.