summaryrefslogtreecommitdiff
path: root/crypto/async_tx/async_memcpy.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-09-08 17:42:53 -0700
committerDan Williams <dan.j.williams@intel.com>2009-09-08 17:42:53 -0700
commite7b436f1a4f24f5de8f0ccd4ec643c771d5e9f8a (patch)
treeaa9aad503c28e8aeb5c1bbf410cd117c76df9ebf /crypto/async_tx/async_memcpy.c
parent4546ea8f2c1e2d643de2fb70d29aa276a1bc2051 (diff)
downloadlinux-crypto-e7b436f1a4f24f5de8f0ccd4ec643c771d5e9f8a.tar.gz
linux-crypto-e7b436f1a4f24f5de8f0ccd4ec643c771d5e9f8a.zip
dmaengine, async_tx: support alignment checks
Some engines have transfer size and address alignment restrictions. Add a per-operation alignment property to struct dma_device that the async routines and dmatest can use to check alignment capabilities. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'crypto/async_tx/async_memcpy.c')
-rw-r--r--crypto/async_tx/async_memcpy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/async_tx/async_memcpy.c b/crypto/async_tx/async_memcpy.c
index b38cbb3f..0ec1fb69 100644
--- a/crypto/async_tx/async_memcpy.c
+++ b/crypto/async_tx/async_memcpy.c
@@ -50,7 +50,7 @@ async_memcpy(struct page *dest, struct page *src, unsigned int dest_offset,
struct dma_device *device = chan ? chan->device : NULL;
struct dma_async_tx_descriptor *tx = NULL;
- if (device) {
+ if (device && is_dma_copy_aligned(device, src_offset, dest_offset, len)) {
dma_addr_t dma_dest, dma_src;
unsigned long dma_prep_flags = 0;