From: Gary R Hook Date: Fri, 27 Jan 2017 21:28:45 +0000 (-0600) Subject: crypto: ccp - Fix DMA operations when IOMMU is enabled X-Git-Tag: v4.1.12-111.0.20170907_2225~47 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=30882534c63311896984d4d48247cf022ea82c4a;p=users%2Fjedix%2Flinux-maple.git crypto: ccp - Fix DMA operations when IOMMU is enabled Orabug: 26644685 An I/O page fault occurs when the IOMMU is enabled on a system that supports the v5 CCP. DMA operations use a Request ID value that does not match what is expected by the IOMMU, resulting in the I/O page fault. Setting the Request ID value to 0 corrects this issue. Cc: Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu (cherry picked from commit 500c0106e638e08c2c661c305ed57d6b67e10908) Signed-off-by: Somasundaram Krishnasamy Reviewed-by: Jack Vogel --- diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c index e2ce8190ecc9a..612898b4aaad0 100644 --- a/drivers/crypto/ccp/ccp-dev-v5.c +++ b/drivers/crypto/ccp/ccp-dev-v5.c @@ -959,7 +959,7 @@ static irqreturn_t ccp5_irq_handler(int irq, void *data) static void ccp5_config(struct ccp_device *ccp) { /* Public side */ - iowrite32(0x00001249, ccp->io_regs + CMD5_REQID_CONFIG_OFFSET); + iowrite32(0x0, ccp->io_regs + CMD5_REQID_CONFIG_OFFSET); } static void ccp5other_config(struct ccp_device *ccp)