[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1425331196-7895-1-git-send-email-robert.jarzmik@free.fr>
Date: Mon, 2 Mar 2015 22:19:56 +0100
From: Robert Jarzmik <robert.jarzmik@...e.fr>
To: Vinod Koul <vinod.koul@...el.com>
Cc: dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
Robert Jarzmik <robert.jarzmik@...e.fr>
Subject: [PATCH] dmaengine: virt-dma: fix completion list manipulation
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 Jarzmik <robert.jarzmik@...e.fr>
---
drivers/dma/virt-dma.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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_cookie_complete(&vd->tx);
dev_vdbg(vc->chan.device->dev, "txd %p[%x]: marked complete\n",
vd, cookie);
- list_add_tail(&vd->node, &vc->desc_completed);
+ list_move_tail(&vd->node, &vc->desc_completed);
tasklet_schedule(&vc->task);
}
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists