2021-09-23 22:19:05

by Aaro Koskinen

[permalink] [raw]
Subject: [PATCH] smsc95xx: fix stalled rx after link change

After commit 05b35e7eb9a1 ("smsc95xx: add phylib support"), link changes
are no longer propagated to usbnet. As a result, rx URB allocation won't
happen until there is a packet sent out first (this might never happen,
e.g. running just ssh server with a static IP). Fix by triggering usbnet
EVENT_LINK_CHANGE.

Fixes: 05b35e7eb9a1 ("smsc95xx: add phylib support")
Signed-off-by: Aaro Koskinen <[email protected]>
---
drivers/net/usb/smsc95xx.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index 7d953974eb9b..26b1bd8e845b 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -1178,7 +1178,10 @@ static void smsc95xx_unbind(struct usbnet *dev, struct usb_interface *intf)

static void smsc95xx_handle_link_change(struct net_device *net)
{
+ struct usbnet *dev = netdev_priv(net);
+
phy_print_status(net->phydev);
+ usbnet_defer_kevent(dev, EVENT_LINK_CHANGE);
}

static int smsc95xx_start_phy(struct usbnet *dev)
--
2.17.0


2021-09-24 20:40:38

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH] smsc95xx: fix stalled rx after link change

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Fri, 24 Sep 2021 01:00:16 +0300 you wrote:
> After commit 05b35e7eb9a1 ("smsc95xx: add phylib support"), link changes
> are no longer propagated to usbnet. As a result, rx URB allocation won't
> happen until there is a packet sent out first (this might never happen,
> e.g. running just ssh server with a static IP). Fix by triggering usbnet
> EVENT_LINK_CHANGE.
>
> Fixes: 05b35e7eb9a1 ("smsc95xx: add phylib support")
> Signed-off-by: Aaro Koskinen <[email protected]>
>
> [...]

Here is the summary with links:
- smsc95xx: fix stalled rx after link change
https://git.kernel.org/netdev/net/c/5ab8a447bcfe

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html