From patchwork Sat Nov 25 06:01:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Furong Xu <0x1207@gmail.com> X-Patchwork-Id: 13468355 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E97D8C61D9D for ; Sat, 25 Nov 2023 06:02:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=nos+GYKScMd++9g6CrJOidLDpJTETaQmaU43mgaSx30=; b=BAC+Ryw8T3Ov+L KkDECP2SFp0wD8OrPtjOAjGKuXHTzKhcy/iZT7x3ZjR0M/z9keXTvkC94ndc+5Fa+RvrHhNP0X+gO SV1XtDW9bomvbLKX36acmFv+JCb3+os99RjAu6Hwil5oblo8WawJGMn9Z8fkRykD3T/rd20/Uijsd PcoSm9PiNxdicLyYWIB+Mj0Ep2cXtMGlR2xuHJmUZW1TCcXyWUxFZTUctimLFNaHT68KFF9ow+vGw V2NiweRnN5f0RLywi6eUf3WJm1SOZmp+DNRkXLZPU0DNONJWggblmlG4+qcT5B7M+XgoJ/1+esnEo CZmkvYJ/kHarcze4HNQA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r6lkG-008dvq-0P; Sat, 25 Nov 2023 06:02:24 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r6lkD-008dvS-1E for linux-arm-kernel@lists.infradead.org; Sat, 25 Nov 2023 06:02:22 +0000 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1cfa5a7a9ecso9125615ad.2 for ; Fri, 24 Nov 2023 22:02:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700892139; x=1701496939; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=FclhQf3qesEshzQHC5UsLSEyaxrJX7Yi4QUTwlsrBzo=; b=Fsc6HT/ibky54a0dAHr8MI7bcRBDHCbz/kUQQE2NZ4tT/8xpvjPCyesCFDdjwBIGhs qezh2wfJ2u2xHKVJo3TnP6mRaIHBDyumu+lyMkEwVRhqQhCRJbmPxRI/pib7stfm7noV NSwPMbyfvJTVxuFmH5wDfx90zkfbxMR1KWAyOqiiY58BMruy2f2GXbeItBzg/KlOL4kf vXRTRroweheNdvFLEchxw0B8tF+DNdWPnaWUIFS2rBrga8haOQeUv2Lt9zkQ2GTxfNtM ixwtR/FZ8YaPuYNsoK4iHjU7lBgYWG0emOur7xNYntr19cCMazznok3Wd9laS/b6U0EM PQrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700892139; x=1701496939; 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=FclhQf3qesEshzQHC5UsLSEyaxrJX7Yi4QUTwlsrBzo=; b=kHqp/Q55Z/UTCOZBeLae5+lqO79k4niCnXzjYysdjJXEcNiepnAmKLSz3jN0Iif6Nr Bt8vVU6qrG0G8cdtPYeYj56aOqG9h+xvE7XJlFlzKt7V32LeMkQDJejOAh9y/5cJ13xi gkSvHLvVgTur+FJla72N7ERatWxPxdQtFyDN4mz5ODOaglMybcpsTTvP4GqldBnkPIjJ dACVuQrhJ6OSWQ4fNoyDJlIzTrzbHqw1Cxax9w56jyZmMMRtBD8YhkW2DR2D4skEQvaD ftdb+N4gpdzVfBYjtv3wa9oY/gkCJ9+CCJ8DlGQAEpvdVzUxYMBuL/ll6c8cViKhqFRO i08w== X-Gm-Message-State: AOJu0Yz+KiS2EQot0YN1GF+sqJDa6cJkhBCEwCNZdlRcgQbJ+KrUfBkD cdj/RlKNdwDFmDhk8NfGG8D6MgRf0nU= X-Google-Smtp-Source: AGHT+IEyIZv6kPKcJuJsdF5mkhJzsr0Y/Z/jY64tcTkX225IcRn/vjh+aCjOupIC+C0YVipqna0Edg== X-Received: by 2002:a17:903:2596:b0:1cf:9d88:a0ef with SMTP id jb22-20020a170903259600b001cf9d88a0efmr4177631plb.59.1700892139281; Fri, 24 Nov 2023 22:02:19 -0800 (PST) Received: from localhost.localdomain ([74.48.130.204]) by smtp.googlemail.com with ESMTPSA id h11-20020a170902f7cb00b001c9c97beb9csm4142059plw.71.2023.11.24.22.02.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 22:02:18 -0800 (PST) From: Furong Xu <0x1207@gmail.com> To: "David S. Miller" , Alexandre Torgue , Jose Abreu , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Joao Pinto , Simon Horman 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>, Larysa Zaremba Subject: [PATCH net v3] net: stmmac: xgmac: Disable FPE MMC interrupts Date: Sat, 25 Nov 2023 14:01:26 +0800 Message-Id: <20231125060126.2328690-1-0x1207@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231124_220221_426443_68490186 X-CRM114-Status: GOOD ( 11.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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> Reviewed-by: Serge Semin Reviewed-by: Wojciech Drewek --- Changes in v3: - Update commit message, thanks Larysa. - Rename register defines, thanks Serge. 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); }