Received: by 10.223.176.5 with SMTP id f5csp2938139wra; Mon, 29 Jan 2018 06:30:51 -0800 (PST) X-Google-Smtp-Source: AH8x225YF7NPTVzbK2gLlf5G0Xp6Jk6fzqHCC5MiXRJpOerZlJ8mulMw+uTdUxAbhS3Hoa6OEcI2 X-Received: by 10.99.114.5 with SMTP id n5mr21914396pgc.211.1517236251278; Mon, 29 Jan 2018 06:30:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517236251; cv=none; d=google.com; s=arc-20160816; b=FuKX3VCm6BQnKNzBlhH5WVQrEtQDhZswkA8MPtFM8BVKJT5hJ3SV0WBBdkq32UrRTt gwSktm0xlfob7ixqyhx+IuTrxK/Y+anw59+mSxsoPLqcbnIZWr/tclZYFN91fjAoKrH4 ugOJvqFrVn8rbYnjEPIfpoutFdtg6PDs0QwOoiymKy8weG18akDdAM9I6Ma4gL/+eHor AEKze+JW1rcPMgYLNWcbATo7cyQsQwz5a+xsN2VSGxqlfgbBiDy0PwdrsW7mO0gJJlwe pcLCP4KCRYwgrspsp3/nf6h3s98wa1/wTgfhBgVJh+34rnvevv4+wiSou2g+UfJq47bg dV1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=Wjcx2E4GKNfT7r0lE8bT7fSeYAvBxwLL3TonHWiffgo=; b=TRU3fWtCPkrqvXFKrWWtIjmcvGvJGX2/sLSlgZX71xw2bWDrbuqfQ/rqs8iG9/z0Zi 1ITfkM3K6wsup7Sg3OJbhbcBqHwWBa5xi4XV3zKoTlM4IINdu87c/Hig7xDjtglPqEzQ ql3R7iy1BMMVHNM5pj+lt5mjqXWPrAxx4wms+2F5CMxr3tbo6kWD0o4oNVbpthhL8wSX TvlV6fqw9aUYAPwF/VKFjBhxUgX+O0g8ZpKcl/hExd4hQNQ3MiFB8NCaCPGGZ3PCfQob kGP6k3jjztBCG1hateaUL34MP3qAD9nqUfdMkVKw+W1/ApncO0fQKfx+pkRvaCozTtWn pxQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e3-v6si90749plk.542.2018.01.29.06.30.36; Mon, 29 Jan 2018 06:30:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752007AbeA2OaL (ORCPT + 99 others); Mon, 29 Jan 2018 09:30:11 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:46517 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751926AbeA2OaF (ORCPT ); Mon, 29 Jan 2018 09:30:05 -0500 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w0TESgag022562; Mon, 29 Jan 2018 15:29:32 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2frh6j3wr6-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 29 Jan 2018 15:29:32 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 2A74234; Mon, 29 Jan 2018 14:29:32 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag7node2.st.com [10.75.127.20]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 027C52945; Mon, 29 Jan 2018 14:29:32 +0000 (GMT) Received: from lmecxl0602.lme.st.com (10.75.127.46) by SFHDAG7NODE2.st.com (10.75.127.20) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 29 Jan 2018 15:29:31 +0100 From: Lionel Debieve To: Herbert Xu , "David S . Miller" , Maxime Coquelin , Alexandre Torgue , , , CC: Benjamin Gaignard , Fabien Dessenne , Ludovic Barre , Lionel Debieve Subject: [PATCH 3/3] crypto: stm32/hash: rework padding length Date: Mon, 29 Jan 2018 15:28:11 +0100 Message-ID: <20180129142811.13273-4-lionel.Debieve@st.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180129142811.13273-1-lionel.Debieve@st.com> References: <20180129142811.13273-1-lionel.Debieve@st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.46] X-ClientProxiedBy: SFHDAG3NODE3.st.com (10.75.127.9) To SFHDAG7NODE2.st.com (10.75.127.20) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-29_08:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lionel Debieve Due to another patch, the dma fails when padding is needed as the given length is not correct. Signed-off-by: Lionel Debieve --- 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 d8444aeb6609..80b9ec76bbb5 100644 --- a/drivers/crypto/stm32/stm32-hash.c +++ b/drivers/crypto/stm32/stm32-hash.c @@ -626,7 +626,7 @@ static int stm32_hash_dma_send(struct stm32_hash_dev *hdev) writesl(hdev->io_base + HASH_DIN, buffer, DIV_ROUND_UP(ncp, sizeof(u32))); } - stm32_hash_set_nblw(hdev, DIV_ROUND_UP(ncp, sizeof(u32))); + stm32_hash_set_nblw(hdev, ncp); reg = stm32_hash_read(hdev, HASH_STR); reg |= HASH_STR_DCAL; stm32_hash_write(hdev, HASH_STR, reg); -- 2.15.1