diff options
author | Gary R Hook <ghook@amd.com> | 2017-03-10 18:28:18 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-30 07:41:26 (GMT) |
commit | b1ef9daa50cc88dfc82fa1646da66550c9c0af3f (patch) | |
tree | f567da39f84940387e9f3caba73a9a033378b609 /drivers/crypto/ccp/ccp-dmaengine.c | |
parent | cb6e07ba5878959d5ebb6189e6e11cc335d914b6 (diff) | |
download | linux-b1ef9daa50cc88dfc82fa1646da66550c9c0af3f.tar.xz |
crypto: ccp - Assign DMA commands to the channel's CCP
commit 7c468447f40645fbf2a033dfdaa92b1957130d50 upstream.
The CCP driver generally uses a round-robin approach when
assigning operations to available CCPs. For the DMA engine,
however, the DMA mappings of the SGs are associated with a
specific CCP. When an IOMMU is enabled, the IOMMU is
programmed based on this specific device.
If the DMA operations are not performed by that specific
CCP then addressing errors and I/O page faults will occur.
Update the CCP driver to allow a specific CCP device to be
requested for an operation and use this in the DMA engine
support.
Signed-off-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/crypto/ccp/ccp-dmaengine.c')
-rw-r--r-- | drivers/crypto/ccp/ccp-dmaengine.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/crypto/ccp/ccp-dmaengine.c b/drivers/crypto/ccp/ccp-dmaengine.c index e5d9278..8d0eeb4 100644 --- a/drivers/crypto/ccp/ccp-dmaengine.c +++ b/drivers/crypto/ccp/ccp-dmaengine.c @@ -390,6 +390,7 @@ static struct ccp_dma_desc *ccp_create_desc(struct dma_chan *dma_chan, goto err; ccp_cmd = &cmd->ccp_cmd; + ccp_cmd->ccp = chan->ccp; ccp_pt = &ccp_cmd->u.passthru_nomap; ccp_cmd->flags = CCP_CMD_MAY_BACKLOG; ccp_cmd->flags |= CCP_CMD_PASSTHRU_NO_DMA_MAP; |