Skip to content

Commit 6dfcbd7

Browse files
Zqiangkuba-moo
authored andcommitted
net: usb: enable the work after stop usbnet by ip down/up
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] Fixes: 2c04d27 ("net: usb: Convert tasklet API to new bottom half workqueue mechanism") Reported-by: Oleksij Rempel <o.rempel@pengutronix.de> Tested-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Zqiang <qiang.zhang@linux.dev> Signed-off-by: Jun Miao <jun.miao@intel.com> Link: https://patch.msgid.link/20250708081653.307815-1-jun.miao@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 3b93297 commit 6dfcbd7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/usb/usbnet.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -861,14 +861,14 @@ int usbnet_stop (struct net_device *net)
861861
/* deferred work (timer, softirq, task) must also stop */
862862
dev->flags = 0;
863863
timer_delete_sync(&dev->delay);
864-
disable_work_sync(&dev->bh_work);
864+
cancel_work_sync(&dev->bh_work);
865865
cancel_work_sync(&dev->kevent);
866866

867867
/* We have cyclic dependencies. Those calls are needed
868868
* to break a cycle. We cannot fall into the gaps because
869869
* we have a flag
870870
*/
871-
disable_work_sync(&dev->bh_work);
871+
cancel_work_sync(&dev->bh_work);
872872
timer_delete_sync(&dev->delay);
873873
cancel_work_sync(&dev->kevent);
874874

0 commit comments

Comments
 (0)