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: 13381111 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A7488CA0EC3 for ; Tue, 12 Sep 2023 09:04:21 +0000 (UTC) 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-Owner; bh=/LaEpnc7iaAwUkqTyZSZQmxlYpyLVZ56bmV7+ssOdow=; b=mjh7BtzwjpcYMs NZzuRreTh97BQ7HIX0HvOxbzpIfB98+xFo7SrG5ZzQxSkJz6ki4nHesY3C1zxt/DkHwRV66MS7cBN DqMWpO/0UBnhII960f0V/I594eQBNfpcu33dUj1nTbOJDDcJZ/3H+bvB1xR/I+9JKjZbjr8aFneur l15k/24mW8jXBCaZ78QAzdPrRhOad5jZmhVw3LkiZx3WM3rO7Md2nYgMd69zgviuvxt0Kd18lhNA3 zqe4BsgfcxJlaTAQdNdoDIcPbdN7Q0l38CoWpI/LbzAkA15Lixwrrmy776+MX6SBbNcjA5sg+c/OP a0qrf7vwX5aucfDRPKYw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qfzJI-002ezk-38; Tue, 12 Sep 2023 09:03:52 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qfzJF-002eyS-2S for linux-arm-kernel@lists.infradead.org; Tue, 12 Sep 2023 09:03:51 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230912_020349_958901_09056270 X-CRM114-Status: GOOD ( 12.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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); }