From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8BCED1F92E for ; Sat, 12 Apr 2025 09:35:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744450512; cv=none; b=V7iY8qV7CfS0tlccaFGoA8t7gfoC5kEWWLzFA5nTJnWd6nkuiPf8+JM30Mge9Sf5SvmbvFIA/Bv2sQHTr1c55Gnzzmlz4dnQidVDMi6TWQxERB/91jgz3itBq8bnaiy+GV8fnp3dvXl8lRkb9eXLx0zj/j6rAhAA+Q/A8tRaLqk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744450512; c=relaxed/simple; bh=KRM94i2mjkyw8ENn/r/OgWcerfbDk88X+dglh2v8jpM=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=tfngYs3Hi+z7ZqPEQYl7o0dngJ/u8QAXLkfY5lIn4shyXzvT0RusfSj8NLHShCuevZHqyG8ze1ZKmhbPSgn9+9sAwVKAqTBG0Jdol6OF/O2/kVsebeSJRZ1i7kT5TtiD1XDM93pEoESqam2nqFT1AkopxgLBNoJ2L8l3w+47WSA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=k0KAIMTn; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="k0KAIMTn" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:Content-Type:MIME-Version: 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:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=73zpcZNzKe8FYfTe+3EaL4lfP342rNv4xALU1Mdg9ZI=; b=k0KAIMTnhYWnkciA3DJxXWVNqJ 8cAMrVPgalWOqaiY5qYM13rKcaMn3IzWJrGZG72VO8QuZL3YZVzjY2h4nTp0diSeYT14aEvWxjdAK TaansuIYENUC6QqjdfHH4SAIbndzr1jDW3wtghGXt8bNpZk3zGYt/CG7/fuHgNUryHrk0LM+5Agl5 /RdGzml4jqvR+tW+xi8qb/HnyGeMdq9tkHgmptIiqynbMJJx0qMphLii7hHpnarZCzpAXMmsyrByR 0ghvTQZSlp1QGZozy6iG38tJBEJYFwzTq1H8cUm1TuVK2VzPU4PNRj+pJgpPwni4AJ9S0HMNwQZR6 cj4Mdd8g==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:43880) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u3XGM-0004QK-0B; Sat, 12 Apr 2025 10:34:58 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.96) (envelope-from ) id 1u3XGG-0005Yi-1k; Sat, 12 Apr 2025 10:34:52 +0100 Date: Sat, 12 Apr 2025 10:34:52 +0100 From: "Russell King (Oracle)" To: Andrew Lunn , Heiner Kallweit Cc: Alexandre Torgue , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Jon Hunter , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Coquelin , netdev@vger.kernel.org, Paolo Abeni , Thierry Reding Subject: [PATCH net-next 0/3] net: stmmac: fix setting RE and TE inappropriately Message-ID: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: Russell King (Oracle) Hi, This series addresses inappropriate setting of the receive and transmit enables in the GMAC control register identified back in https://lore.kernel.org/r/Z8BboX9RxZBSXRr1@shell.armlinux.org.uk The databook is clear for the receive enable, that this should not be set until the initialisation of the MAC and DMA has been completed. The previous RFC patch series ("net: stmmac: fix resume failures due to RX clock") which moves phylink_resume() solves that, but we are left with these enables being set when the link is down. This is not correct. Sadly, when XDP support was added, new calls to netif_carrier_on() and netif_carrier_off() were added, which are incorrect in drivers that make use of phylink - by doing so, the driver has no guarantee that the .mac_link_up() and .mac_link_down() methods will be called in sequence anymore. This is fixed in patch 1. We remove manipulation of the RE and TE bits from the start_tx(), stop_tx(), start_rx() and stop_rx() methods for each core. Finally, we remove the stmmac_mac_set() call from stmmac_hw_setup(). drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c | 8 -------- drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 12 ------------ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 17 ++++++----------- 3 files changed, 6 insertions(+), 31 deletions(-) -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!