RE: [PATCH] net: usb: r8152: fix transmit queue timeout

From: Hayes Wang

Date: Tue Jan 13 2026 - 23:38:41 EST


insyelu <insyelu@xxxxxxxxx>
> Sent: Wednesday, January 14, 2026 10:56 AM
[...]
> When the TX queue length reaches the threshold, the netdev watchdog
> immediately detects a TX queue timeout.
>
> This patch updates the transmit queue's trans_start timestamp upon
> completion of each asynchronous USB URB submission on the TX path,
> ensuring the network watchdog correctly reflects ongoing transmission
> activity.
>
> Signed-off-by: insyelu <insyelu@xxxxxxxxx>
> ---
> drivers/net/usb/r8152.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
> index fa5192583860..afec602a5fdb 100644
> --- a/drivers/net/usb/r8152.c
> +++ b/drivers/net/usb/r8152.c
> @@ -1954,6 +1954,8 @@ static void write_bulk_callback(struct urb *urb)
>
> if (!skb_queue_empty(&tp->tx_queue))
> tasklet_schedule(&tp->tx_tl);
> +
> + netif_trans_update(netdev);
> }

Based on the definition of netif_trans_update(), I think it would be better to move it into tx_agg_fill().
Such as

--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -2449,6 +2449,8 @@ static int r8152_tx_agg_fill(struct r8152 *tp, struct tx_agg *agg)
ret = usb_submit_urb(agg->urb, GFP_ATOMIC);
if (ret < 0)
usb_autopm_put_interface_async(tp->intf);
+ else
+ netif_trans_update(tp->netdev);

out_tx_fill:
return ret;

Best Regards,
Hayes