[PATCH 06/12] DMAENGINE: free txd list if submission fails on PL08X

From: Linus Walleij
Date: Tue Aug 31 2010 - 08:13:27 EST


Sometimes oversubscribed channels fail to mux in a signal line for
the transmission, and we bail out. Make sure we also clean out any
pending txd lists when this happens.

Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxxxxxx>
---
drivers/dma/amba-pl08x.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index 65f595c..65892d5 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -1270,6 +1270,7 @@ static dma_cookie_t pl08x_tx_submit(struct dma_async_tx_descriptor *tx)
ret = prep_phy_channel(plchan, txd);
if (ret) {
/* No physical channel available, cope with it */
+ pl08x_free_txd_list(pl08x, plchan);
spin_unlock_irqrestore(&plchan->lock, flags);
return -EBUSY;
}
--
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/