From patchwork Thu Jul 13 15:15:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Bourgoin X-Patchwork-Id: 119997 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1920733vqm; Thu, 13 Jul 2023 09:00:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlEQkmx7zXEL+/XzymVSLnPXDw2+dYRRk2/gZsTSEpg5n+mMxNlxjIwFf6Ud/P/uiFZFJpR/ X-Received: by 2002:a17:902:e882:b0:1b6:6b90:7c2f with SMTP id w2-20020a170902e88200b001b66b907c2fmr1764080plg.55.1689264029349; Thu, 13 Jul 2023 09:00:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689264029; cv=none; d=google.com; s=arc-20160816; b=wp8Nv3JAtKcSPO8iBxjmGC9Bccq0P2QQrm2U4LQvQC5YWixcUs3ZMExKuodT8bjMIe GR7JiVskH+YYwlO6PGJ9N0iMuYvbeb612ZP5aojiSXZXRKVtiVa2kfjL2PfnOc4+8FE6 F8psfxjvyvyIFkEf+8lCLONBmE14HzGU2WrsQV2p55wtcn6rqZeXNLq25BWte8qLhUTF rkGFVeoR1fzT9EL7jnZ1pqab+pGQXD3l007HEmNtHGbdHqXvNEtwVszJBeuwtrNK/YI/ z+ah/Wwh2fw87jSXQ1BAnUS5h8woC1FnWJo0K6BJXRbkM2OFUDX7U5zzfVPmiGqRvfM9 QnDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9F6WErzaW9yZms4oqilaaA1OMFfEi8u05w2TDpODLdQ=; fh=h4nnPKYwneAM8ktZXW2IGzF/vXr31bIFHUsmxzT7KKA=; b=UuSvTqc0VS0jHgXWwdUWQkvSlEOqocI7bqwYEhQFZA9s7NDLuT455Svb6D3LknYd6M Aplz94JpC5Dvlok7SBMqY1cT+TwzZzLO3GsFINWyKR+6zCMWsLR6MqFSKwoH6S1pH6W0 Wy5GJqHvMRy47Eim7ZuR4nxw0d3iXfj57dBckHNJx2GT/lc5gz+FtoIdCgPcJqNmLxsJ Ua9m7KQUHSnFKnwQDVmPsFAWs+tVU6D1HYSG1KwY6NzO2hd+nVH4YnVcVT86MGlR9YVr pw4JexefrYAzuGsBrNdrsjFncAE4f9SlPIyo/YVPDPi0Z31aLZvxXZPh70fpbhA/GJfe lKsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=BxnAvAsV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m16-20020a170902db1000b001b87b17cfb4si5580354plx.392.2023.07.13.09.00.13; Thu, 13 Jul 2023 09:00:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=BxnAvAsV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234995AbjGMPe2 (ORCPT + 99 others); Thu, 13 Jul 2023 11:34:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234860AbjGMPeM (ORCPT ); Thu, 13 Jul 2023 11:34:12 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C17432721; Thu, 13 Jul 2023 08:34:10 -0700 (PDT) Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36DE76Xf025621; Thu, 13 Jul 2023 17:33:54 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=selector1; bh=9F6WErzaW9yZms4oqilaaA1OMFfEi8u05w2TDpODLdQ=; b=BxnAvAsVA1ARCXH+hP7D77fDRADWd8rY2vs2SR81btppIzV157crx8j60RomTdlIDbOq gwtZSmxJnU2YDODfyAJFwchoUf4Bha8g+lsW9Ime6MSdf3DSXJao4PbOEArayRzBV5AL oIzzwCcI+UNxpmEPuTnye7MhSudnNUyybKf2aX/nSLBIfci+aBGlwrcLJ0D+d30kcVnr TWIyw+DMs+bYkHU4tDvQ8Dhhl88mCozjJgyk7nnnCbOp+Y3J/JvWLvihIe2/uYMFQ+ro Tm6fojmYkCfj3dSD57O63CZjhcvRcx4P6xu0sX8zKmTIYwbA63lEO6pSsDItIKuJ7AHB 9A== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3rtjrc8h8r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jul 2023 17:33:54 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 4E93E100056; Thu, 13 Jul 2023 17:33:54 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 46A9B22A6FF; Thu, 13 Jul 2023 17:33:54 +0200 (CEST) Received: from localhost (10.201.22.9) by SHFDAG1NODE3.st.com (10.75.129.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 13 Jul 2023 17:33:56 +0200 From: Thomas BOURGOIN To: Herbert Xu , "David S . Miller" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Lionel Debieve , Linus Walleij CC: , , , , , Thomas Bourgoin , Subject: [PATCH v2 6/7] crypto: stm32 - fix MDMAT condition Date: Thu, 13 Jul 2023 17:15:17 +0200 Message-ID: <20230713151518.1513949-7-thomas.bourgoin@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230713151518.1513949-1-thomas.bourgoin@foss.st.com> References: <20230713151518.1513949-1-thomas.bourgoin@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.22.9] X-ClientProxiedBy: SHFCAS1NODE1.st.com (10.75.129.72) To SHFDAG1NODE3.st.com (10.75.129.71) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-13_06,2023-07-13_01,2023-05-22_02 X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771321718776004268 X-GMAIL-MSGID: 1771321718776004268 From: Thomas Bourgoin 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 Signed-off-by: Thomas Bourgoin --- Changes in v2: - add Cc: stable@vger.kernel.org in commit message - add Reviewed-by: Linus Walleij drivers/crypto/stm32/stm32-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/stm32/stm32-hash.c b/drivers/crypto/stm32/stm32-hash.c index 701995a72e57..a48e6a14da2e 100644 --- a/drivers/crypto/stm32/stm32-hash.c +++ b/drivers/crypto/stm32/stm32-hash.c @@ -544,7 +544,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