]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: usb: r8152: fix transmit queue timeout
authorMingj Ye <insyelu@gmail.com>
Tue, 20 Jan 2026 01:59:49 +0000 (09:59 +0800)
committerSasha Levin <sashal@kernel.org>
Wed, 4 Mar 2026 12:20:26 +0000 (07:20 -0500)
[ Upstream commit 833dcd75d54f0bf5aa0a0781ff57456b421fbb40 ]

When the TX queue length reaches the threshold, the netdev watchdog
immediately detects a TX queue timeout.

This patch updates the trans_start timestamp of the transmit queue
on every asynchronous USB URB submission along the transmit path,
ensuring that the network watchdog accurately reflects ongoing
transmission activity.

Signed-off-by: Mingj Ye <insyelu@gmail.com>
Reviewed-by: Hayes Wang <hayeswang@realtek.com>
Link: https://patch.msgid.link/20260120015949.84996-1-insyelu@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/usb/r8152.c

index 2f3baa5f6e9c940e385de2fb1430a5ce08d6d4d2..6b107cf5f37bd3206e5b5ad4d110aa3af4ce18ce 100644 (file)
@@ -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;