Subject: Re: [PATCH net] net: usb: asix: ax88772: replace usbnet_link_change() with queue_work() and usbnet_unlink_rx_urbs()

From: Oleksij Rempel <[email-masked]>
Date: Wed, 6 May 2026 14:58:11 +0200

On Wed, May 06, 2026 at 03:03:44AM +0200, Markus Baier wrote:
> Commit 36bdc0e815b4 ("net: usb: asix: ax88772: re-add usbnet_link_change()
> in phylink callbacks") restored the link-change notification that was
> lost during the phylink migration, by calling usbnet_link_change() from
> the phylink mac_link_up() / mac_link_down() callbacks.
> 
> While this fixed the original symptom (RX URB submission not being
> initiated after link up), usbnet_link_change() also calls
> netif_carrier_off() on link-down, which is redundant in a phylink-based
> driver because phylink manages the carrier state itself.
> 
> Replace the usbnet_link_change() calls with the minimal operations:
> 
>   - In ax88772_mac_link_up(), schedule dev->bh_work directly via
>     queue_work(system_bh_wq, &dev->bh_work). This is the same
>     mechanism usbnet_open() uses to schedule the bottom-half
>     that submits RX URBs.
> 
>   - In ax88772_mac_link_down(), call usbnet_unlink_rx_urbs() to
>     return any in-flight RX URBs to the host controller.
>     This releases USB bandwidth and avoids keeping unused buffers
>     queued while the link is down. This is the symmetric
>     counterpart to scheduling new RX URBs on link up.
> 
> Tested with the Apple A1277 USB Ethernet Adapter (05ac:1402,
> AX88772A based) on a Banana Pro (Allwinner A20).
> 
> Fixes: 36bdc0e815b4 ("net: usb: asix: ax88772: re-add usbnet_link_change() in phylink callbacks")
> Assisted-by: Claude:claude-opus-4-7
> Signed-off-by: Markus Baier <[email-masked]>

Tested on AX88772C. Thx!

Tested-by: Oleksij Rempel <[email-masked]> 

-- 
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 |