Re: [PATCH] dmaengine: virt-dma: fix completion list manipulation

2015-03-03 Thread Robert Jarzmik
Lars-Peter Clausen writes: > On 03/03/2015 11:27 AM, Robert Jarzmik wrote: >> I still think that their use of virt-dma is incorrect, ie. that at one point >> in >> time a virtual descriptor has to be on exactly one list of virt-dma >> (excepting >> transient critical sections). > > Well the dri

Re: [PATCH] dmaengine: virt-dma: fix completion list manipulation

2015-03-03 Thread Lars-Peter Clausen
On 03/03/2015 11:27 AM, Robert Jarzmik wrote: Lars-Peter Clausen writes: That will break all drivers which handle this currently correctly and remove the descriptor from any list before calling vchan_cookie_complete. Ah, well well I don't agree. First, let's split the drivers which remove th

Re: [PATCH] dmaengine: virt-dma: fix completion list manipulation

2015-03-03 Thread Robert Jarzmik
Lars-Peter Clausen writes: >>> That will break all drivers which handle this currently correctly and >>> remove the >>> descriptor from any list before calling vchan_cookie_complete. >> Ah, well well I don't agree. >> >> First, let's split the drivers which remove the descriptors and these which

Re: [PATCH] dmaengine: virt-dma: fix completion list manipulation

2015-03-02 Thread Lars-Peter Clausen
On 03/02/2015 11:03 PM, Robert Jarzmik wrote: Lars-Peter Clausen writes: On 03/02/2015 10:19 PM, Robert Jarzmik wrote: diff --git a/drivers/dma/virt-dma.h b/drivers/dma/virt-dma.h index 3772032..2a3da22 100644 --- a/drivers/dma/virt-dma.h +++ b/drivers/dma/virt-dma.h @@ -91,7 +91,7 @@ static

Re: [PATCH] dmaengine: virt-dma: fix completion list manipulation

2015-03-02 Thread Robert Jarzmik
Lars-Peter Clausen writes: > On 03/02/2015 10:19 PM, Robert Jarzmik wrote: >> diff --git a/drivers/dma/virt-dma.h b/drivers/dma/virt-dma.h >> index 3772032..2a3da22 100644 >> --- a/drivers/dma/virt-dma.h >> +++ b/drivers/dma/virt-dma.h >> @@ -91,7 +91,7 @@ static inline void vchan_cookie_complete

Re: [PATCH] dmaengine: virt-dma: fix completion list manipulation

2015-03-02 Thread Lars-Peter Clausen
On 03/02/2015 10:19 PM, Robert Jarzmik wrote: diff --git a/drivers/dma/virt-dma.h b/drivers/dma/virt-dma.h index 3772032..2a3da22 100644 --- a/drivers/dma/virt-dma.h +++ b/drivers/dma/virt-dma.h @@ -91,7 +91,7 @@ static inline void vchan_cookie_complete(struct virt_dma_desc *vd) dma_cook

[PATCH] dmaengine: virt-dma: fix completion list manipulation

2015-03-02 Thread Robert Jarzmik
When a transfer is completed, the descriptor is moved from issued list to completed list. Fix the list manipulation, from list_add to list_move_tail. The bug was seen with a multiple descriptors issued and completed lists, where the issued list chaining was corrupted. Signed-off-by: Robert Jarzmi