diff options
Diffstat (limited to 'drivers/dma/txx9dmac.c')
| -rw-r--r-- | drivers/dma/txx9dmac.c | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/drivers/dma/txx9dmac.c b/drivers/dma/txx9dmac.c index 71e8e775189e..bae6c29f5502 100644 --- a/drivers/dma/txx9dmac.c +++ b/drivers/dma/txx9dmac.c | |||
| @@ -419,30 +419,7 @@ txx9dmac_descriptor_complete(struct txx9dmac_chan *dc, | |||
| 419 | list_splice_init(&desc->tx_list, &dc->free_list); | 419 | list_splice_init(&desc->tx_list, &dc->free_list); |
| 420 | list_move(&desc->desc_node, &dc->free_list); | 420 | list_move(&desc->desc_node, &dc->free_list); |
| 421 | 421 | ||
| 422 | if (!ds) { | 422 | dma_descriptor_unmap(txd); |
| 423 | dma_addr_t dmaaddr; | ||
| 424 | if (!(txd->flags & DMA_COMPL_SKIP_DEST_UNMAP)) { | ||
| 425 | dmaaddr = is_dmac64(dc) ? | ||
| 426 | desc->hwdesc.DAR : desc->hwdesc32.DAR; | ||
| 427 | if (txd->flags & DMA_COMPL_DEST_UNMAP_SINGLE) | ||
| 428 | dma_unmap_single(chan2parent(&dc->chan), | ||
| 429 | dmaaddr, desc->len, DMA_FROM_DEVICE); | ||
| 430 | else | ||
| 431 | dma_unmap_page(chan2parent(&dc->chan), | ||
| 432 | dmaaddr, desc->len, DMA_FROM_DEVICE); | ||
| 433 | } | ||
| 434 | if (!(txd->flags & DMA_COMPL_SKIP_SRC_UNMAP)) { | ||
| 435 | dmaaddr = is_dmac64(dc) ? | ||
| 436 | desc->hwdesc.SAR : desc->hwdesc32.SAR; | ||
| 437 | if (txd->flags & DMA_COMPL_SRC_UNMAP_SINGLE) | ||
| 438 | dma_unmap_single(chan2parent(&dc->chan), | ||
| 439 | dmaaddr, desc->len, DMA_TO_DEVICE); | ||
| 440 | else | ||
| 441 | dma_unmap_page(chan2parent(&dc->chan), | ||
| 442 | dmaaddr, desc->len, DMA_TO_DEVICE); | ||
| 443 | } | ||
| 444 | } | ||
| 445 | |||
| 446 | /* | 423 | /* |
| 447 | * The API requires that no submissions are done from a | 424 | * The API requires that no submissions are done from a |
| 448 | * callback, so we don't need to drop the lock here | 425 | * callback, so we don't need to drop the lock here |
| @@ -962,8 +939,8 @@ txx9dmac_tx_status(struct dma_chan *chan, dma_cookie_t cookie, | |||
| 962 | enum dma_status ret; | 939 | enum dma_status ret; |
| 963 | 940 | ||
| 964 | ret = dma_cookie_status(chan, cookie, txstate); | 941 | ret = dma_cookie_status(chan, cookie, txstate); |
| 965 | if (ret == DMA_SUCCESS) | 942 | if (ret == DMA_COMPLETE) |
| 966 | return DMA_SUCCESS; | 943 | return DMA_COMPLETE; |
| 967 | 944 | ||
| 968 | spin_lock_bh(&dc->lock); | 945 | spin_lock_bh(&dc->lock); |
| 969 | txx9dmac_scan_descriptors(dc); | 946 | txx9dmac_scan_descriptors(dc); |
