提交 55c370e5 编写于 作者: S Sinan Kaya 提交者: Vinod Koul

dmaengine: qcom_hidma: report transfer errors with new interface

Pass the DMA errors to the client by passing a result argument. The HW only
supports a generic error when something goes wrong. That's why, using
DMA_TRANS_ABORTED all the time.
Signed-off-by: NSinan Kaya <okaya@codeaurora.org>
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
上级 8a31f8b5
......@@ -126,6 +126,7 @@ static void hidma_process_completed(struct hidma_chan *mchan)
list_for_each_entry_safe(mdesc, next, &list, node) {
enum dma_status llstat;
struct dmaengine_desc_callback cb;
struct dmaengine_result result;
desc = &mdesc->desc;
......@@ -141,10 +142,15 @@ static void hidma_process_completed(struct hidma_chan *mchan)
spin_lock_irqsave(&mchan->lock, irqflags);
list_move(&mdesc->node, &mchan->free);
spin_unlock_irqrestore(&mchan->lock, irqflags);
if (llstat == DMA_COMPLETE)
dmaengine_desc_callback_invoke(&cb, NULL);
result.result = DMA_TRANS_NOERROR;
else
result.result = DMA_TRANS_ABORTED;
spin_unlock_irqrestore(&mchan->lock, irqflags);
dmaengine_desc_callback_invoke(&cb, &result);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册