Control: tag -1 upstream patch moreinfo Does this patch fix it?
Ben. -- Ben Hutchings Editing code like this is akin to sticking plasters on the bleeding stump of a severed limb. - me, 29 June 1999
From 4f97e494a3e2500166be4e8b53b4c412d6a44a9f Mon Sep 17 00:00:00 2001 From: Ben Hutchings <[email protected]> Date: Tue, 21 Oct 2025 22:18:49 +0200 Subject: [PATCH] usbnet: Report link up even when the interface is not yet up Even after commit 466d393700f9 ("net: usbnet: Fix the wrong netif_carrier_on() call"), usbnet isn't calling netif_carrier_on() in all the same cases it would before. Specifically, if the link is reported up before EVENT_DEV_OPEN is set, netif_carrier_on() may no longer be called. Fix this by checking for EVENT_LINK_CARRIER_ON first in __handle_link_change(), before EVENT_DEV_OPEN. References: https://bugs.debian.org/1118465 Reported-by: Axel Beckert <[email protected]> Fixes: 0d9cfc9b8cb1 ("net: usbnet: Avoid potential RCU stall on LINK_CHANGE event") Fixes: 466d393700f9 ("net: usbnet: Fix the wrong netif_carrier_on() call") Signed-off-by: Ben Hutchings <[email protected]> --- drivers/net/usb/usbnet.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index bf01f2728531..3b23909a131e 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1119,12 +1119,12 @@ static const struct ethtool_ops usbnet_ethtool_ops = { static void __handle_link_change(struct usbnet *dev) { - if (!test_bit(EVENT_DEV_OPEN, &dev->flags)) - return; - if (test_and_clear_bit(EVENT_LINK_CARRIER_ON, &dev->flags)) netif_carrier_on(dev->net); + if (!test_bit(EVENT_DEV_OPEN, &dev->flags)) + return; + if (!netif_carrier_ok(dev->net)) { /* kill URBs for reading packets to save bus bandwidth */ unlink_urbs(dev, &dev->rxq);
signature.asc
Description: This is a digitally signed message part

