Message ID | 20231123093538.2216633-1-0x1207@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp325073vqx; Thu, 23 Nov 2023 01:36:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IEGTvJ1r2QRDINe0VwxfpVZV3Mnq6SZwVzytnZRoCMrto69QW8KLXEloVtHPf7vU4Dn9rpT X-Received: by 2002:a05:6808:140c:b0:3b6:21cc:742b with SMTP id w12-20020a056808140c00b003b621cc742bmr6943381oiv.30.1700732188578; Thu, 23 Nov 2023 01:36:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700732188; cv=none; d=google.com; s=arc-20160816; b=dmLLpUjcZYN74WKzylhSXbPxhLoOvrmoJxQPCLhhlBmkLgoNWzjImkR21siofBUHEH +mNaKTD9aE9ZPxER6ImqhZio9V0BR4i3nfR0R9lBaqX9NXCZf5TYTdN5FXv1/79Y+KvG Ad8vrDmH7/bcfB0GAwbAUCpVNdMgFVZ6opqL9u1mZh79OF4tmt229osijricY9qPhJ54 xrjSLy9mIxuGrZ96mjmc4nOYresaeJcNsix9UjeNJ9rZV+HJHEHQHeyS5BKkJn1cm6dV ysYweaHUI/e8ijGFh5pILYSKk9y6Ta4Tl+xt9jbRx1mWqO9Slt84G7cnlUUmdesBIbQ9 aQKQ== 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=dQhHNIKfWiIWad6NjUl3O8AGhzuURYHnVhK+SmvQomg=; fh=lNbqm66A/wpozhFc+nLwOwrPosFlY20hAnN9jlxMS5I=; b=0TtIHA8fFE36L1HAHWF4LMaZvwG685nqesB9lV1zA9mr8c0kCC7wMru6R31eDVkVur ZKdh9FqR4xWyrpX9WaTT2RCz7XScWpLuPQTgVOwXylr0RYG6xiQJlvGXxZkCp8UgwC1y lLBqiJZuNnAzdIbwhO42UWPIWa4h0HJ/is2yis3OOOhqKvyc5GAhb2MtpGrKbTNlekHh ShQ983Xv2VRSBfuU6g+67gLRrZFdKU6EyQsGn1zA4OP5cy3TCPNNqvEyR3HcfSJbsgYd h8AnJYeqfBJMuZa7CoqUqOd7kfCol3TBNssaHEG2oYo0ljVVN9hn778vYQVgKm+BXiRe IlFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Urd7garV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id by39-20020a056a0205a700b005bd092afd36si1041936pgb.134.2023.11.23.01.36.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 01:36:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Urd7garV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 20A8A823C80E; Thu, 23 Nov 2023 01:36:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229535AbjKWJgO (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Thu, 23 Nov 2023 04:36:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbjKWJgN (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 23 Nov 2023 04:36:13 -0500 Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79C2B1AE; Thu, 23 Nov 2023 01:36:19 -0800 (PST) Received: by mail-ot1-x329.google.com with SMTP id 46e09a7af769-6d64c1155a8so429762a34.2; Thu, 23 Nov 2023 01:36:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700732179; x=1701336979; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=dQhHNIKfWiIWad6NjUl3O8AGhzuURYHnVhK+SmvQomg=; b=Urd7garV3JSeoh8vnLumPumoZFRb39usTX5jVzYuKhVXZlS0+aJHuQcUNROT8AQ8Ou Vfx6qgDEhgxnVpA+NeRuUDdAf6/pw7Q2JxIXeQ4fcJVoWKqYWpre3Vl91Y7VnBz9TlTK V7oJEGHIpQwS3Z1/t5BvtKCpLBdxgHCGs28VoWOpeXeuvRAQUwOXFXmHT1dgPkIXBlDf mjsg2IQV0nIwi99Jwerpn1+enI3wzh+HMVcviqhObyW4dCW+u8HY2+fvAz/Y+FSTrXy5 q8QIPFUyEbIXDcA9VbCI20UhuEmN7ivQLD2kNEfA3O5eeIfW5+4RPeOGEJIsmExRm+25 ui/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700732179; x=1701336979; 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=dQhHNIKfWiIWad6NjUl3O8AGhzuURYHnVhK+SmvQomg=; b=nV/wH5ITCGEQckMFPEkwnMRs9GX8etQgu7Igb+v/rU1pibHwYgO2lqT3ZcKoac4qzc dOABTQWj+DdAPEFGcpcMuqiS1pIzGgQ5g1ycJ88wf9fUO17QGC41PJMZ87OryDyN8XWp pvQ6i2/NI+/aBQQGPdZJ68FypW9ZuluHiopN8H9uw2AfN+q/VLcDcBGVE2oMWBFCGrjO Nzyh06JJvrLePamUqq31VTUbyevV4EZbB91bEsd/W0JZV+MLOgN98y0w6ny1dNxcuM3R nakoWY6set7xi4/CymFhCB3Xu/meCWj3XCIA540uLizEMPLpiCk1k+kmQZ+vOap/gxX6 4SJg== X-Gm-Message-State: AOJu0Yz9Iqit1gxWllkZkU8PyYtp4db+z2c7urR37OTrj96a3cYAJN2c m2HpAEfYpCoWnpAcljUKrOU= X-Received: by 2002:a9d:6857:0:b0:6d6:4b8b:baf1 with SMTP id c23-20020a9d6857000000b006d64b8bbaf1mr5427820oto.23.1700732178744; Thu, 23 Nov 2023 01:36:18 -0800 (PST) Received: from localhost.localdomain ([74.48.130.204]) by smtp.googlemail.com with ESMTPSA id o13-20020a635a0d000000b005a9b20408a7sm922970pgb.23.2023.11.23.01.36.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 01:36:18 -0800 (PST) From: Furong Xu <0x1207@gmail.com> To: "David S. Miller" <davem@davemloft.net>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Jose Abreu <joabreu@synopsys.com>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Joao Pinto <jpinto@synopsys.com>, Simon Horman <horms@kernel.org> Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, xfr@outlook.com, rock.xu@nio.com, Furong Xu <0x1207@gmail.com> Subject: [PATCH net v1] net: stmmac: xgmac: Disable FPE MMC interrupts Date: Thu, 23 Nov 2023 17:35:38 +0800 Message-Id: <20231123093538.2216633-1-0x1207@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 23 Nov 2023 01:36:24 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783346955020521099 X-GMAIL-MSGID: 1783346955020521099 |
Series |
[net,v1] net: stmmac: xgmac: Disable FPE MMC interrupts
|
|
Commit Message
Furong Xu
Nov. 23, 2023, 9:35 a.m. UTC
Commit aeb18dd07692 ("net: stmmac: xgmac: Disable MMC interrupts
by default") leaves the FPE(Frame Preemption) MMC interrupts enabled.
Now we disable FPE TX and RX interrupts too.
Fixes: aeb18dd07692 ("net: stmmac: xgmac: Disable MMC interrupts by default")
Signed-off-by: Furong Xu <0x1207@gmail.com>
---
drivers/net/ethernet/stmicro/stmmac/mmc_core.c | 4 ++++
1 file changed, 4 insertions(+)
Comments
On 23.11.2023 10:35, Furong Xu wrote: > Commit aeb18dd07692 ("net: stmmac: xgmac: Disable MMC interrupts > by default") leaves the FPE(Frame Preemption) MMC interrupts enabled. > Now we disable FPE TX and RX interrupts too. Hi, Thanks for the patch, one question: Why do we have to disable them? > > Fixes: aeb18dd07692 ("net: stmmac: xgmac: Disable MMC interrupts by default") > Signed-off-by: Furong Xu <0x1207@gmail.com> > --- > drivers/net/ethernet/stmicro/stmmac/mmc_core.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c > index ea4910ae0921..cdd7fbde2bfa 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c > +++ b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c > @@ -177,8 +177,10 @@ > #define MMC_XGMAC_RX_DISCARD_OCT_GB 0x1b4 > #define MMC_XGMAC_RX_ALIGN_ERR_PKT 0x1bc > > +#define MMC_XGMAC_FPE_TX_INTR_MASK 0x204 > #define MMC_XGMAC_TX_FPE_FRAG 0x208 > #define MMC_XGMAC_TX_HOLD_REQ 0x20c > +#define MMC_XGMAC_FPE_RX_INTR_MASK 0x224 > #define MMC_XGMAC_RX_PKT_ASSEMBLY_ERR 0x228 > #define MMC_XGMAC_RX_PKT_SMD_ERR 0x22c > #define MMC_XGMAC_RX_PKT_ASSEMBLY_OK 0x230 > @@ -352,6 +354,8 @@ static void dwxgmac_mmc_intr_all_mask(void __iomem *mmcaddr) > { > writel(0x0, mmcaddr + MMC_RX_INTR_MASK); > writel(0x0, mmcaddr + MMC_TX_INTR_MASK); > + writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_FPE_TX_INTR_MASK); > + writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_FPE_RX_INTR_MASK); > writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_RX_IPC_INTR_MASK); > } >
On Thu, 23 Nov 2023 11:17:17 +0100 Wojciech Drewek <wojciech.drewek@intel.com> wrote: > On 23.11.2023 10:35, Furong Xu wrote: > > Commit aeb18dd07692 ("net: stmmac: xgmac: Disable MMC interrupts > > by default") leaves the FPE(Frame Preemption) MMC interrupts enabled. > > Now we disable FPE TX and RX interrupts too. > > Hi, > Thanks for the patch, one question: > Why do we have to disable them? > The original commit aeb18dd07692 by Jose Abreu says: MMC interrupts were being enabled, which is not what we want because it will lead to a storm of interrupts that are not handled at all. Fix it by disabling all MMC interrupts for XGMAC. > > > > Fixes: aeb18dd07692 ("net: stmmac: xgmac: Disable MMC interrupts by default") > > Signed-off-by: Furong Xu <0x1207@gmail.com> > > --- > > drivers/net/ethernet/stmicro/stmmac/mmc_core.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c > > index ea4910ae0921..cdd7fbde2bfa 100644 > > --- a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c > > +++ b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c > > @@ -177,8 +177,10 @@ > > #define MMC_XGMAC_RX_DISCARD_OCT_GB 0x1b4 > > #define MMC_XGMAC_RX_ALIGN_ERR_PKT 0x1bc > > > > +#define MMC_XGMAC_FPE_TX_INTR_MASK 0x204 > > #define MMC_XGMAC_TX_FPE_FRAG 0x208 > > #define MMC_XGMAC_TX_HOLD_REQ 0x20c > > +#define MMC_XGMAC_FPE_RX_INTR_MASK 0x224 > > #define MMC_XGMAC_RX_PKT_ASSEMBLY_ERR 0x228 > > #define MMC_XGMAC_RX_PKT_SMD_ERR 0x22c > > #define MMC_XGMAC_RX_PKT_ASSEMBLY_OK 0x230 > > @@ -352,6 +354,8 @@ static void dwxgmac_mmc_intr_all_mask(void __iomem *mmcaddr) > > { > > writel(0x0, mmcaddr + MMC_RX_INTR_MASK); > > writel(0x0, mmcaddr + MMC_TX_INTR_MASK); > > + writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_FPE_TX_INTR_MASK); > > + writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_FPE_RX_INTR_MASK); > > writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_RX_IPC_INTR_MASK); > > } > >
On 23.11.2023 11:24, Furong Xu wrote: > On Thu, 23 Nov 2023 11:17:17 +0100 > Wojciech Drewek <wojciech.drewek@intel.com> wrote: > >> On 23.11.2023 10:35, Furong Xu wrote: >>> Commit aeb18dd07692 ("net: stmmac: xgmac: Disable MMC interrupts >>> by default") leaves the FPE(Frame Preemption) MMC interrupts enabled. >>> Now we disable FPE TX and RX interrupts too. >> >> Hi, >> Thanks for the patch, one question: >> Why do we have to disable them? >> > > The original commit aeb18dd07692 by Jose Abreu says: > > MMC interrupts were being enabled, which is not what we want because it > will lead to a storm of interrupts that are not handled at all. Fix it > by disabling all MMC interrupts for XGMAC. I would add this information the commit message. > >>> >>> Fixes: aeb18dd07692 ("net: stmmac: xgmac: Disable MMC interrupts by default") >>> Signed-off-by: Furong Xu <0x1207@gmail.com> >>> --- >>> drivers/net/ethernet/stmicro/stmmac/mmc_core.c | 4 ++++ >>> 1 file changed, 4 insertions(+) >>> >>> diff --git a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c >>> index ea4910ae0921..cdd7fbde2bfa 100644 >>> --- a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c >>> +++ b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c >>> @@ -177,8 +177,10 @@ >>> #define MMC_XGMAC_RX_DISCARD_OCT_GB 0x1b4 >>> #define MMC_XGMAC_RX_ALIGN_ERR_PKT 0x1bc >>> >>> +#define MMC_XGMAC_FPE_TX_INTR_MASK 0x204 >>> #define MMC_XGMAC_TX_FPE_FRAG 0x208 >>> #define MMC_XGMAC_TX_HOLD_REQ 0x20c >>> +#define MMC_XGMAC_FPE_RX_INTR_MASK 0x224 >>> #define MMC_XGMAC_RX_PKT_ASSEMBLY_ERR 0x228 >>> #define MMC_XGMAC_RX_PKT_SMD_ERR 0x22c >>> #define MMC_XGMAC_RX_PKT_ASSEMBLY_OK 0x230 >>> @@ -352,6 +354,8 @@ static void dwxgmac_mmc_intr_all_mask(void __iomem *mmcaddr) >>> { >>> writel(0x0, mmcaddr + MMC_RX_INTR_MASK); >>> writel(0x0, mmcaddr + MMC_TX_INTR_MASK); >>> + writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_FPE_TX_INTR_MASK); >>> + writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_FPE_RX_INTR_MASK); >>> writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_RX_IPC_INTR_MASK); >>> } >>> >
On Thu, Nov 23, 2023 at 05:35:38PM +0800, Furong Xu wrote: > Commit aeb18dd07692 ("net: stmmac: xgmac: Disable MMC interrupts > by default") leaves the FPE(Frame Preemption) MMC interrupts enabled. > Now we disable FPE TX and RX interrupts too. Just adding to Wojciech reply. We should be able to see 'What' a patch does by reading the actual change. What is not always obvious is 'Why?' The commit message should be about the 'Why?", and less about the 'What'. Andrew
diff --git a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c index ea4910ae0921..cdd7fbde2bfa 100644 --- a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c @@ -177,8 +177,10 @@ #define MMC_XGMAC_RX_DISCARD_OCT_GB 0x1b4 #define MMC_XGMAC_RX_ALIGN_ERR_PKT 0x1bc +#define MMC_XGMAC_FPE_TX_INTR_MASK 0x204 #define MMC_XGMAC_TX_FPE_FRAG 0x208 #define MMC_XGMAC_TX_HOLD_REQ 0x20c +#define MMC_XGMAC_FPE_RX_INTR_MASK 0x224 #define MMC_XGMAC_RX_PKT_ASSEMBLY_ERR 0x228 #define MMC_XGMAC_RX_PKT_SMD_ERR 0x22c #define MMC_XGMAC_RX_PKT_ASSEMBLY_OK 0x230 @@ -352,6 +354,8 @@ static void dwxgmac_mmc_intr_all_mask(void __iomem *mmcaddr) { writel(0x0, mmcaddr + MMC_RX_INTR_MASK); writel(0x0, mmcaddr + MMC_TX_INTR_MASK); + writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_FPE_TX_INTR_MASK); + writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_FPE_RX_INTR_MASK); writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_RX_IPC_INTR_MASK); }