Skip to content

Commit

Permalink
smsc95xx: fix stalled rx after link change
Browse files Browse the repository at this point in the history
After commit 05b35e7 ("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: 05b35e7 ("smsc95xx: add phylib support")
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
aakoskin authored and davem330 committed Sep 24, 2021
1 parent 597aa16 commit 5ab8a44
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/usb/smsc95xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5ab8a44

Please sign in to comment.