Skip to contentSkip to conversation

net: phy: meson-gxl: improve link-up behavior

PATCH Applied Heiner Kallweit 2 participants 2 messages Mar 9, 2022 – Mar 10, 2022

Subsystems (4)
lore
Share & tools
lore

Heiner Kallweit

author maintainer
#0 lore raw

PATCH 1/1 net: phy: meson-gxl: improve link-up behavior

Sometimes the link comes up but no data flows. This patch fixes this behavior. It's not clear what's the root cause of the issue.

According to the tests one other link-up issue remains. In very rare cases the link isn't even reported as up.

Fixes 84c8f773d2dc ("net: phy: meson-gxl: remove the use of .ack_callback()")
---
 drivers/net/phy/meson-gxl.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/net/phy/meson-gxl.c +7 -1
index c49062ad7..73f7962a3 100644
@@ -243,7 +243,13 @@ static irqreturn_t meson_gxl_handle_interrupt(struct phy_device *phydev)
 	    irq_status == INTSRC_ENERGY_DETECT)
 		return IRQ_HANDLED;
 
-	phy_trigger_machine(phydev);
+	/* Give PHY some time before MAC starts sending data. This works
+	 * around an issue where network doesn't come up properly.
+	 */
+	if (!(irq_status & INTSRC_LINK_DOWN))
+		phy_queue_state_machine(phydev, msecs_to_jiffies(100));
+	else
+		phy_trigger_machine(phydev);
 
 	return IRQ_HANDLED;
 }
Signature · 1 line
2.35.1
#1 lore raw
This patch was applied to netdev/net.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <[email protected]>:

Quoted 11 lines · On Wed, 9 Mar 2022 22:04:47 +0100 you wrote:

Sometimes the link comes up but no data flows. This patch fixes this behavior. It's not clear what's the root cause of the issue.

According to the tests one other link-up issue remains. In very rare cases the link isn't even reported as up.

Fixes 84c8f773d2dc ("net: phy: meson-gxl: remove the use of .ack_callback()")

[...]

Here is the summary with links:
- [net] net: phy: meson-gxl: improve link-up behavior

    https://git.kernel.org/netdev/net/c/2c87c6f9fbdd

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html