From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C21D60A3827 for ; Wed, 2 Dec 2026 10:07:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Hwscp7xr; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=0Itv8Pc8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=OlJoCTrPKxqVvRGTVVYhDJLoaamt36m8Ye+36QErJOs=; b=Hwscp7xrhDGJ3sHbk08oia+Gxq tO370c+jh4HAN46+fxhcbtqOAbW+umx9NU1OC/2kkGICn/3PgXfueIyUOajQ7fZxPC8O0Vz6aEp56 dIKNho3oDHHbyrfWuacK/rH8Jn27qPT1SnZqWHaSemB3YLd0k2spGK7dadRc1m7IF+jYSSl7jCY1g PKYXVAP4VnzdhECiZv6c6kzeBeHG+nHPwhKU61ZHcFGLQ2K07UhjTLvJpu6CITu3+756WOBHuF9U3 S+nq8zlz71YPOt7pUxQjPICrk/4mGauZLRd1eTYQCFSPnRhb+IWQLf20JdTYZKGwNFWFLJ54hmXvr Xxzri/dw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYhFb-0000000B14B-2yqR; Wed, 02 Dec 2026 10:07:47 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYhFT-0000000B0kY-11YK for linux-amlogic@lists.infradead.org; Wed, 02 Dec 2026 10:07:44 +0000 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-48e3b22e971so6584659f8f.0 for ; Wed, 02 Dec 2026 02:07:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796206057; x=1796810857; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=h1zk98mqcUoAw2+sqvpYDcg3iCyW4wuZtoKEL3CGKC8=; b=0Itv8Pc8F1ZkaLtAWMVneM8kcSUpk1DRqHpF6arBMxrzrBGJLrLb2aq8TVfTuxdkqk vGpea7YVh+6yOuY/NlNrNaIgzv5ANJvY71QoBME/Sa5bEuxH3qlDIHrwJUK2zdeIrYA9 zpyoantXlkmCvBX1okGFyrQsEvSD48vVtDJTbL+KCqYVdsSWYjBiShPgY9lxvVyGjTwx hWz+Tzz8ySt/r4cmJOpMXPTJM4r8yXvm5mz3pWGvF5EEUT+wLcVo0QXG4wXyY3ZeAzTv iIzVn3RB2E15o5Ff95+ofRMc/f/Jtd3PxuZEJ+QttXfutmH1Dck9XPafSU8UjbA+CwX7 1b0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796206057; x=1796810857; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=h1zk98mqcUoAw2+sqv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q/KoBDoR5P77Hpov6MLIMjn/mH8ljwI1QZFfYNdvO1NOUaE5rrHIeEHCQXaL4tT wV3qeurca6AFwVkRbFCsSGgfuqzPbO3rxmGjphNtjh4PDTggtklKeom8Kqxtf/BobIjJYS6/sA5 GyFJ62reP0EmgJv8V7WbX/F5FjBqU3javxKVJcFnF9Ratg== X-Received: by 2002:a05:6000:2dc5:b0:4b3:71c7:42bb with SMTP id ffacd0b85a97d-4b371c74483mr61839647f8f.19.1796206057424; Wed, 02 Dec 2026 02:07:37 -0800 (PST) Received: from localhost.localdomain ([79.117.198.103]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab6a67fe75sm87617495f8f.24.2026.12.02.02.07.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 02:07:36 -0800 (PST) From: Jose Nieto To: Corentin Labbe , Herbert Xu , "David S . Miller" Cc: linux-crypto@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alexey Romanov , Jose Nieto Subject: [PATCH v15 08/35] crypto: amlogic - Drop status field from meson_flow Date: Wed, 2 Dec 2026 11:06:47 +0100 Message-ID: <20261202100714.115460-9-jnieto.alaber@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261202100714.115460-1-jnieto.alaber@gmail.com> References: <20261202100714.115460-1-jnieto.alaber@gmail.com> X-Archived-By: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261202_020739_418017_AB4274D0 X-CRM114-Status: GOOD ( 17.24 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 From: Alexey Romanov This field is used only to check for timeout. But there is more convenient way to achive the same goal. Signed-off-by: Alexey Romanov Reviewed-by: Neil Armstrong Signed-off-by: Jose Nieto --- drivers/crypto/amlogic/amlogic-gxl-cipher.c | 13 +++++++++---- drivers/crypto/amlogic/amlogic-gxl-core.c | 1 - drivers/crypto/amlogic/amlogic-gxl.h | 2 -- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/crypto/amlogic/amlogic-gxl-cipher.c b/drivers/crypto/amlogic/amlogic-gxl-cipher.c index f6c13d8fcb47..cd94296e4d9a 100644 --- a/drivers/crypto/amlogic/amlogic-gxl-cipher.c +++ b/drivers/crypto/amlogic/amlogic-gxl-cipher.c @@ -228,13 +228,18 @@ static int meson_cipher(struct skcipher_request *areq) } reinit_completion(&mc->chanlist[flow].complete); - mc->chanlist[flow].status = 0; meson_dma_start(mc, flow); - wait_for_completion_interruptible_timeout(&mc->chanlist[flow].complete, - msecs_to_jiffies(500)); - if (mc->chanlist[flow].status == 0) { + + err = wait_for_completion_interruptible_timeout(&mc->chanlist[flow].complete, + msecs_to_jiffies(500)); + if (err == 0) { dev_err(mc->dev, "DMA timeout for flow %d\n", flow); err = -EINVAL; + } else if (err < 0) { + dev_err(mc->dev, "Waiting for DMA completion is failed (%d)\n", err); + } else { + /* No error */ + err = 0; } dma_unmap_single(mc->dev, phykeyiv, keyivlen, DMA_TO_DEVICE); diff --git a/drivers/crypto/amlogic/amlogic-gxl-core.c b/drivers/crypto/amlogic/amlogic-gxl-core.c index 58d56f352dd6..81d0e8731ab1 100644 --- a/drivers/crypto/amlogic/amlogic-gxl-core.c +++ b/drivers/crypto/amlogic/amlogic-gxl-core.c @@ -53,7 +53,6 @@ static irqreturn_t meson_irq_handler(int irq, void *data) for (flow = 0; flow < mc->flow_cnt; flow++) { if (mc->chanlist[flow].irq == irq) { if (meson_dma_ready(mc, flow)) { - mc->chanlist[flow].status = 1; complete(&mc->chanlist[flow].complete); return IRQ_HANDLED; } diff --git a/drivers/crypto/amlogic/amlogic-gxl.h b/drivers/crypto/amlogic/amlogic-gxl.h index e14cd5021add..cf07c5fbc5bf 100644 --- a/drivers/crypto/amlogic/amlogic-gxl.h +++ b/drivers/crypto/amlogic/amlogic-gxl.h @@ -59,7 +59,6 @@ struct meson_desc { * @engine: ptr to the crypto_engine for this flow * @keylen: keylen for this flow operation * @complete: completion for the current task on this flow - * @status: set to 1 by interrupt if task is done * @irq: IRQ number for amlogic-crypto * @t_phy: Physical address of task * @tl: pointer to the current ce_task for this flow @@ -68,7 +67,6 @@ struct meson_desc { struct meson_flow { struct crypto_engine *engine; struct completion complete; - int status; int irq; unsigned int keylen; dma_addr_t t_phy; -- 2.47.3 _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic