[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3501a6e902654554b61ab5cd89dcb0dd@realtek.com>
Date: Wed, 14 Jan 2026 04:38:16 +0000
From: Hayes Wang <hayeswang@...ltek.com>
To: insyelu <insyelu@...il.com>,
"andrew+netdev@...n.ch"
<andrew+netdev@...n.ch>,
"davem@...emloft.net" <davem@...emloft.net>,
nic_swsd <nic_swsd@...ltek.com>, "tiwai@...e.de" <tiwai@...e.de>
CC: "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] net: usb: r8152: fix transmit queue timeout
insyelu <insyelu@...il.com>
> 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@...il.com>
> ---
> 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
Powered by blists - more mailing lists