From patchwork Wed Aug 9 13:27:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 13348004 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 2CAA1C04FE0 for ; Wed, 9 Aug 2023 13:29:03 +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=0fDZmj93Hu52/Xxt4O99Y3/Da/TcdwFXkEOYOFj2gHQ=; b=rosXdW5ttmFP+Z XU7x1bLa9pFFj7Sp52DRWhdacwJzLLw9HDWhVFyNlWF5k0/NWWfLAkyEHj45UGYCoSEVyyt2F/+Eu mVrl1t+eEtjGtO7hByjdnTPNK40ld+st7HpMxE3I8z+uSaG9lwhTwPYTdI9276O3QiayIcgGgQogE Yn7vNceq6f54Gntmht3PDR5w1wtjf2TcY2m0VRgSuvgs45lHlylzDVEZ85Z7DSPTDvGPN+7kLzwU2 hTnRbIdpu4LLB/oJnZaEA8haSjyJ2UJFeVFZ39LgDHb13nz/d3EHGpjMo0eUcbtjLkLyVBRSxgTWf h8GrcK62L09eqhQbYW4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTjEf-0050FC-2a; Wed, 09 Aug 2023 13:28:25 +0000 Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTjES-00506B-1H for linux-arm-kernel@lists.infradead.org; Wed, 09 Aug 2023 13:28:13 +0000 Received: by mail.gandi.net (Postfix) with ESMTPA id E372040012; Wed, 9 Aug 2023 13:28:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1691587691; 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=Vsq3fcsRQ92trwLtB4WXIyAHgTZzHeLSP3hrA+1+hQo=; b=LUcR/P5tmh6y39hspt7Znr7WB0yyrcR+nFxys63LPWLzhHyg6mkkg3t3JDP2L/1H2XpwPa cFBZT+5e8wEC7MIrkA7pUqaKynj+zBtKvFT11qEVwTSSzsoEav/2Ra0uwWyGbVUOTDe67J yuTT+EG8oxKFBH8JQIuFs4Ri/vHVA4GDDFf5mozIaG/Pd5evSYyuvQmMBvMtPXLNJVLbOW 1ilLwzSsQNOuL7m5AmTsk1KQEZ/r+tUV8qwwobgkz/J+ERC8D/A1ZUVO/6R9U3ljHxCtXz 16K5O5PLbp6y3HL6lIQDCnCdEafssB43EhKCY8zULZek5E9Jtr5FRezTSKKbWA== 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, Thomas Petazzoni Subject: [PATCH v3 03/28] soc: fsl: cpm1: qmc: Fix rx channel reset Date: Wed, 9 Aug 2023 15:27:30 +0200 Message-ID: <20230809132757.2470544-4-herve.codina@bootlin.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230809132757.2470544-1-herve.codina@bootlin.com> References: <20230809132757.2470544-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-20230809_062812_576930_35DB3712 X-CRM114-Status: GOOD ( 12.15 ) 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 --- 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); }