From patchwork Wed Nov 15 14:39:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 165409 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp2582057vqg; Wed, 15 Nov 2023 06:41:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IH9vT1vby2B4tOPwpTKzmSPzTOI0Dzii4r/w3OvGdlsGFIewtz63g2F0WSBUKBZMXcEJxBo X-Received: by 2002:a05:6a00:299b:b0:6c2:cc57:7e2b with SMTP id cj27-20020a056a00299b00b006c2cc577e2bmr12833697pfb.24.1700059267209; Wed, 15 Nov 2023 06:41:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700059267; cv=none; d=google.com; s=arc-20160816; b=iuoYiKNWaieq+zJGGyjnirZzbRHd7UAhCAo2wqxsrS6VyFLUDFayiFpO3rEcG8CXX3 MTBaW0aM5342ecuIeOcPaLTBPXrrSVCy08U6lb6tS+FOoLf1AJ7m06HNovfFHOwSQKxA frxblHINXcOP150TLKFbD8eje2R4HiEUdJAanUhGzSni7hKdz2J++7y2rtZIwfndCeE0 j7A+/3p1JQ9SHjHwx56vmREsGVx1KyfWd/7EDHFvJSGa4Jd3tr/twSG66SWz6UXOla8+ aJF7VNCg2vqdNdgwg39TXPUzDkbcRRZvVKt0Jv6btsF8+xYoqpst09COn1N18mvsKO8p KKOw== 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=1VWPuXKVGF4hhvvvot5V7VAaQ145ojE/8G13RqgpTpo=; fh=5rCQDomVZxLXb7yR2oN4iSS3zxUnzGJP2HoQaRzhQu0=; b=woQz9GRUWD308I8Hn6zFPoOINT7eGwXUMXH0qpoWoHckxmJAqGfIhwBQLyhoSpk4K0 oLJyL+KqucZYUzo22K/Sqq8AejbEDV5d10XnEaZKuhtfpB3sClcg2JxyAqb4zxkGtLG6 0SJruBjKKBE4+erjeXlC7bV+Moocv7qqlwmS22HxR4bKGiI4kJmxPMoYHQjrsw5+wowd MbnZxiopDJ9q7twNIb0kBnL96hb0i8AceG+aJUbObK46PJocQBUDmCK1wQSnobqbyAux jhq/b2LinYo8IYmX1xcCWdIptn7mTuuKJvkHceIVIFawsJPPUsCgqUsF3rkJpSNCEusv kmkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=HnqkmnoV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id o131-20020a62cd89000000b006be3c302801si9755322pfg.397.2023.11.15.06.41.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 06:41:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=HnqkmnoV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id ECCA280286BC; Wed, 15 Nov 2023 06:40:54 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344257AbjKOOkp (ORCPT + 29 others); Wed, 15 Nov 2023 09:40:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344211AbjKOOkf (ORCPT ); Wed, 15 Nov 2023 09:40:35 -0500 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DF73D59; Wed, 15 Nov 2023 06:40:22 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPA id 36BC4FF80F; Wed, 15 Nov 2023 14:40:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700059220; 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=1VWPuXKVGF4hhvvvot5V7VAaQ145ojE/8G13RqgpTpo=; b=HnqkmnoVf1gKbSKWJJQO3k1dJ+u2Jr2kkae6h5MOdeulKtzTlb/2b21AwFnNbE/tWUcDnP LfTN3ja+WqJDpKFow6QilS9270zRnxgx4lv4JvYjugZvHLM9XRoDJ0W4G37NaHBGFvBlqE 9YiNQG4fQmdA9/WIuqTPdDY92ccXifrpkNsL/HuQ4koMjbvxk1gAvWiganXdWJ4FfDgvih ZQLEnJWTcL5cc197Tv2Q7mgLJHVkv0ja8eAwMXEvEa8N4aEd6KChbATTpnWKrlPYUDpYzf UL9PYzquegmgn6/GJIE9oX6c5SVrK0H80/LAEiE4ieP0NMdVOy7hZm0/QDkWgQ== 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 v9 03/27] soc: fsl: cpm1: qmc: Fix rx channel reset Date: Wed, 15 Nov 2023 15:39:39 +0100 Message-ID: <20231115144007.478111-4-herve.codina@bootlin.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231115144007.478111-1-herve.codina@bootlin.com> References: <20231115144007.478111-1-herve.codina@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: herve.codina@bootlin.com 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,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Wed, 15 Nov 2023 06:40:55 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782641346344360578 X-GMAIL-MSGID: 1782641346344360578 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 3f3de1351c96..2312152a44b3 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); }