diff options
-rw-r--r-- | drivers/usb/musb/musb_cppi41.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c index f7d3d27fd2c1..1fe7eaeb097b 100644 --- a/drivers/usb/musb/musb_cppi41.c +++ b/drivers/usb/musb/musb_cppi41.c | |||
@@ -99,7 +99,8 @@ static bool musb_is_tx_fifo_empty(struct musb_hw_ep *hw_ep) | |||
99 | return true; | 99 | return true; |
100 | } | 100 | } |
101 | 101 | ||
102 | static void cppi41_dma_callback(void *private_data); | 102 | static void cppi41_dma_callback(void *private_data, |
103 | const struct dmaengine_result *result); | ||
103 | 104 | ||
104 | static void cppi41_trans_done(struct cppi41_dma_channel *cppi41_channel) | 105 | static void cppi41_trans_done(struct cppi41_dma_channel *cppi41_channel) |
105 | { | 106 | { |
@@ -154,7 +155,7 @@ static void cppi41_trans_done(struct cppi41_dma_channel *cppi41_channel) | |||
154 | if (WARN_ON(!dma_desc)) | 155 | if (WARN_ON(!dma_desc)) |
155 | return; | 156 | return; |
156 | 157 | ||
157 | dma_desc->callback = cppi41_dma_callback; | 158 | dma_desc->callback_result = cppi41_dma_callback; |
158 | dma_desc->callback_param = &cppi41_channel->channel; | 159 | dma_desc->callback_param = &cppi41_channel->channel; |
159 | cppi41_channel->cookie = dma_desc->tx_submit(dma_desc); | 160 | cppi41_channel->cookie = dma_desc->tx_submit(dma_desc); |
160 | trace_musb_cppi41_cont(cppi41_channel); | 161 | trace_musb_cppi41_cont(cppi41_channel); |
@@ -204,7 +205,8 @@ static enum hrtimer_restart cppi41_recheck_tx_req(struct hrtimer *timer) | |||
204 | return ret; | 205 | return ret; |
205 | } | 206 | } |
206 | 207 | ||
207 | static void cppi41_dma_callback(void *private_data) | 208 | static void cppi41_dma_callback(void *private_data, |
209 | const struct dmaengine_result *result) | ||
208 | { | 210 | { |
209 | struct dma_channel *channel = private_data; | 211 | struct dma_channel *channel = private_data; |
210 | struct cppi41_dma_channel *cppi41_channel = channel->private_data; | 212 | struct cppi41_dma_channel *cppi41_channel = channel->private_data; |
@@ -221,6 +223,9 @@ static void cppi41_dma_callback(void *private_data) | |||
221 | if (controller->controller.dma_callback) | 223 | if (controller->controller.dma_callback) |
222 | controller->controller.dma_callback(&controller->controller); | 224 | controller->controller.dma_callback(&controller->controller); |
223 | 225 | ||
226 | if (result->result == DMA_TRANS_ABORTED) | ||
227 | return; | ||
228 | |||
224 | spin_lock_irqsave(&musb->lock, flags); | 229 | spin_lock_irqsave(&musb->lock, flags); |
225 | 230 | ||
226 | dmaengine_tx_status(cppi41_channel->dc, cppi41_channel->cookie, | 231 | dmaengine_tx_status(cppi41_channel->dc, cppi41_channel->cookie, |
@@ -403,7 +408,7 @@ static bool cppi41_configure_channel(struct dma_channel *channel, | |||
403 | if (!dma_desc) | 408 | if (!dma_desc) |
404 | return false; | 409 | return false; |
405 | 410 | ||
406 | dma_desc->callback = cppi41_dma_callback; | 411 | dma_desc->callback_result = cppi41_dma_callback; |
407 | dma_desc->callback_param = channel; | 412 | dma_desc->callback_param = channel; |
408 | cppi41_channel->cookie = dma_desc->tx_submit(dma_desc); | 413 | cppi41_channel->cookie = dma_desc->tx_submit(dma_desc); |
409 | cppi41_channel->channel.rx_packet_done = false; | 414 | cppi41_channel->channel.rx_packet_done = false; |