Re: [PATCH] net: usb: Remove disruptive netif_wake_queue in rtl8150_set_multicast
From: Andrew Lunn
Date: Sat Sep 20 2025 - 13:29:12 EST
> Thanks for pointing that out. I wasn't thinking from that point of view.
>
> According to Documentation, rtl8150_set_multicast (the
> ndo_set_rx_mode callback) should
> rely on the netif_addr_lock spinlock, not the netif_tx_lock
> manipulated by netif
> stop/start/wake queue functions.
>
> However, There is no need to use the netif_addr_lock in the driver
> directly because
> the core function (dev_set_rx_mode) invoking this function locks
> and unlocks the lock
> correctly.
>
> Synchronization is therefore handled by the core, making it safe
> to remove that lock.
>
> From what I have seen, every network driver assumes this for the
> ndo_set_rx_mode callback.
>
> I am not sure what the historical context was for using the
> tx_lock as the synchronization
> mechanism here but it's definitely not valid in the modern networking stack.
Thanks. Please include an explanation in V2. Also, please read:
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
Andrew