Module Name: src
Committed By: riastradh
Date: Sun Jul 29 02:00:38 UTC 2018
Modified Files:
src/sys/dev/usb: if_axen.c
Log Message:
Use callout_halt and usb_rem_task_wait in axen(4).
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/usb/if_axen.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/usb/if_axen.c
diff -u src/sys/dev/usb/if_axen.c:1.14 src/sys/dev/usb/if_axen.c:1.15
--- src/sys/dev/usb/if_axen.c:1.14 Fri Jul 20 16:38:42 2018
+++ src/sys/dev/usb/if_axen.c Sun Jul 29 02:00:38 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: if_axen.c,v 1.14 2018/07/20 16:38:42 martin Exp $ */
+/* $NetBSD: if_axen.c,v 1.15 2018/07/29 02:00:38 riastradh Exp $ */
/* $OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $ */
/*
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.14 2018/07/20 16:38:42 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.15 2018/07/29 02:00:38 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -827,11 +827,9 @@ axen_detach(device_t self, int flags)
sc->axen_dying = true;
- /*
- * Remove any pending tasks. They cannot be executing because they run
- * in the same thread as detach.
- */
- usb_rem_task(sc->axen_udev, &sc->axen_tick_task);
+ callout_halt(&sc->axen_stat_ch, NULL);
+ usb_rem_task_wait(sc->axen_udev, &sc->axen_tick_task,
+ USB_TASKQ_DRIVER);
s = splusb();