Skip to content

Commit

Permalink
dmaengine: altera: fix response FIFO emptying
Browse files Browse the repository at this point in the history
Commit 6084fc2 ("dmaengine: altera: Use macros instead of structs
to describe the registers") introduced a minus sign before a register
offset.

This leads to soft-locks of the DMA controller, since reading the last
status byte is required to pop the response from the FIFO. Failing to
do so will lead to a full FIFO, which means that the DMA controller
will stop processing descriptors.

Signed-off-by: Sylvain Lesne <lesne@alse-fr.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
Sylvain Lesne authored and Vinod Koul committed Sep 28, 2017
1 parent 2ccb483 commit d9ec464
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/altera-msgdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ static void msgdma_tasklet(unsigned long data)
* bits. So we need to just drop these values.
*/
size = ioread32(mdev->resp + MSGDMA_RESP_BYTES_TRANSFERRED);
status = ioread32(mdev->resp - MSGDMA_RESP_STATUS);
status = ioread32(mdev->resp + MSGDMA_RESP_STATUS);

msgdma_complete_descriptor(mdev);
msgdma_chan_desc_cleanup(mdev);
Expand Down

0 comments on commit d9ec464

Please sign in to comment.