Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2928777rdh; Mon, 27 Nov 2023 02:32:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IFZnCR9jrKEEPj4e48TdjjIVTwlv9tUMXBGd6FPExcOBh49Cj3hwwao1KyDGiHpDfGk5z0n X-Received: by 2002:a05:6808:1188:b0:3ab:83fe:e18f with SMTP id j8-20020a056808118800b003ab83fee18fmr13800470oil.35.1701081140579; Mon, 27 Nov 2023 02:32:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701081140; cv=none; d=google.com; s=arc-20160816; b=KGmOvsTgY/jxjjf/2NYeK4kmT34pZ4jD5BWKe2WNUwg/3YyPl9VSvexV7547eSsUgW R0l457G7OqZEFQ0iqXhZz98k6FJTWRvAZmNjDWrzaIRMhm5xhFcBcijNbI6YhBa9+eQB slSkfAz2/Q06BXRXAnQOdXaqv29k9plMd6iqQDi9RpRUCF7CCE7e89AMSUta1bFrVLQG X3Fr/vbo3C7iK32S7mS0e+SNS7c/Kq9v1yGcK9a8NzJU8asDfyd6biS1SOl4UHfrn1a/ 8fdnGWLtxY60VglRXKWHBy9OPJ4IpHNyZEn+b8BJDXfGtDKqdfH+MOhd4Tq//TNb0zUs ciBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6EkO/+jvJxUqXrykI1sSA6OiaE4jGEfZVrMxpcuLqiw=; fh=KP+CmIm/+5VFbMu6z8pnx4/ei0bDF+rW35SPUSNjCuk=; b=uz75efgC2Ii/OBDym53EySneNsQjghS76g6ryVkYJVshmTfKkF6GG0Q3IuNyayJCB2 FGraKTvJOzjwYG7dsJ0VVWaEMV1t/EUZlOtOMvJ474ginGElzJZl7RznKm0Nlmu/LfDx KYTtMN2K0IfFmmr0T8ZEV49uT61mqqJlN2l2Z8w/AXANiHDIcso4UkpQKZPwpvAm95Rg IhlEfAI7Hx+g45eZS+69kkzLH49pFty5h7w13iI5UwQiGNsn0oKxMb9ltW+Ny1C0zJpi MA3IM4haLfrDcLcvOELxhQ86F6D0afYBNt7iUyZ2GnwIV9jEGu96t91bdTYz4Lv2Fgx9 OP0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gJTg5lcN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id f24-20020a63dc58000000b005b9293fcf78si9614416pgj.10.2023.11.27.02.32.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 02:32:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gJTg5lcN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 68F2F8069DA2; Mon, 27 Nov 2023 02:32:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232952AbjK0KcK (ORCPT + 99 others); Mon, 27 Nov 2023 05:32:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232931AbjK0KcJ (ORCPT ); Mon, 27 Nov 2023 05:32:09 -0500 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2951BE1; Mon, 27 Nov 2023 02:32:15 -0800 (PST) Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-5094727fa67so5764256e87.3; Mon, 27 Nov 2023 02:32:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701081133; x=1701685933; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=6EkO/+jvJxUqXrykI1sSA6OiaE4jGEfZVrMxpcuLqiw=; b=gJTg5lcNRAiqs8jB4UvZOC3yjOZkOKEXnV3HXuvAnY65VgfXev0x9/KH5QNFIhJ3SE Fp834eeQfgl+96UomKXnABD/i7fId8vII7Gyt6Gi+LiT7lkpO8IEfxAZ7vJFU3HOitzK 667j1hYtNi8WAIAHrmlWlMX7MQ/wrjCsl8IP8PZIFTsfu+g9aXkR/rdtuJkQPcRHrwmv xzUDpGnxi532Fr6paKteeXAHmUsmRL+w5lwFmGeLy8LGQ+JY1QwoGMVcs3prIrxwt+e/ CKPmwM6KczLoAM2JGweDA4meoZjy7/S++m5bb9jyCMtrtZ4vpScYU2mYztPwzjau2/xo LEgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701081133; x=1701685933; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=6EkO/+jvJxUqXrykI1sSA6OiaE4jGEfZVrMxpcuLqiw=; b=AtpUFy1VsDNj07uwNLQ6hTAGK6dCr2tOfZBCZMbJvAC6/CuJ7Cy5dxi5PPXbmtNK3Q K4wLCwM8OjDOhvvcYxarCmxUmzo/8wgs5/ffoII82jezB4vbX7lydHJaXji9URXLZyFt D8k/oJerMAQhNp4lwGJvEwgDFd5IXwlfghAUEoYBZaD02pbbtPGH77nPSnAi+gV7AO4C El0vCyz176IPQZ+cJ/ssTbz8imKnfrnRw9K1VOCOGjiOnBEjH/4NYzghDZFdzeMi0yKj udU++L9V36jP9N+x3q6+vxyuckwpFaaHxfA024K0WIuIGuGOf0J+4hwoU4Fa4wca/PfJ CGbA== X-Gm-Message-State: AOJu0YwN3+qn0shQZQRFwl2QFMTBy37lj3O5NTdOVknHFbgaKjJHjBM6 7VEHVs+nQd8GHnk+5o7CjJRYII7T3n6Tmw== X-Received: by 2002:a05:6512:2343:b0:509:455c:9e3d with SMTP id p3-20020a056512234300b00509455c9e3dmr5108404lfu.18.1701081133118; Mon, 27 Nov 2023 02:32:13 -0800 (PST) Received: from mobilestation ([178.176.56.174]) by smtp.gmail.com with ESMTPSA id z20-20020a056512309400b0050aa9cfc238sm1438739lfd.89.2023.11.27.02.32.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 02:32:12 -0800 (PST) Date: Mon, 27 Nov 2023 13:32:10 +0300 From: Serge Semin To: Furong Xu <0x1207@gmail.com> Cc: "David S. Miller" , Alexandre Torgue , Jose Abreu , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Joao Pinto , Simon Horman , 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, Larysa Zaremba Subject: Re: [PATCH net v3] net: stmmac: xgmac: Disable FPE MMC interrupts Message-ID: <4zucnqqunr6rb6k2g4737ksma4r6q5eizopvmvnmeyrhd4pio2@cism5prdsxmq> References: <20231125060126.2328690-1-0x1207@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231125060126.2328690-1-0x1207@gmail.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 27 Nov 2023 02:32:19 -0800 (PST) On Sat, Nov 25, 2023 at 02:01:26PM +0800, Furong Xu wrote: > Commit aeb18dd07692 ("net: stmmac: xgmac: Disable MMC interrupts > by default") tries to disable MMC interrupts to avoid a storm of > unhandled interrupts, but leaves the FPE(Frame Preemption) MMC > interrupts enabled, FPE MMC interrupts can cause the same problem. > Now we mask FPE TX and RX interrupts to disable all MMC interrupts. > > Fixes: aeb18dd07692 ("net: stmmac: xgmac: Disable MMC interrupts by default") > Reviewed-by: Larysa Zaremba > Signed-off-by: Furong Xu <0x1207@gmail.com> > --- > Changes in v3: > - Update commit message, thanks Larysa. > - Rename register defines, thanks Serge. The fix looking good now. Thanks! Reviewed-by: Serge Semin -Serge(y) > > Changes in v2: > - Update commit message, thanks Wojciech and Andrew. > --- > 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..6a7c1d325c46 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_TX_FPE_INTR_MASK 0x204 > #define MMC_XGMAC_TX_FPE_FRAG 0x208 > #define MMC_XGMAC_TX_HOLD_REQ 0x20c > +#define MMC_XGMAC_RX_FPE_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_TX_FPE_INTR_MASK); > + writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_RX_FPE_INTR_MASK); > writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_RX_IPC_INTR_MASK); > } > > -- > 2.34.1 > >