From patchwork Tue Jul 25 09:23:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 125482 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp2365000vqg; Tue, 25 Jul 2023 03:14:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlGeI1eWtvdk+pg/+Qj405QqoaBfwoiy6bcZjfbcaqiqSMK0qG0x62S1z3FqY1LcDLfQnLrj X-Received: by 2002:a17:907:2c77:b0:982:487c:7508 with SMTP id ib23-20020a1709072c7700b00982487c7508mr10686294ejc.38.1690280052364; Tue, 25 Jul 2023 03:14:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690280052; cv=none; d=google.com; s=arc-20160816; b=t1/V9D9cT5I5xj2W59znJJ1PjcAuhDpQBXfEFfMpXiHN+yT5LNfdcCm9qAjwPeCrWm 8wls9q0n+RmPl0RaxukmC7ruOTedgLi8TXMUj9oDRRyc7yPa0xqCfdbZRzK3CoNivCB3 cR5RtEj2W/LlVHC/qXsHULNufwFpzoQeajdU9WQiigxl8V80CKlUjDNChss4n64QrDF7 +F/E808zAsKaagOH0gdm+HnQ2QZXxVZ63FhY7I8BDpHWqQH24QnBmYV0E6YNs1HCQ8wT 2fhoMTPaSDDm8L2RIyL+HN5/sPuXCWtWk9iRLnoT2vyB8mD8hXKIqSFQq6iO5WPyQZyD Lqbg== 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=bnvaxnvd1LLZ9d7RlKXMf8GCCvuEyY04IHVrkt8d8vg=; fh=j5z+1OhFuGBFoHpqsKfNW8PvbyYDiDyztgOSDrYZWKg=; b=XavLNwR6w+B1VRRpboEcGicd88pILONZXaQn+JgPBjR3SaZeNdBHkiEj9aQjIrJju1 xM04tRtAn2uoS6tvE02YxVmnswzezkO9dqXdBCfHqOK+nrLb5aPF2dhHevMala8F7B15 kpEHJGbmO0AiLduKEdO6WL4moLGZaPSkCw8K+VCI+KOnf8Q01VYZN00A3V58pgoSh4Di BjCb6MLJgLEQWPaucd7ukD6h8HIgk9y3K8yBppa125vupk0MFMzymU6lcPKdn2MZfx5p YbJw1X9cqqjOiuH97AlqlUtTA687KaIFISwWLUtDjvQIZUSdTDZOscDPVI6OsPtHdU9u FkPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=oYHggMqc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lz24-20020a170906fb1800b00992fef5cff8si8012118ejb.552.2023.07.25.03.13.48; Tue, 25 Jul 2023 03:14:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=oYHggMqc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232242AbjGYJZG (ORCPT + 99 others); Tue, 25 Jul 2023 05:25:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232001AbjGYJZD (ORCPT ); Tue, 25 Jul 2023 05:25:03 -0400 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81B0919F; Tue, 25 Jul 2023 02:24:59 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPA id 15FEE40009; Tue, 25 Jul 2023 09:24:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1690277098; 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=bnvaxnvd1LLZ9d7RlKXMf8GCCvuEyY04IHVrkt8d8vg=; b=oYHggMqc2R3erZFENJIVfpmIG1Zg8EPVJGyMtPLvLx6yl68Dmy4rmBhHJqKJ5P0WZ06bwR a93jNuUV33yOffxbUH72TpIfX8OiT7IGAr0vq0MrmJm8n40wKQrS7IYBzcq+4+/0pAMDFf whIvpm7I+lJF6nbRYVd3IPQGJfrCrEEmxdtfnE8nwqLKM6zE8DwKXRMAznFGE1j/qjFn2W DaApyLRCVzmccc1qaCmpfI9vXQqE27bjadOy1TtWzs3vfIhcJNAz9ZxSspzaLz9AMzlfDj b/x96A/mE30qcGwIx5jgj8wjDzxEgIrTV+W7EcfYnWX+/EpcaMPJ8iLJ+OolNw== 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 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 01/26] soc: fsl: cpm1: qmc: Fix rx channel reset Date: Tue, 25 Jul 2023 11:23:37 +0200 Message-ID: <20230725092417.43706-2-herve.codina@bootlin.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230725092417.43706-1-herve.codina@bootlin.com> References: <20230725092417.43706-1-herve.codina@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: herve.codina@bootlin.com X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772387096402633302 X-GMAIL-MSGID: 1772387096402633302 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 --- 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 b3c292c9a14e..a45e40776b45 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); }