Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1290968rdh; Fri, 24 Nov 2023 09:04:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJPCP21Kfkj4hIevUVIhNFUoPvoxBCcwc9bLj82rY8Pi196wlxDaF++Zm8Z/wdAnot+6Od X-Received: by 2002:a05:6870:f153:b0:1fa:16c3:ebe5 with SMTP id l19-20020a056870f15300b001fa16c3ebe5mr312104oac.7.1700845442901; Fri, 24 Nov 2023 09:04:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700845442; cv=none; d=google.com; s=arc-20160816; b=vcerX6kV+vuxJ/VK5U4pBauxxWkgDUY9UkqFlcyqJdSScq84aQh44XvwAhRkKHvAnj FwHOW2r7fF1tUvZFWxhba0CKJi0dWZf+JzK3EUAQw8SA1M9K5nl33RZ+7GHF6mxo2LjO uDZ9i/RbxrhSY5gfKVerNU1IuwWRd3ilnhdUekTL6pkKdijqzagU9yJVIwbIZlshV8PK DKHQtT6ADbTBwLVkl5uktEoZGqpRCsrH+qOqCCLIrQ+eQai4khy3Nf0PwltkU3UB+WKE 1lzTP2oH8q41eo460hzno4W2AIXnYCtYrYHPlR8u734HO1jLE4D4Jw7XtBBwr8uXDNGv TBdg== 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=EKb6+bJzwF1yVBhWWW80XyJQx4h4KUg59OSYpW9sau0=; fh=777fnGPFCklgku7miEvMi+H6COSNgqVCQUL/O3yYryM=; b=zyaaFeGf+nIbN4ZU6h81vkECDuRyvVkro8McrYoMCFug+s4UiaHqmeygOxWVZqbeZo HLoZ1fKrCD/ssQQ3jakbjwztmOBICF5ICdXc0D/8lmlbYbhLbto2g7ZFYnpEw+8icGpa fWR5ADPQ8rrcnKUfdYg4R6WnpoBnoZXnRGd+cmvy7PAnodkmDqbGddWCFcLx9JEQ5f/5 GMpjmF3fKPTt96+O86CZMKmkOz+2NGpRXTNGWOACSoCCMPHK6heZBYmc+2imUT55FlqB HOvd6PmEKH6rPM5ZFiZGN+9YQsrocWudcG50VnRaQThL6uYWOugkKGMlrytHgFB4/yl4 vlYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WjoEaUZ4; 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 Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id mt6-20020a0568706b0600b001ea71440b7asi1617456oab.220.2023.11.24.09.04.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 09:04:02 -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=WjoEaUZ4; 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 D1E698042008; Fri, 24 Nov 2023 09:03:59 -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 S230159AbjKXRDo (ORCPT + 99 others); Fri, 24 Nov 2023 12:03:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231200AbjKXRDm (ORCPT ); Fri, 24 Nov 2023 12:03:42 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE203D59; Fri, 24 Nov 2023 09:03:48 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-507cd62472dso3291345e87.0; Fri, 24 Nov 2023 09:03:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700845427; x=1701450227; 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=EKb6+bJzwF1yVBhWWW80XyJQx4h4KUg59OSYpW9sau0=; b=WjoEaUZ4wJ73dYA0hN85Q5UYN4itlCaXUo50E7ES5M8trOlAkLha2Cq3BgRFqu+SBy +K+lTTn7Q5aEqRT2hZUH341Tw3AUJ+KJxRSBQrShjIxTQnZ/CvZ0Te/l/R9UwhRYczPH DHtXYHe8ThwoOgLPCgAM+Ly/93Kqn/lffSJ6x7lz2U7VxmKzbksTTy7/WqLlpnPVqgRN rCILhfNtduSxfR8KTeVTTbnr8CB8krA1A1XknffSW8CQboqvL0RuMKjLuKaaShkarKlQ Uw/EPySeH1y70xxWTNSs7iKXafCjBJlY9gyD9/BxTpuWSiJWzBLCzoxbpWiFqcZ4rGrV WLeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700845427; x=1701450227; 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=EKb6+bJzwF1yVBhWWW80XyJQx4h4KUg59OSYpW9sau0=; b=fQw9WlS/qsP+iR4+ns+nfrU7/KpeqQcxUKq5FwT20DidGpq96/vvnt3+U0F1l7AAG8 5tkBB83EMEq8JEPxhCHND7D/dyWy3fjIHLyjfn3FSGsVcJ4utdRUtcG+Z+lP4XPLe5uz zGVNxj9eDKuatNCOJ4Ad7Y78Uc3Fcml0kfyYfcfhZaeVpQyfhdbDzfXwGDQAYgeiS+KP rSrar1UNSmcuopPw3tm8tp8/G4DrfSHZOjrk9BCmTkKhbIrlSJW/hX6uBHHn4Lor8aMi tBgvP0bVnWCDt2bv98wKIAXSv2R7P8gq8yyYam+yVLYYl5wAiROzp1aMY71Tl05gXXAz GG0w== X-Gm-Message-State: AOJu0YzuAR6wVx7Z8h9eKRZJ68hPbnQWaMmx7P+quZ3jMkR4pOkRXlpB Oh8tmZ7FASNr5N6fWPm6OkQ= X-Received: by 2002:ac2:43a6:0:b0:50a:a8d4:25f9 with SMTP id t6-20020ac243a6000000b0050aa8d425f9mr2118002lfl.12.1700845426591; Fri, 24 Nov 2023 09:03:46 -0800 (PST) Received: from mobilestation ([178.176.56.174]) by smtp.gmail.com with ESMTPSA id be7-20020a056512250700b005094928cf75sm556137lfb.142.2023.11.24.09.03.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 09:03:46 -0800 (PST) Date: Fri, 24 Nov 2023 20:03:43 +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 Subject: Re: [PATCH net v2 1/1] net: stmmac: xgmac: Disable FPE MMC interrupts Message-ID: References: <20231124015433.2223696-1-0x1207@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231124015433.2223696-1-0x1207@gmail.com> 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: 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]); Fri, 24 Nov 2023 09:04:00 -0800 (PST) On Fri, Nov 24, 2023 at 09:54:33AM +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. > Now we mask FPE TX and RX interrupts to disable all MMC interrupts. > > Fixes: aeb18dd07692 ("net: stmmac: xgmac: Disable MMC interrupts by default") > Signed-off-by: Furong Xu <0x1207@gmail.com> > --- > 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..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 Could you please preserve the local implicit naming convention of having the Tx_ and RX_ prefixes being placed before the rest of CSR-specific name part: #define MMC_XGMAC_TX_FPE_INTR_MASK instead of #define MMC_XGMAC_FPE_TX_INTR_MASK and #define MMC_XGMAC_RX_FPE_INTR_MASK instead of #define MMC_XGMAC_FPE_RX_INTR_MASK Your macros will then look similar to MMC_XGMAC_TX_*, MMC_XGMAC_RX_* and finally MMC_XGMAC_RX_IPC_INTR_MASK macros. -Serge(y) > #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); > } > > -- > 2.34.1 > >