diff options
author | Sinan Kaya <okaya@codeaurora.org> | 2016-08-31 11:10:28 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-08-31 11:57:32 -0400 |
commit | 55c370e5198e8cf28b1529299e9c1bfe237c9c1e (patch) | |
tree | 8097b01a52958ab06e950e69eae052d2f8859a7a | |
parent | 8a31f8b5db65b860fd0d358dc27f6daf26074406 (diff) |
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: Sinan Kaya <okaya@codeaurora.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/qcom/hidma.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c index b8493bafdb3f..ea24863794b9 100644 --- a/drivers/dma/qcom/hidma.c +++ b/drivers/dma/qcom/hidma.c | |||
@@ -126,6 +126,7 @@ static void hidma_process_completed(struct hidma_chan *mchan) | |||
126 | list_for_each_entry_safe(mdesc, next, &list, node) { | 126 | list_for_each_entry_safe(mdesc, next, &list, node) { |
127 | enum dma_status llstat; | 127 | enum dma_status llstat; |
128 | struct dmaengine_desc_callback cb; | 128 | struct dmaengine_desc_callback cb; |
129 | struct dmaengine_result result; | ||
129 | 130 | ||
130 | desc = &mdesc->desc; | 131 | desc = &mdesc->desc; |
131 | 132 | ||
@@ -141,10 +142,15 @@ static void hidma_process_completed(struct hidma_chan *mchan) | |||
141 | 142 | ||
142 | spin_lock_irqsave(&mchan->lock, irqflags); | 143 | spin_lock_irqsave(&mchan->lock, irqflags); |
143 | list_move(&mdesc->node, &mchan->free); | 144 | list_move(&mdesc->node, &mchan->free); |
144 | spin_unlock_irqrestore(&mchan->lock, irqflags); | ||
145 | 145 | ||
146 | if (llstat == DMA_COMPLETE) | 146 | if (llstat == DMA_COMPLETE) |
147 | dmaengine_desc_callback_invoke(&cb, NULL); | 147 | result.result = DMA_TRANS_NOERROR; |
148 | else | ||
149 | result.result = DMA_TRANS_ABORTED; | ||
150 | |||
151 | spin_unlock_irqrestore(&mchan->lock, irqflags); | ||
152 | |||
153 | dmaengine_desc_callback_invoke(&cb, &result); | ||
148 | } | 154 | } |
149 | } | 155 | } |
150 | 156 | ||