From mboxrd@z Thu Jan 1 00:00:00 1970 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 09A5ED0E6D6 for ; Mon, 21 Oct 2024 09:25:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qqjoCgvG5CCB6J/vMfx+zCiOUsVg3KVV8Hr8F4GQT38=; b=iFXxrp6Plqsxu/B5sjzdX01m8L wo8zEawinCc6dC4l3HHt/crXo9JgCgjlX+lqvKDu21w1c/8UWSwXUkJOsMt8xmiXXOg81XyDgDeDN 3jLmmkkb0Mk1c2jFAdoF085Xhe7fqTcP/bhgruDNtMjCtf1DlPUWyY71a2AnPei7LTPvzObF4Mf4V nBYPacqJIbH99ert6pONrscmN7tNsKAfU26/5MaizWbjvDMfEKd023LlLlct1CoAeHmENlEaFwqBD TJ+rOyx6WeGsgHG20WJR7Fe/vTzxByWYOd9D5p5yw4sJDkdq6JbU7HjS4ZTDk4jfK/jMCrSlvGYHZ dwcYnc/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t2oej-00000006gpZ-1TH9; Mon, 21 Oct 2024 09:24:53 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t2ock-00000006gC5-26de for linux-arm-kernel@lists.infradead.org; Mon, 21 Oct 2024 09:22:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=qqjoCgvG5CCB6J/vMfx+zCiOUsVg3KVV8Hr8F4GQT38=; b=A5c9JpQgO4zzYKGKMeXHuxCord k3nZiSRM1eEz9U74AgcejarJlEJaa+W03r9U+vtw217OPrydOc9zTTWE1IOuJQPnj1rFO33hCJgj+ 8isEA7lVWI++f8/UQX7GA9xH4xjx/91HpFkd3jx3mlPeA7P/hb6gTdLQudyutGUOmkbEAzcXU/QOm niAcdnIXbFZz3uSo/1c6QQKS7uXc5CF9P5n85VBxzm87f5LiJ/CuD1xRRylwiqxmlAvusiOcMVyr3 c7bKY8BbgopPIuazalh/ZURXHHQKodZfDgCO21p1DlXWpz07YTu3BjpVSW+SL3Yu5tNXjhzSTxHXw 3UhN2kWQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:54450) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1t2oaU-000352-2T; Mon, 21 Oct 2024 10:20:31 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.96) (envelope-from ) id 1t2oaP-0001cT-0A; Mon, 21 Oct 2024 10:20:25 +0100 Date: Mon, 21 Oct 2024 10:20:24 +0100 From: "Russell King (Oracle)" To: Andrew Lunn Cc: Abhishek Chauhan , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Andrew Halaney , Simon Horman , Jon Hunter , kernel@quicinc.com Subject: Re: [PATCH net v1] net: stmmac: Disable PCS Link and AN interrupt when PCS AN is disabled Message-ID: References: <20241018222407.1139697-1-quic_abchauha@quicinc.com> <60119fa1-e7b1-4074-94ee-7e6100390444@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <60119fa1-e7b1-4074-94ee-7e6100390444@lunn.ch> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241021_022250_572968_6AF91051 X-CRM114-Status: GOOD ( 17.14 ) 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 On Sat, Oct 19, 2024 at 04:45:16AM +0200, Andrew Lunn wrote: > On Fri, Oct 18, 2024 at 03:24:07PM -0700, Abhishek Chauhan wrote: > > Currently we disable PCS ANE when the link speed is 2.5Gbps. > > mac_link_up callback internally calls the fix_mac_speed which internally > > calls stmmac_pcs_ctrl_ane to disable the ANE for 2.5Gbps. > > > > We observed that the CPU utilization is pretty high. That is because > > we saw that the PCS interrupt status line for Link and AN always remain > > asserted. Since we are disabling the PCS ANE for 2.5Gbps it makes sense > > to also disable the PCS link status and AN complete in the interrupt > > enable register. > > > > Interrupt storm Issue:- > > [ 25.465754][ C2] stmmac_pcs: Link Down > > [ 25.469888][ C2] stmmac_pcs: Link Down > > [ 25.474030][ C2] stmmac_pcs: Link Down > > [ 25.478164][ C2] stmmac_pcs: Link Down > > [ 25.482305][ C2] stmmac_pcs: Link Down > > I don't know this code, so i cannot really comment if not enabling the > interrupt is the correct fix or not. But generally an interrupt storm > like this is cause because you are not acknowledging the interrupt > correctly to clear its status. So rather than not enabling it, maybe > you should check what is the correct way to clear the interrupt once > it happens? stmmac PCS support is total crap and shouldn't be used, or stmmac should not be using phylink. It's one or the other. Blame Serge for this mess. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!