Use usb_rem_task_wait in usb athn(4) detachment.
This commit is contained in:
parent
7d2886b531
commit
b882f7bca3
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_athn_usb.c,v 1.27 2018/06/26 06:48:02 msaitoh Exp $ */
|
||||
/* $NetBSD: if_athn_usb.c,v 1.28 2018/07/29 01:59:56 riastradh Exp $ */
|
||||
/* $OpenBSD: if_athn_usb.c,v 1.12 2013/01/14 09:50:31 jsing Exp $ */
|
||||
|
||||
/*-
|
||||
@ -22,7 +22,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_athn_usb.c,v 1.27 2018/06/26 06:48:02 msaitoh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_athn_usb.c,v 1.28 2018/07/29 01:59:56 riastradh Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_inet.h"
|
||||
@ -335,7 +335,7 @@ athn_usb_attach(device_t parent, device_t self, void *aux)
|
||||
athn_usb_free_tx_cmd(usc);
|
||||
athn_usb_free_tx_msg(usc);
|
||||
athn_usb_close_pipes(usc);
|
||||
usb_rem_task(usc->usc_udev, &usc->usc_task);
|
||||
usb_rem_task_wait(usc->usc_udev, &usc->usc_task, USB_TASKQ_DRIVER);
|
||||
|
||||
cv_destroy(&usc->usc_cmd_cv);
|
||||
cv_destroy(&usc->usc_msg_cv);
|
||||
@ -501,7 +501,7 @@ athn_usb_detach(device_t self, int flags)
|
||||
|
||||
athn_usb_wait_async(usc);
|
||||
|
||||
usb_rem_task(usc->usc_udev, &usc->usc_task);
|
||||
usb_rem_task_wait(usc->usc_udev, &usc->usc_task, USB_TASKQ_DRIVER);
|
||||
|
||||
/* Abort Tx/Rx pipes. */
|
||||
athn_usb_abort_pipes(usc);
|
||||
|
Loading…
Reference in New Issue
Block a user