net: usb: enable the work after stop usbnet by ip down/up
Subsystems (5)
PATCH 1/1 net: usb: enable the work after stop usbnet by ip down/up
From: Zqiang <[email protected]>
Oleksij reported that:
The smsc95xx driver fails after one down/up cycle, like this:
$ nmcli device set enu1u1 managed no $ p a a 10.10.10.1/24 dev enu1u1 $ ping -c 4 10.10.10.3 $ ip l s dev enu1u1 down $ ip l s dev enu1u1 up $ ping -c 4 10.10.10.3 The second ping does not reach the host. Networking also fails on other interfaces.
Enable the work by replacing the disable_work_sync() with cancel_work_sync().
[Jun Miao: completely write the commit changelog]
--- drivers/net/usb/usbnet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/usb/usbnet.c +2 -2
@@ -861,14 +861,14 @@ int usbnet_stop (struct net_device *net)/* deferred work (timer, softirq, task) must also stop */ dev->flags =0 ;timer_delete_sync (&dev->delay); -disable_work_sync (&dev->bh_work); +cancel_work_sync (&dev->bh_work);cancel_work_sync (&dev->kevent);/* We have cyclic dependencies. Those calls are needed * to break a cycle. We cannot fall into the gaps because * we have a flag */ -disable_work_sync (&dev->bh_work); +cancel_work_sync (&dev->bh_work);timer_delete_sync (&dev->delay);cancel_work_sync (&dev->kevent);
Signature · 1 line
2.32.0
Hi Jun,
please resend this patch with the name [PATCH net-next] and add all related people suggested by scripts/get_maintainer.pl.
./scripts/get_maintainer.pl drivers/net/usb/usbnet.c
Oliver Neukum <[email protected]> (maintainer:USB "USBNET" DRIVER FRAMEWORK) Andrew Lunn <[email protected]> (maintainer:NETWORKING DRIVERS) "David S. Miller" <[email protected]> (maintainer:NETWORKING DRIVERS) Eric Dumazet <[email protected]> (maintainer:NETWORKING DRIVERS) Jakub Kicinski <[email protected]> (maintainer:NETWORKING DRIVERS) Paolo Abeni <[email protected]> (maintainer:NETWORKING DRIVERS) [email protected] (open list:USB "USBNET" DRIVER FRAMEWORK) [email protected] (open list:USB NETWORKING DRIVERS) [email protected] (open list)
Best Regards,
Oleksij
Quoted 50 lines · Jun Miao
From: Zqiang <[email protected]>
Oleksij reported that:
The smsc95xx driver fails after one down/up cycle, like this:$ nmcli device set enu1u1 managed no $ p a a 10.10.10.1/24 dev enu1u1 $ ping -c 4 10.10.10.3 $ ip l s dev enu1u1 down $ ip l s dev enu1u1 up $ ping -c 4 10.10.10.3 The second ping does not reach the host. Networking also fails on other interfaces.Enable the work by replacing the
disable_work_sync()withcancel_work_sync().[Jun Miao: completely write the commit changelog]
Fixes 2c04d279e857 ("net: usb: Convert tasklet API to new bottom half workqueue mechanism")Reported-by Oleksij Rempel <[email protected]>Tested-by Oleksij Rempel <[email protected]>Signed-off-by Zqiang <[email protected]>Signed-off-by Jun Miao <[email protected]>--- drivers/net/usb/usbnet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/usb/usbnet.c +2
-2@@ -861,14 +861,14 @@ int usbnet_stop (struct net_device *net)/* deferred work (timer, softirq, task) must also stop */ dev->flags =0 ;timer_delete_sync (&dev->delay); -disable_work_sync (&dev->bh_work); +cancel_work_sync (&dev->bh_work);cancel_work_sync (&dev->kevent);/* We have cyclic dependencies. Those calls are needed * to break a cycle. We cannot fall into the gaps because * we have a flag */ -disable_work_sync (&dev->bh_work); +cancel_work_sync (&dev->bh_work);timer_delete_sync (&dev->delay);cancel_work_sync (&dev->kevent);Signature · 1 line
2.32.0
Signature · 4 lines
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Quoted 6 lines
Hi Jun,
please resend this patch with the name [PATCH net-next] and add all related people suggested by
scripts/get_maintainer.pl.
Ok, I will resend again.
If you have any suggestions for patch commits, please tell me ?
Thanks
Jun.Miao
Quoted 74 lines
./scripts/get_maintainer.pldrivers/net/usb/usbnet.cOliver Neukum <[email protected]> (maintainer:USB "USBNET" DRIVER FRAMEWORK) Andrew Lunn <[email protected]> (maintainer:NETWORKING DRIVERS) "David S. Miller" <[email protected]> (maintainer:NETWORKING DRIVERS) Eric Dumazet <[email protected]> (maintainer:NETWORKING DRIVERS) Jakub Kicinski <[email protected]> (maintainer:NETWORKING DRIVERS) Paolo Abeni <[email protected]> (maintainer:NETWORKING DRIVERS) [email protected] (open list:USB "USBNET" DRIVER FRAMEWORK) linux- [email protected] (open list:USB NETWORKING DRIVERS) linux- [email protected] (open list)Best Regards,
OleksijQuoted 11 lines · Jun Miao
From: Zqiang <[email protected]>
Oleksij reported that:
The smsc95xx driver fails after one down/up cycle, like this:$ nmcli device set enu1u1 managed no $ p a a 10.10.10.1/24 dev enu1u1 $ ping -c 4 10.10.10.3 $ ip l s dev enu1u1 down $ ip l s dev enu1u1 up $ ping -c 4 10.10.10.3 The second ping does not reach the host. Networking also fails on otherinterfaces.
Quoted 2 lines
Enable the work by replacing the
disable_work_sync()with
cancel_work_sync().Quoted 35 lines
[Jun Miao: completely write the commit changelog]
Fixes 2c04d279e857 ("net: usb: Convert tasklet API to new bottom halfworkqueue mechanism")
Reported-by Oleksij Rempel <[email protected]>Tested-by Oleksij Rempel <[email protected]>Signed-off-by Zqiang <[email protected]>Signed-off-by Jun Miao <[email protected]>--- drivers/net/usb/usbnet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/usb/usbnet.c index renamed from drivers/net/usb/usbnet.c +0
-0
9564478a79cc..6a3cca104af9100644drivers/net/usb/usbnet.c +2
-3@@ -861,14 +861,14 @@ int usbnet_stop (struct net_device *net)/* deferred work (timer, softirq, task) must also stop */ dev->flags =0 ;timer_delete_sync (&dev->delay); -disable_work_sync (&dev->bh_work); +cancel_work_sync (&dev->bh_work);cancel_work_sync (&dev->kevent);/* We have cyclic dependencies. Those calls are needed * to break a cycle. We cannot fall into the gaps because * we have a flag */ -disable_work_sync (&dev->bh_work); +cancel_work_sync (&dev->bh_work);timer_delete_sync (&dev->delay);cancel_work_sync (&dev->kevent); --Quoted 3 lines
2.32.0
--
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 12 lines · On Tue, 8 Jul 2025 16:16:53 +0800 you wrote:
From: Zqiang <[email protected]>
Oleksij reported that:
The smsc95xx driver fails after one down/up cycle, like this:$ nmcli device set enu1u1 managed no $ p a a 10.10.10.1/24 dev enu1u1 $ ping -c 4 10.10.10.3 $ ip l s dev enu1u1 down $ ip l s dev enu1u1 up $ ping -c 4 10.10.10.3 The second ping does not reach the host. Networking also fails on other interfaces.
Quoted 1 line
[...]
Here is the summary with links:
- net: usb: enable the work after stop usbnet by ip down/up
https://git.kernel.org/netdev/net-next/c/6dfcbd7d1d65
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html