diff options
Diffstat (limited to 'crypto/async_tx/async_xor.c')
-rw-r--r-- | crypto/async_tx/async_xor.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/async_tx/async_xor.c b/crypto/async_tx/async_xor.c index db279872ef3d..b459a9034aac 100644 --- a/crypto/async_tx/async_xor.c +++ b/crypto/async_tx/async_xor.c | |||
@@ -193,7 +193,7 @@ async_xor(struct page *dest, struct page **src_list, unsigned int offset, | |||
193 | else if (sizeof(dma_addr_t) <= sizeof(struct page *)) | 193 | else if (sizeof(dma_addr_t) <= sizeof(struct page *)) |
194 | dma_src = (dma_addr_t *) src_list; | 194 | dma_src = (dma_addr_t *) src_list; |
195 | 195 | ||
196 | if (dma_src && chan) { | 196 | if (dma_src && chan && is_dma_xor_aligned(chan->device, offset, 0, len)) { |
197 | /* run the xor asynchronously */ | 197 | /* run the xor asynchronously */ |
198 | pr_debug("%s (async): len: %zu\n", __func__, len); | 198 | pr_debug("%s (async): len: %zu\n", __func__, len); |
199 | 199 | ||
@@ -265,7 +265,8 @@ async_xor_val(struct page *dest, struct page **src_list, unsigned int offset, | |||
265 | else if (sizeof(dma_addr_t) <= sizeof(struct page *)) | 265 | else if (sizeof(dma_addr_t) <= sizeof(struct page *)) |
266 | dma_src = (dma_addr_t *) src_list; | 266 | dma_src = (dma_addr_t *) src_list; |
267 | 267 | ||
268 | if (dma_src && device && src_cnt <= device->max_xor) { | 268 | if (dma_src && device && src_cnt <= device->max_xor && |
269 | is_dma_xor_aligned(device, offset, 0, len)) { | ||
269 | unsigned long dma_prep_flags = 0; | 270 | unsigned long dma_prep_flags = 0; |
270 | int i; | 271 | int i; |
271 | 272 | ||