From patchwork Tue Sep 12 08:14:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 138291 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp524111vqx; Tue, 12 Sep 2023 09:21:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGvpWefPKtdlHDeKkOa5Ew89rnnerW1CoPfxaxhrnQMUBw3qGwA9UmhRBFTor4xJlacMPpn X-Received: by 2002:a17:902:ab95:b0:1c1:fafd:d169 with SMTP id f21-20020a170902ab9500b001c1fafdd169mr225496plr.3.1694535712835; Tue, 12 Sep 2023 09:21:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694535712; cv=none; d=google.com; s=arc-20160816; b=xYZbXai2nnNs14YoLZjC2/UUTzZAsT2LivGoErFUnEm4aqW6QDX2PkKCQhB6JqvEyJ 4J4w89SFxseOQSz1E+SJLJUlS/6FBMH9cf5NBarwJ3tUQR/gtk0Q1PdsFgAcgqQXdn94 ky3ytI/oU0Sxyg5hwCQOiBS69KRKXb0rcKoMmzw3DkplSwvA46/KcnS3du0THCyhDg1a P1PWFuwFyjYL48B4JLM+9yi2zr6tIlTCUQe90iJBYosLpoibKRfeiM4o7Ltx4meivglU Xu1zy47aExyT6824bpAdTv/CWzpPpXF7efRHE8RmSiEIgv/c2/i4sPaNRNQRH5egpzPw fS5Q== 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=DxyuVFnS14xfvlofWP1396X+QDpYh2tc32oijKr4Rok=; fh=5rCQDomVZxLXb7yR2oN4iSS3zxUnzGJP2HoQaRzhQu0=; b=L7NTIEklHT9FOlcbIGUQ8Tj3IPiBH3+FD0tJ1Nw3RNazWOMc6Nvu7JPLDmJfzbKh1v 9c2MK2URbAmIGR2p3sbL20ZIUIuM5a23+VrigZZrD1aLE+5taOY+kBwakgv9eia0dUtp 5vYCLV08EAHfOHMccRV0l6RtMHAXcYsQ5EKWPOZEAEAGIYwaJ6dO720RH9Y3tCPx9ufl UR0wli6JE9yn/y8SCFXusumUYi2zXOszenHkkDS8ak1o1uLETKj3OQbHv8g/2raji63+ 1GRJllutG4Dk1d5+1DRnaxze4diz5Ri0NcwpLNauuGbGvQ7EN5lD3gc4B0+XjpZQDSat RWrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ZTFZyz6H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id q7-20020a170902a3c700b001b9e1d5f8e6si8256313plb.447.2023.09.12.09.21.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 09:21:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ZTFZyz6H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 177668130CA5; Tue, 12 Sep 2023 02:07:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233395AbjILJG1 (ORCPT + 38 others); Tue, 12 Sep 2023 05:06:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233413AbjILJF4 (ORCPT ); Tue, 12 Sep 2023 05:05:56 -0400 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FCF4210D; Tue, 12 Sep 2023 02:03:48 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPA id D33A5240061; Tue, 12 Sep 2023 08:51:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1694509426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DxyuVFnS14xfvlofWP1396X+QDpYh2tc32oijKr4Rok=; b=ZTFZyz6HcLMeHyZSapA4AyFJzqP6t9lwJsx6DsAQSxdbuftqRxiU/ArAZBDXy/Sb5oEiV/ USPg9pjkgVpp5T0WOtVzNd9JRkFBEveeZQVQ9X0QxqdZc8B3ff6tmaGd2pCImbyl+5gXgm mmk0UivuRz9DLTvAhmMLIdcf8p8GYzvu/0uAV99F1hc7oncZ3Rz72btNoDHWYza8DqGgCF amf1SmU6xzefxQ0iAAJzS4hus7ACLZNvIk7pKwPML3LZJt32KFosTvr9hhWdgsvh4VBC7p PMul8VUHnAWJ0qKKjUnFAU14UGCgoq7EHqp3+MenBU3y4bDI/WkxEPxLVNFNdg== From: Herve Codina To: Herve Codina , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Linus Walleij , Qiang Zhao , Li Yang , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Christophe Leroy , Randy Dunlap Cc: netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, Simon Horman , Christophe JAILLET , Thomas Petazzoni Subject: [PATCH v5 03/31] soc: fsl: cpm1: qmc: Fix rx channel reset Date: Tue, 12 Sep 2023 10:14:54 +0200 Message-ID: <20230912081527.208499-4-herve.codina@bootlin.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230912081527.208499-1-herve.codina@bootlin.com> References: <20230912081527.208499-1-herve.codina@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: herve.codina@bootlin.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 12 Sep 2023 02:07:39 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776849480077369825 X-GMAIL-MSGID: 1776849480077369825 The qmc_chan_reset_rx() set the is_rx_stopped flag. This leads to an inconsistent state in the following sequence. qmc_chan_stop() qmc_chan_reset() Indeed, after the qmc_chan_reset() call, the channel must still be stopped. Only a qmc_chan_start() call can move the channel from stopped state to started state. Fix the issue removing the is_rx_stopped flag setting from qmc_chan_reset() Fixes: 3178d58e0b97 ("soc: fsl: cpm1: Add support for QMC") Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Signed-off-by: Christophe Leroy --- drivers/soc/fsl/qe/qmc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe/qmc.c index 7ad0d77f1740..8dc73cc1a83b 100644 --- a/drivers/soc/fsl/qe/qmc.c +++ b/drivers/soc/fsl/qe/qmc.c @@ -685,7 +685,6 @@ static void qmc_chan_reset_rx(struct qmc_chan *chan) qmc_read16(chan->s_param + QMC_SPE_RBASE)); chan->rx_pending = 0; - chan->is_rx_stopped = false; spin_unlock_irqrestore(&chan->rx_lock, flags); }