On 10-10-15, 19:29, Figo wrote: > @@ -1115,8 +1116,11 @@ static void dw_dma_off(struct dw_dma *dw) > channel_clear_bit(dw, MASK.DST_TRAN, dw->all_chan_mask); > channel_clear_bit(dw, MASK.ERROR, dw->all_chan_mask); > > - while (dma_readl(dw, CFG) & DW_CFG_DMA_EN) > - cpu_relax(); > + while ((dma_readl(dw, CFG) & DW_CFG_DMA_EN) && retry--) { > + udelay(100); > + if (retry == 0) > + dev_err(&dw->dma.dev, "%s error :timeout\n", __func__); > + } I will rather write it as: while ((dma_readl(dw, CFG) & DW_CFG_DMA_EN) && --retry) udelay(100); if (retry == 0) dev_err(&dw->dma.dev, "%s error :timeout\n", __func__); -- viresh -- To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html