Message ID | 20230126213539.166298-1-andrey.konovalov@linaro.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp505374wrn; Thu, 26 Jan 2023 13:53:54 -0800 (PST) X-Google-Smtp-Source: AMrXdXtvrqgyGLp9wATjOGeKStOyb6a3zXYvZsbVCRqtF4OajTFjhhtNInjOcrf9YWiTcMbkyq+i X-Received: by 2002:a17:906:80cd:b0:847:410:ecff with SMTP id a13-20020a17090680cd00b008470410ecffmr38134301ejx.16.1674770034713; Thu, 26 Jan 2023 13:53:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674770034; cv=none; d=google.com; s=arc-20160816; b=MpTQO5LOCzPZD2UVZB7oYOfjnilSvT4eAS8Meb/sLT9tzn5HMbX9ul4acrkSPpY+9V UEc0w1Jb4fGzBJXJ9KVH+L5QuRTyPBqp1uF7BAGtH1bOyHB/lWfEoazdYUuJrXE70N4m CVU1rxwz06iYfuC1k/3wJr+5JhzF6u/jdOmIT1apIXUg8tghN5Us8z3UT1AgL4AT6hxn 8ubULmaZcx0ggX7b+l2X/xgEtFYmgQnr8jMfNbOEciMH0gXWzJGIkjpBh8phHe8nnTYQ LkQVlg2Uto0UyYDHhEaioFFg2D6wNMDFkn2hBNUgHw8/UX/dlTbgvho5uyMgZf6KXb96 lloA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=wIV+Q732OCBJD0p4AmY7v+jtOPaCIpj1Xm7fn1GMOyc=; b=eYb/t0K9Q8EKEPQUYHSe5zNL/zYAv+CD26BLztuRjBAIUj+goFkLY1oj5cuO15YXj4 RMVN+IKuEwp5gB7of9ZdsgPimZXiZAkSiXmdD4su55bwEoH0g+10TdUzhnDD5Sq1eARo TCsLF3/GKqgPHtngCkoHGzcRAbZi5Fq/+MLuUNXmf0ioVv4KIn7fMlpY+Cd5vuLN8OLi Tmvgbje3s4Le0hnKnSijqLI5aN0EjbWuWsV1Zcxmld1hM/dQNbagFyz4C3rxy/jESPwD abYNtaLapSMZkxtAY+GJDiu4BAe1oxZMiveNHncJ/c36fB69s3A/sz7IK2WNnXGf5gxI w98Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I44+h8L6; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m7-20020a170906848700b008785fbe7098si2577017ejx.193.2023.01.26.13.53.31; Thu, 26 Jan 2023 13:53:54 -0800 (PST) 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=@linaro.org header.s=google header.b=I44+h8L6; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230363AbjAZVgL (ORCPT <rfc822;lekhanya01809@gmail.com> + 99 others); Thu, 26 Jan 2023 16:36:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229874AbjAZVgJ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 26 Jan 2023 16:36:09 -0500 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2738215CA9 for <linux-kernel@vger.kernel.org>; Thu, 26 Jan 2023 13:36:05 -0800 (PST) Received: by mail-ej1-x634.google.com with SMTP id hw16so8680176ejc.10 for <linux-kernel@vger.kernel.org>; Thu, 26 Jan 2023 13:36:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=wIV+Q732OCBJD0p4AmY7v+jtOPaCIpj1Xm7fn1GMOyc=; b=I44+h8L6l6h2SvZ5Z6XtzccMc4n2OExyAOP8PgwyV1C7x4gdmUjeYgwd6q+bEwQt4L oeDXF3HlJR3/orc4OGrU4iLUUqYj+aPzXbCtu8S3emI1Z+X89mvvb9D1DbGz+QIUOMXX Xd8MU8IXoZxxhyHINYbNo77Hju5bh3VWmuHMqio686kqgVtdiMCITSkOuvt6EM1ae++Z 3BAgWBdThbNcQhm+X4WtjPcQZ7QSBRPgbbBreUNY8sDR6kTzLWmg1TBFV6jn47BYtR9K RwkxGGTCzLYbe75JlK21W0SG3T3z5cC8H12kgKKAV1HXIONn50Znhxc1e0pvOmWPmeV3 d/fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wIV+Q732OCBJD0p4AmY7v+jtOPaCIpj1Xm7fn1GMOyc=; b=E6G8GpzNSSd9qfbZUlYE6Bh0o7C2X6kl3EcPahPEF4b74dqBxDgYks8tkl6n559B2U byZspTmUQt0XKe5hjklv7MZHhZG+826gS1VSrZ6nvZTTlrQBgwIRDPqGlpY6YM3gzwua DiStIb6KwiAfWeFxsLR0MPDGBcWneRkYZSXNzOnLzb7iHGoTNnSBYJYRmXBrO3MLUIhP aG2FPM4ON7d7TkmOlFPQs6q+PqwBisTrAfjXSvri5TT2T2Vl7SWOAczeWe2geHayq5Vf WAhscWFcE7Uj0csX22cpWE8hagFbFR3Go/d6/G5nZfI/MPY6mqFsuU+SmoJnxeBJEKhG Z11w== X-Gm-Message-State: AFqh2ko97D5fB7tHt/K8y9ZZszJ7nbKh/L9ACnNx8TFq2TTM6kb27+U9 2mLOJhzH7BHa+8k9xWkij7EulA== X-Received: by 2002:a17:906:670b:b0:7c1:8f53:83a0 with SMTP id a11-20020a170906670b00b007c18f5383a0mr35445316ejp.13.1674768963598; Thu, 26 Jan 2023 13:36:03 -0800 (PST) Received: from Lat-5310.. ([87.116.162.186]) by smtp.gmail.com with ESMTPSA id gy4-20020a170906f24400b0083ffb81f01esm1148486ejb.136.2023.01.26.13.36.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jan 2023 13:36:03 -0800 (PST) From: Andrey Konovalov <andrey.konovalov@linaro.org> To: vkoul@kernel.org, bhupesh.sharma@linaro.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, andrew@lunn.ch, robh@kernel.org, alexandre.torgue@foss.st.com, peppe.cavallaro@st.com, joabreu@synopsys.com, mcoquelin.stm32@gmail.com Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Andrey Konovalov <andrey.konovalov@linaro.org> Subject: [PATCH 0/1] net: stmmac: do not stop RX_CLK in Rx LPI state for qcs404 SoC Date: Fri, 27 Jan 2023 00:35:38 +0300 Message-Id: <20230126213539.166298-1-andrey.konovalov@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756123617184784083?= X-GMAIL-MSGID: =?utf-8?q?1756123664422300271?= |
Series |
net: stmmac: do not stop RX_CLK in Rx LPI state for qcs404 SoC
|
|
Message
Andrey Konovalov
Jan. 26, 2023, 9:35 p.m. UTC
This is a different, for one SoC only solution to the issue described below vs a generic one submitted earlier [1]. On my qcs404 based board the ethernet MAC has issues with handling Rx LPI exit / Rx LPI entry interrupts. When in LPI mode the "refresh transmission" is received, the driver may see both "Rx LPI exit", and "Rx LPI entry" bits set in the single read from GMAC4_LPI_CTRL_STATUS register (vs "Rx LPI exit" first, and "Rx LPI entry" then). In this case an interrupt storm happens: the LPI interrupt is triggered every few microseconds - with all the status bits in the GMAC4_LPI_CTRL_STATUS register being read as zeros. This interrupt storm continues until a normal non-zero status is read from GMAC4_LPI_CTRL_STATUS register (single "Rx LPI exit", or "Tx LPI exit"). The reason seems to be in the hardware not being able to properly clear the "Rx LPI exit" interrupt if GMAC4_LPI_CTRL_STATUS register is read after Rx LPI mode is entered again. The current driver unconditionally sets the "Clock-stop enable" bit (bit 10 in PHY's PCS Control 1 register) when calling phy_init_eee(). Not setting this bit - so that the PHY continues to provide RX_CLK to the ethernet controller during Rx LPI state - prevents the LPI interrupt storm. Until this bug is confirmed by the SoC and the ethernet IP vendors, and until we get the information of what IP versions are affected, the solution could be to keep RX_CLK running in Rx LPI state for qcs404 SoC - for the moment, the only SoC which is known to have this issue. [1] https://www.spinics.net/lists/netdev/msg875806.html Andrey Konovalov (1): net: stmmac: do not stop RX_CLK in Rx LPI state for qcs404 SoC drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 2 ++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++- include/linux/stmmac.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-)
Comments
Hello: This patch was applied to netdev/net.git (master) by David S. Miller <davem@davemloft.net>: On Fri, 27 Jan 2023 00:35:38 +0300 you wrote: > This is a different, for one SoC only solution to the issue described below > vs a generic one submitted earlier [1]. > > On my qcs404 based board the ethernet MAC has issues with handling > Rx LPI exit / Rx LPI entry interrupts. > > When in LPI mode the "refresh transmission" is received, the driver may > see both "Rx LPI exit", and "Rx LPI entry" bits set in the single read from > GMAC4_LPI_CTRL_STATUS register (vs "Rx LPI exit" first, and "Rx LPI entry" > then). In this case an interrupt storm happens: the LPI interrupt is > triggered every few microseconds - with all the status bits in the > GMAC4_LPI_CTRL_STATUS register being read as zeros. This interrupt storm > continues until a normal non-zero status is read from GMAC4_LPI_CTRL_STATUS > register (single "Rx LPI exit", or "Tx LPI exit"). > > [...] Here is the summary with links: - [1/1] net: stmmac: do not stop RX_CLK in Rx LPI state for qcs404 SoC https://git.kernel.org/netdev/net/c/54aa39a513db You are awesome, thank you!