From: Romain Perier <romain.perier@free-electrons.com> To: Boris Brezillon <boris.brezillon@free-electrons.com>, Arnaud Ebalard <arno@natisbad.org> Cc: Gregory Clement <gregory.clement@free-electrons.com>, Thomas Petazzoni <thomas.petazzoni@free-electrons.com>, "David S. Miller" <davem@davemloft.net>, Russell King <linux@arm.linux.org.uk>, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 03/10] crypto: marvell: Fix wrong type check in dma functions Date: Tue, 21 Jun 2016 10:08:33 +0200 [thread overview] Message-ID: <1466496520-28806-4-git-send-email-romain.perier@free-electrons.com> (raw) In-Reply-To: <1466496520-28806-1-git-send-email-romain.perier@free-electrons.com> So far, the way that the type of a TDMA operation was checked was wrong. We have to use the type mask in order to get the right part of the flag containing the type of the operation. Signed-off-by: Romain Perier <romain.perier@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> --- drivers/crypto/marvell/tdma.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/marvell/tdma.c b/drivers/crypto/marvell/tdma.c index 8c86bb6..de8c253 100644 --- a/drivers/crypto/marvell/tdma.c +++ b/drivers/crypto/marvell/tdma.c @@ -64,8 +64,9 @@ void mv_cesa_dma_cleanup(struct mv_cesa_tdma_req *dreq) for (tdma = dreq->chain.first; tdma;) { struct mv_cesa_tdma_desc *old_tdma = tdma; + u32 type = tdma->flags & CESA_TDMA_TYPE_MSK; - if (tdma->flags & CESA_TDMA_OP) + if (type == CESA_TDMA_OP) dma_pool_free(cesa_dev->dma->op_pool, tdma->op, le32_to_cpu(tdma->src)); @@ -90,7 +91,7 @@ void mv_cesa_dma_prepare(struct mv_cesa_tdma_req *dreq, if (tdma->flags & CESA_TDMA_SRC_IN_SRAM) tdma->src = cpu_to_le32(tdma->src + engine->sram_dma); - if (tdma->flags & CESA_TDMA_OP) + if ((tdma->flags & CESA_TDMA_TYPE_MSK) == CESA_TDMA_OP) mv_cesa_adjust_op(engine, tdma->op); } } -- 2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: romain.perier@free-electrons.com (Romain Perier) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 03/10] crypto: marvell: Fix wrong type check in dma functions Date: Tue, 21 Jun 2016 10:08:33 +0200 [thread overview] Message-ID: <1466496520-28806-4-git-send-email-romain.perier@free-electrons.com> (raw) In-Reply-To: <1466496520-28806-1-git-send-email-romain.perier@free-electrons.com> So far, the way that the type of a TDMA operation was checked was wrong. We have to use the type mask in order to get the right part of the flag containing the type of the operation. Signed-off-by: Romain Perier <romain.perier@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> --- drivers/crypto/marvell/tdma.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/marvell/tdma.c b/drivers/crypto/marvell/tdma.c index 8c86bb6..de8c253 100644 --- a/drivers/crypto/marvell/tdma.c +++ b/drivers/crypto/marvell/tdma.c @@ -64,8 +64,9 @@ void mv_cesa_dma_cleanup(struct mv_cesa_tdma_req *dreq) for (tdma = dreq->chain.first; tdma;) { struct mv_cesa_tdma_desc *old_tdma = tdma; + u32 type = tdma->flags & CESA_TDMA_TYPE_MSK; - if (tdma->flags & CESA_TDMA_OP) + if (type == CESA_TDMA_OP) dma_pool_free(cesa_dev->dma->op_pool, tdma->op, le32_to_cpu(tdma->src)); @@ -90,7 +91,7 @@ void mv_cesa_dma_prepare(struct mv_cesa_tdma_req *dreq, if (tdma->flags & CESA_TDMA_SRC_IN_SRAM) tdma->src = cpu_to_le32(tdma->src + engine->sram_dma); - if (tdma->flags & CESA_TDMA_OP) + if ((tdma->flags & CESA_TDMA_TYPE_MSK) == CESA_TDMA_OP) mv_cesa_adjust_op(engine, tdma->op); } } -- 2.7.4
next prev parent reply other threads:[~2016-06-21 8:09 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-06-21 8:08 [PATCH v3 00/10] Chain crypto requests together at the DMA level Romain Perier 2016-06-21 8:08 ` Romain Perier 2016-06-21 8:08 ` [PATCH v3 01/10] crypto: marvell: Add a macro constant for the size of the crypto queue Romain Perier 2016-06-21 8:08 ` Romain Perier 2016-06-21 8:08 ` [PATCH v3 02/10] crypto: marvell: Check engine is not already running when enabling a req Romain Perier 2016-06-21 8:08 ` Romain Perier 2016-06-22 10:33 ` Herbert Xu 2016-06-22 10:33 ` Herbert Xu 2016-06-22 11:23 ` Romain Perier 2016-06-22 11:23 ` Romain Perier 2016-06-23 10:44 ` Herbert Xu 2016-06-23 10:44 ` Herbert Xu 2016-06-21 8:08 ` Romain Perier [this message] 2016-06-21 8:08 ` [PATCH v3 03/10] crypto: marvell: Fix wrong type check in dma functions Romain Perier 2016-06-21 8:08 ` [PATCH v3 04/10] crypto: marvell: Copy IV vectors by DMA transfers for acipher requests Romain Perier 2016-06-21 8:08 ` Romain Perier 2016-06-21 8:08 ` [PATCH v3 05/10] crypto: marvell: Move tdma chain out of mv_cesa_tdma_req and remove it Romain Perier 2016-06-21 8:08 ` Romain Perier 2016-06-21 8:08 ` [PATCH v3 06/10] crypto: marvell: Add a complete operation for async requests Romain Perier 2016-06-21 8:08 ` Romain Perier 2016-06-21 8:08 ` [PATCH v3 07/10] crypto: marvell: Move SRAM I/O operations to step functions Romain Perier 2016-06-21 8:08 ` Romain Perier 2016-06-21 8:08 ` [PATCH v3 08/10] crypto: marvell: Add load balancing between engines Romain Perier 2016-06-21 8:08 ` Romain Perier 2016-06-21 12:33 ` Boris Brezillon 2016-06-21 12:33 ` Boris Brezillon 2016-06-21 8:08 ` [PATCH v3 09/10] crypto: marvell: Add support for chaining crypto requests in TDMA mode Romain Perier 2016-06-21 8:08 ` Romain Perier 2016-06-21 12:37 ` Boris Brezillon 2016-06-21 12:37 ` Boris Brezillon 2016-06-21 8:08 ` [PATCH v3 10/10] crypto: marvell: Increase the size of the crypto queue Romain Perier 2016-06-21 8:08 ` Romain Perier
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1466496520-28806-4-git-send-email-romain.perier@free-electrons.com \ --to=romain.perier@free-electrons.com \ --cc=arno@natisbad.org \ --cc=boris.brezillon@free-electrons.com \ --cc=davem@davemloft.net \ --cc=gregory.clement@free-electrons.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-crypto@vger.kernel.org \ --cc=linux@arm.linux.org.uk \ --cc=thomas.petazzoni@free-electrons.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.