* [PATCH net] net: usb: asix: ax88772: re-add usbnet_link_change() in phylink callbacks
@ 2026-05-01 16:39 Markus Baier
2026-05-04 7:20 ` Oleksij Rempel
2026-05-05 2:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 4+ messages in thread
From: Markus Baier @ 2026-05-01 16:39 UTC (permalink / raw)
To: Oleksij Rempel
Cc: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Russell King, Ethan Nelson-Moore, Miaoqian Lin,
linux-usb, netdev, linux-kernel, Markus Baier
Commit e0bffe3e6894 ("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 commit 805206e66fab ("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: e0bffe3e6894 ("net: asix: ax88772: migrate to phylink")
Assisted-by: Claude:claude-opus-4-7
Signed-off-by: Markus Baier <Markus.Baier@soslab.tu-darmstadt.de>
---
Transparency notice: The English formulation of this bug report was
prepared with AI assistance. The actual system testing and verification
of the issue were performed manually without AI involvement.
The bug was originally located via git bisect between v5.13 (good)
and v5.14 (first bad), pointing to commit e532a096be0e ("net: usb: asix:
ax88772: add phylib support"). Commit 805206e66fab later fixed this in
v5.19, but commit e0bffe3e6894 (phylink migration in v6.x) re-introduced
the same symptom by replacing the asix_adjust_link() callback path
without porting the usbnet_link_change() call to the new phylink
mac_link_up/down handlers.
First Tested on Linux 6.18.18-gentoo with Apple A1277 USB Ethernet Adapter
(05ac:1402, AX88772A based) on a Banana Pro (Allwinner A20).
Later on Linux 7.1.0-rc1 with identical hardware setup.
drivers/net/usb/asix_devices.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
index df0bcfedddbc..293ef80c4e30 100644
--- a/drivers/net/usb/asix_devices.c
+++ b/drivers/net/usb/asix_devices.c
@@ -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 = {
--
2.52.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net] net: usb: asix: ax88772: re-add usbnet_link_change() in phylink callbacks
2026-05-01 16:39 [PATCH net] net: usb: asix: ax88772: re-add usbnet_link_change() in phylink callbacks Markus Baier
@ 2026-05-04 7:20 ` Oleksij Rempel
2026-05-05 2:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 4+ messages in thread
From: Oleksij Rempel @ 2026-05-04 7:20 UTC (permalink / raw)
To: Markus Baier
Cc: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Russell King, Ethan Nelson-Moore, Miaoqian Lin,
linux-usb, netdev, linux-kernel
Hi Markus,
On Fri, May 01, 2026 at 06:39:41PM +0200, Markus Baier wrote:
> Commit e0bffe3e6894 ("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 commit 805206e66fab ("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: e0bffe3e6894 ("net: asix: ax88772: migrate to phylink")
> Assisted-by: Claude:claude-opus-4-7
> Signed-off-by: Markus Baier <Markus.Baier@soslab.tu-darmstadt.de>
I did some limited testing on AX88772C. Seems to work without
regressions:
Tested-by: Oleksij Rempel <o.rempel@pengutronix.de>
Sashiko suggests to update commit message:
https://sashiko.dev/#/patchset/20260501163941.107668-1-Markus.Baier%40soslab.tu-darmstadt.de
Thank you!
Best Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net] net: usb: asix: ax88772: re-add usbnet_link_change() in phylink callbacks
2026-05-01 16:39 [PATCH net] net: usb: asix: ax88772: re-add usbnet_link_change() in phylink callbacks Markus Baier
2026-05-04 7:20 ` Oleksij Rempel
@ 2026-05-05 2:20 ` patchwork-bot+netdevbpf
2026-05-05 10:33 ` Baier, Markus
1 sibling, 1 reply; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-05-05 2:20 UTC (permalink / raw)
To: Markus Baier
Cc: o.rempel, andrew+netdev, davem, edumazet, kuba, pabeni, linux,
enelsonmoore, linmq006, linux-usb, netdev, linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 1 May 2026 18:39:41 +0200 you wrote:
> Commit e0bffe3e6894 ("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 commit 805206e66fab ("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.
>
> [...]
Here is the summary with links:
- [net] net: usb: asix: ax88772: re-add usbnet_link_change() in phylink callbacks
https://git.kernel.org/netdev/net/c/36bdc0e815b4
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net] net: usb: asix: ax88772: re-add usbnet_link_change() in phylink callbacks
2026-05-05 2:20 ` patchwork-bot+netdevbpf
@ 2026-05-05 10:33 ` Baier, Markus
0 siblings, 0 replies; 4+ messages in thread
From: Baier, Markus @ 2026-05-05 10:33 UTC (permalink / raw)
To: patchwork-bot+netdevbpf@kernel.org
Cc: o.rempel@pengutronix.de, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, linux@armlinux.org.uk, enelsonmoore@gmail.com,
linmq006@gmail.com, linux-usb@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Hello,
for your information, the current version of the patch goes a bit too far,
as using the "usbnet_link_change" function in this context.
called from the "mac_link_up" or "mac_link_down" functions, works but
is not ideal.
With Oleksij's help, I have since been able to create a new patch
that specifically enables or disables only the RX URB submission.
I will submit the new patch as v2 of the current patch later today
or tomorrow at the latest.
I have completed testing of the new patch, and the results were positive.
PS: Sorry that I sent the first email in HTML format
Best regards
Markus
Von: patchwork-bot+netdevbpf@kernel.org <patchwork-bot+netdevbpf@kernel.org>
Gesendet: Dienstag, 5. Mai 2026 04:20:07
An: Baier, Markus
Cc: o.rempel@pengutronix.de; andrew+netdev@lunn.ch; davem@davemloft.net; edumazet@google.com; kuba@kernel.org; pabeni@redhat.com; linux@armlinux.org.uk; enelsonmoore@gmail.com; linmq006@gmail.com; linux-usb@vger.kernel.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org
Betreff: Re: [PATCH net] net: usb: asix: ax88772: re-add usbnet_link_change() in phylink callbacks
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 1 May 2026 18:39:41 +0200 you wrote:
> Commit e0bffe3e6894 ("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 commit 805206e66fab ("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.
>
> [...]
Here is the summary with links:
- [net] net: usb: asix: ax88772: re-add usbnet_link_change() in phylink callbacks
https://git.kernel.org/netdev/net/c/36bdc0e815b4
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-05-05 10:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-01 16:39 [PATCH net] net: usb: asix: ax88772: re-add usbnet_link_change() in phylink callbacks Markus Baier
2026-05-04 7:20 ` Oleksij Rempel
2026-05-05 2:20 ` patchwork-bot+netdevbpf
2026-05-05 10:33 ` Baier, Markus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox