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 C7A8639E178; Wed, 25 Feb 2026 11:45:12 +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=1772019918; cv=none; b=C2ujQd0UXVSgnpk+vc7YsHp0pKCjKZCjW9vQMsJQYFhg0Bg4nKq6t+SQzzSmITduOHPwp9CPbXXwyA+AtlBTm8rylEbO+J4hqeRpqBMKNp/uHTlhQK/n5QUtBi5tl3wfr0xD05DdPiDfFHfAb7HR/ADBht5SlsaqTwdhZIIUDWg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772019918; c=relaxed/simple; bh=CTybixJxBxdcj0x2/JUAaqbuEFOaG0od0YShzH5AAD0=; h=In-Reply-To:References:From:To:Cc:Subject:MIME-Version: Content-Disposition:Content-Type:Message-Id:Date; b=O6G5MPmOd42Hy4EnL1TSx37HEmx9tRGdyv3+qeo/T9xj6+qK+uEVurqAsv4GwO+7UsydmqHO2KaRMDJTYOGawf3NK7AewCIDRHN/9zNLP64GgHzLLiBZyU0GQKQCFlzZkR2hjK+T9tHgFFhxhBd81riBnAZTSTN9WfEuTedOKTQ= 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=zhTAb+CQ; 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="zhTAb+CQ" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To: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=0MtvxB2KyHL1m+s6b8uJYo26xFODbtz3APSycwGsCW8=; b=zhTAb+CQzu0C5JpoWfQuxOVi+s nqG7GWMnoTWy96rEgOCsDhC6X+Oq9VTGwNMrBIwHJ+6WH99QfZviOr9S5UgNRtenqE9YVECk63A7t +StOj3Q9Q+OarNPJHVlS641B7UWXi6KUETH4NN1yRA0i5IZbOHOemeByAtdZYO51BH3cawztPIS24 gcN77HfZy37lwpr0Bm5LJgHqXDUpeSDxTOLsykCeksIJdXsbcAJSllrxDTVekBfEYUEe3Xejkz9UL /ntbF3z4YqIpIZkZBA18tTbSXT7qd4n0VwQDD9nmikvT+1BxBLG0HTRCeDVTL1H+WW81DfwXlYosd P5bVmmDA==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:33266 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vvDKC-000000006b4-0o3H; Wed, 25 Feb 2026 11:45:04 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.98.2) (envelope-from ) id 1vvDK8-0000000Arhq-26p4; Wed, 25 Feb 2026 11:45:00 +0000 In-Reply-To: References: From: "Russell King (Oracle)" To: Andrew Lunn Cc: Alexandre Torgue , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Mohd Ayaan Anwar , netdev@vger.kernel.org, Paolo Abeni , Vinod Koul Subject: [PATCH RFC net-next 7/7] net: stmmac: report PCS configuration changes Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" Message-Id: Sender: Russell King Date: Wed, 25 Feb 2026 11:45:00 +0000 Report if/when qcom-ethqos changes the PCS configuration. With phylink now setting the PCS configuration, there should be no need for drivers to change this. Signed-off-by: Russell King (Oracle) --- drivers/net/ethernet/stmicro/stmmac/stmmac_pcs.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pcs.h b/drivers/net/ethernet/stmicro/stmmac/stmmac_pcs.h index b2b12d34b3dd..83651292578c 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pcs.h +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pcs.h @@ -71,6 +71,7 @@ static inline void dwmac_ctrl_ane(void __iomem *ioaddr, u32 reg, bool ane, bool srgmi_ral) { u32 value = readl(ioaddr + GMAC_AN_CTRL(reg)); + u32 old = value, diff; /* Enable and restart the Auto-Negotiation */ if (ane) @@ -84,6 +85,20 @@ static inline void dwmac_ctrl_ane(void __iomem *ioaddr, u32 reg, bool ane, if (srgmi_ral) value |= GMAC_AN_CTRL_SGMRAL; + diff = old ^ value; + if (diff & ~GMAC_AN_CTRL_RAN) { + pr_warn("dwmac: PCS configuration changed from phylink by glue, please report: 0x%08x -> 0x%08x\n", + old & ~GMAC_AN_CTRL_RAN, value & ~GMAC_AN_CTRL_RAN); +#define REPORT_BIT(x) \ + if (diff & GMAC_AN_CTRL_##x) \ + pr_warn("dwmac: %8s %u -> %u\n", #x, \ + !!(old & GMAC_AN_CTRL_##x), \ + !!(value & GMAC_AN_CTRL_##x)) + REPORT_BIT(ANE); + REPORT_BIT(SGMRAL); +#undef REPORT_BIT + } + writel(value, ioaddr + GMAC_AN_CTRL(reg)); } #endif /* __STMMAC_PCS_H__ */ -- 2.47.3