diff options
Diffstat (limited to 'crypto/async_tx/async_pq.c')
-rw-r--r-- | crypto/async_tx/async_pq.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/async_tx/async_pq.c b/crypto/async_tx/async_pq.c index a25e290c39fb..b88db6d1dc65 100644 --- a/crypto/async_tx/async_pq.c +++ b/crypto/async_tx/async_pq.c | |||
@@ -211,7 +211,8 @@ async_gen_syndrome(struct page **blocks, unsigned int offset, int disks, | |||
211 | 211 | ||
212 | if (dma_src && device && | 212 | if (dma_src && device && |
213 | (src_cnt <= dma_maxpq(device, 0) || | 213 | (src_cnt <= dma_maxpq(device, 0) || |
214 | dma_maxpq(device, DMA_PREP_CONTINUE) > 0)) { | 214 | dma_maxpq(device, DMA_PREP_CONTINUE) > 0) && |
215 | is_dma_pq_aligned(device, offset, 0, len)) { | ||
215 | /* run the p+q asynchronously */ | 216 | /* run the p+q asynchronously */ |
216 | pr_debug("%s: (async) disks: %d len: %zu\n", | 217 | pr_debug("%s: (async) disks: %d len: %zu\n", |
217 | __func__, disks, len); | 218 | __func__, disks, len); |
@@ -274,7 +275,8 @@ async_syndrome_val(struct page **blocks, unsigned int offset, int disks, | |||
274 | else if (sizeof(dma_addr_t) <= sizeof(struct page *)) | 275 | else if (sizeof(dma_addr_t) <= sizeof(struct page *)) |
275 | dma_src = (dma_addr_t *) blocks; | 276 | dma_src = (dma_addr_t *) blocks; |
276 | 277 | ||
277 | if (dma_src && device && disks <= dma_maxpq(device, 0)) { | 278 | if (dma_src && device && disks <= dma_maxpq(device, 0) && |
279 | is_dma_pq_aligned(device, offset, 0, len)) { | ||
278 | struct device *dev = device->dev; | 280 | struct device *dev = device->dev; |
279 | dma_addr_t *pq = &dma_src[disks-2]; | 281 | dma_addr_t *pq = &dma_src[disks-2]; |
280 | int i; | 282 | int i; |