Skip to content

Commit 2c87c6f

Browse files
hkallweitkuba-moo
authored andcommitted
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: 84c8f77 ("net: phy: meson-gxl: remove the use of .ack_callback()") Tested-by: Erico Nunes <[email protected]> Signed-off-by: Heiner Kallweit <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 00b022f commit 2c87c6f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/net/phy/meson-gxl.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,13 @@ static irqreturn_t meson_gxl_handle_interrupt(struct phy_device *phydev)
243243
irq_status == INTSRC_ENERGY_DETECT)
244244
return IRQ_HANDLED;
245245

246-
phy_trigger_machine(phydev);
246+
/* Give PHY some time before MAC starts sending data. This works
247+
* around an issue where network doesn't come up properly.
248+
*/
249+
if (!(irq_status & INTSRC_LINK_DOWN))
250+
phy_queue_state_machine(phydev, msecs_to_jiffies(100));
251+
else
252+
phy_trigger_machine(phydev);
247253

248254
return IRQ_HANDLED;
249255
}

0 commit comments

Comments
 (0)