Skip to content

Commit ef2cb4f

Browse files
ambarusvinodkoul
authored andcommitted
dmaengine: at_hdmac: Fix completion of unissued descriptor in case of errors
In case the controller detected an error, the code took the chance to move all the queued (submitted) descriptors to the active (issued) list. This was wrong as if there were any descriptors in the submitted list they were moved to the issued list without actually issuing them to the controller, thus a completion could be raised without even fireing the descriptor. Fixes: dc78baa ("dmaengine: at_hdmac: new driver for the Atmel AHB DMA Controller") Reported-by: Peter Rosin <[email protected]> Signed-off-by: Tudor Ambarus <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/lkml/[email protected]/ Acked-by: Nicolas Ferre <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent ba24236 commit ef2cb4f

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/dma/at_hdmac.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -539,10 +539,6 @@ static void atc_handle_error(struct at_dma_chan *atchan)
539539
bad_desc = atc_first_active(atchan);
540540
list_del_init(&bad_desc->desc_node);
541541

542-
/* As we are stopped, take advantage to push queued descriptors
543-
* in active_list */
544-
list_splice_init(&atchan->queue, atchan->active_list.prev);
545-
546542
/* Try to restart the controller */
547543
if (!list_empty(&atchan->active_list)) {
548544
desc = atc_first_queued(atchan);

0 commit comments

Comments
 (0)