* [PATCH net] net: ti: icssg-prueth: Fix ping failure after offload mode setup when link speed is not 1G
@ 2026-02-26 10:23 MD Danish Anwar
2026-02-28 22:24 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: MD Danish Anwar @ 2026-02-26 10:23 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Meghana Malladi, Jacob Keller
Cc: linux-arm-kernel, netdev, linux-kernel, srk, Vignesh Raghavendra,
Roger Quadros, danishanwar
When both eth interfaces with links up are added to a bridge or hsr
interface, ping fails if the link speed is not 1Gbps (e.g., 100Mbps).
The issue is seen because when switching to offload (bridge/hsr) mode,
prueth_emac_restart() restarts the firmware and clears DRAM with
memset_io(), setting all memory to 0. This includes PORT_LINK_SPEED_OFFSET
which firmware reads for link speed. The value 0 corresponds to
FW_LINK_SPEED_1G (0x00), so for 1Gbps links the default value is correct
and ping works. For 100Mbps links, the firmware needs FW_LINK_SPEED_100M
(0x01) but gets 0 instead, causing ping to fail. The function
emac_adjust_link() is called to reconfigure, but it detects no state change
(emac->link is still 1, speed/duplex match PHY) so new_state remains false
and icssg_config_set_speed() is never called to correct the firmware speed
value.
The fix resets emac->link to 0 before calling emac_adjust_link() in
prueth_emac_common_start(). This forces new_state=true, ensuring
icssg_config_set_speed() is called to write the correct speed value to
firmware memory.
Fixes: 06feac15406f ("net: ti: icssg-prueth: Fix emac link speed handling")
Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
---
drivers/net/ethernet/ti/icssg/icssg_prueth.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth.c b/drivers/net/ethernet/ti/icssg/icssg_prueth.c
index 0939994c932f..42a881bee109 100644
--- a/drivers/net/ethernet/ti/icssg/icssg_prueth.c
+++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.c
@@ -273,6 +273,14 @@ static int prueth_emac_common_start(struct prueth *prueth)
if (ret)
goto disable_class;
+ /* Reset link state to force reconfiguration in
+ * emac_adjust_link(). Without this, if the link was already up
+ * before restart, emac_adjust_link() won't detect any state
+ * change and will skip critical configuration like writing
+ * speed to firmware.
+ */
+ emac->link = 0;
+
mutex_lock(&emac->ndev->phydev->lock);
emac_adjust_link(emac->ndev);
mutex_unlock(&emac->ndev->phydev->lock);
base-commit: 97f87e578883abe2c8bec947dbdfdc4bf624f796
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: ti: icssg-prueth: Fix ping failure after offload mode setup when link speed is not 1G
2026-02-26 10:23 [PATCH net] net: ti: icssg-prueth: Fix ping failure after offload mode setup when link speed is not 1G MD Danish Anwar
@ 2026-02-28 22:24 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-02-28 22:24 UTC (permalink / raw)
To: MD Danish Anwar
Cc: andrew+netdev, davem, edumazet, kuba, pabeni, m-malladi,
jacob.e.keller, linux-arm-kernel, netdev, linux-kernel, srk,
vigneshr, rogerq
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 26 Feb 2026 15:53:56 +0530 you wrote:
> When both eth interfaces with links up are added to a bridge or hsr
> interface, ping fails if the link speed is not 1Gbps (e.g., 100Mbps).
>
> The issue is seen because when switching to offload (bridge/hsr) mode,
> prueth_emac_restart() restarts the firmware and clears DRAM with
> memset_io(), setting all memory to 0. This includes PORT_LINK_SPEED_OFFSET
> which firmware reads for link speed. The value 0 corresponds to
> FW_LINK_SPEED_1G (0x00), so for 1Gbps links the default value is correct
> and ping works. For 100Mbps links, the firmware needs FW_LINK_SPEED_100M
> (0x01) but gets 0 instead, causing ping to fail. The function
> emac_adjust_link() is called to reconfigure, but it detects no state change
> (emac->link is still 1, speed/duplex match PHY) so new_state remains false
> and icssg_config_set_speed() is never called to correct the firmware speed
> value.
>
> [...]
Here is the summary with links:
- [net] net: ti: icssg-prueth: Fix ping failure after offload mode setup when link speed is not 1G
https://git.kernel.org/netdev/net/c/147792c395db
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-28 22:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-26 10:23 [PATCH net] net: ti: icssg-prueth: Fix ping failure after offload mode setup when link speed is not 1G MD Danish Anwar
2026-02-28 22:24 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox