mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
net: usb: asix: ax88772: re-add usbnet_link_change() in phylink callbacks
Commite0bffe3e68("net: asix: ax88772: migrate to phylink") replaced the asix_adjust_link() PHY callback with phylink's mac_link_up() and mac_link_down() handlers, but did not carry over the usbnet_link_change() notification that commit805206e66f("net: asix: fix "can't send until first packet is send" issue") had added. As a result, the original symptom returns: when the link comes up, usbnet is never notified, so the RX URB submission stays dormant until some other event (e.g. a transmitted packet triggering the status endpoint interrupt) wakes it up. This is reproducible with the Apple A1277 USB Ethernet Adapter (05ac:1402, AX88772A based) on a Banana Pro using a static IPv4 configuration. After bringing the interface up, no incoming packets are received until the first outgoing frame triggers usbnet's RX path. Restore the link change notification, gated on a carrier transition so the call remains idempotent if the status endpoint also reports the change later. Fixes:e0bffe3e68("net: asix: ax88772: migrate to phylink") Signed-off-by: Markus Baier <Markus.Baier@soslab.tu-darmstadt.de> Tested-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://patch.msgid.link/20260501163941.107668-1-Markus.Baier@soslab.tu-darmstadt.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
76b93a8107
commit
36bdc0e815
|
|
@ -756,6 +756,7 @@ static void ax88772_mac_link_down(struct phylink_config *config,
|
|||
struct usbnet *dev = netdev_priv(to_net_dev(config->dev));
|
||||
|
||||
asix_write_medium_mode(dev, 0, 0);
|
||||
usbnet_link_change(dev, false, false);
|
||||
}
|
||||
|
||||
static void ax88772_mac_link_up(struct phylink_config *config,
|
||||
|
|
@ -786,6 +787,7 @@ static void ax88772_mac_link_up(struct phylink_config *config,
|
|||
m |= AX_MEDIUM_RFC;
|
||||
|
||||
asix_write_medium_mode(dev, m, 0);
|
||||
usbnet_link_change(dev, true, false);
|
||||
}
|
||||
|
||||
static const struct phylink_mac_ops ax88772_phylink_mac_ops = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user