]> git.hungrycats.org Git - linux/commitdiff
crypto: stm32 - fix MDMAT condition
authorThomas Bourgoin <thomas.bourgoin@foss.st.com>
Thu, 13 Jul 2023 15:15:17 +0000 (17:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:48:43 +0000 (09:48 +0200)
commit a4adfbc2544933ac12e7fbd50708290265546dbc upstream.

If IP has MDMAT support, set or reset the bit MDMAT in Control Register.

Fixes: b56403a25af7 ("crypto: stm32/hash - Support Ux500 hash")
Cc: stable@vger.kernel.org
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Thomas Bourgoin <thomas.bourgoin@foss.st.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/stm32/stm32-hash.c

index 9760fca94eb55c6f88ec7118db1d1ae53db03511..fabae6da627b9806fef37c296d43cada5f2a5d91 100644 (file)
@@ -492,7 +492,7 @@ static int stm32_hash_xmit_dma(struct stm32_hash_dev *hdev,
 
        reg = stm32_hash_read(hdev, HASH_CR);
 
-       if (!hdev->pdata->has_mdmat) {
+       if (hdev->pdata->has_mdmat) {
                if (mdma)
                        reg |= HASH_CR_MDMAT;
                else