Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Use usb_rem_task_wait in urtwn(4) detach.



details:   https://anonhg.NetBSD.org/src/rev/6365de73f9c4
branches:  trunk
changeset: 365050:6365de73f9c4
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Jul 29 02:07:22 2018 +0000

description:
Use usb_rem_task_wait in urtwn(4) detach.

diffstat:

 sys/dev/usb/if_urtwn.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (34 lines):

diff -r a7dceefd5754 -r 6365de73f9c4 sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c    Sun Jul 29 02:06:11 2018 +0000
+++ b/sys/dev/usb/if_urtwn.c    Sun Jul 29 02:07:22 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_urtwn.c,v 1.60 2018/06/29 04:02:10 thorpej Exp $    */
+/*     $NetBSD: if_urtwn.c,v 1.61 2018/07/29 02:07:22 riastradh Exp $  */
 /*     $OpenBSD: if_urtwn.c,v 1.42 2015/02/10 23:25:46 mpi Exp $       */
 
 /*-
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.60 2018/06/29 04:02:10 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.61 2018/07/29 02:07:22 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -539,12 +539,12 @@
 
        sc->sc_dying = 1;
 
-       callout_stop(&sc->sc_scan_to);
-       callout_stop(&sc->sc_calib_to);
+       callout_halt(&sc->sc_scan_to, NULL);
+       callout_halt(&sc->sc_calib_to, NULL);
 
        if (ISSET(sc->sc_flags, URTWN_FLAG_ATTACHED)) {
-               usb_rem_task(sc->sc_udev, &sc->sc_task);
                urtwn_stop(ifp, 0);
+               usb_rem_task_wait(sc->sc_udev, &sc->sc_task, USB_TASKQ_DRIVER);
 
                ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
                bpf_detach(ifp);



Home | Main Index | Thread Index | Old Index