diff options
Diffstat (limited to 'crypto/async_tx/async_raid6_recov.c')
-rw-r--r-- | crypto/async_tx/async_raid6_recov.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crypto/async_tx/async_raid6_recov.c b/crypto/async_tx/async_raid6_recov.c index 822a42d10061..6d73dde4786d 100644 --- a/crypto/async_tx/async_raid6_recov.c +++ b/crypto/async_tx/async_raid6_recov.c | |||
@@ -55,6 +55,13 @@ async_sum_product(struct page *dest, struct page **srcs, unsigned char *coef, | |||
55 | async_tx_submit(chan, tx, submit); | 55 | async_tx_submit(chan, tx, submit); |
56 | return tx; | 56 | return tx; |
57 | } | 57 | } |
58 | |||
59 | /* could not get a descriptor, unmap and fall through to | ||
60 | * the synchronous path | ||
61 | */ | ||
62 | dma_unmap_page(dev, dma_dest[1], len, DMA_BIDIRECTIONAL); | ||
63 | dma_unmap_page(dev, dma_src[0], len, DMA_TO_DEVICE); | ||
64 | dma_unmap_page(dev, dma_src[1], len, DMA_TO_DEVICE); | ||
58 | } | 65 | } |
59 | 66 | ||
60 | /* run the operation synchronously */ | 67 | /* run the operation synchronously */ |
@@ -101,6 +108,12 @@ async_mult(struct page *dest, struct page *src, u8 coef, size_t len, | |||
101 | async_tx_submit(chan, tx, submit); | 108 | async_tx_submit(chan, tx, submit); |
102 | return tx; | 109 | return tx; |
103 | } | 110 | } |
111 | |||
112 | /* could not get a descriptor, unmap and fall through to | ||
113 | * the synchronous path | ||
114 | */ | ||
115 | dma_unmap_page(dev, dma_dest[1], len, DMA_BIDIRECTIONAL); | ||
116 | dma_unmap_page(dev, dma_src[0], len, DMA_TO_DEVICE); | ||
104 | } | 117 | } |
105 | 118 | ||
106 | /* no channel available, or failed to allocate a descriptor, so | 119 | /* no channel available, or failed to allocate a descriptor, so |