Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb usbnet: On if_stop, abort xfers before resetting...
details: https://anonhg.NetBSD.org/src/rev/fa0889e090f2
branches: trunk
changeset: 362555:fa0889e090f2
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Mar 03 05:56:44 2022 +0000
description:
usbnet: On if_stop, abort xfers before resetting hardware.
uno_stop is supposed to have exclusive access to the hardware; this
ensures that any concurrent uno_rx_loop has completed before we enter
uno_stop.
diffstat:
sys/dev/usb/usbnet.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (38 lines):
diff -r 97b0e1ebc21a -r fa0889e090f2 sys/dev/usb/usbnet.c
--- a/sys/dev/usb/usbnet.c Thu Mar 03 05:56:36 2022 +0000
+++ b/sys/dev/usb/usbnet.c Thu Mar 03 05:56:44 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usbnet.c,v 1.90 2022/03/03 05:56:28 riastradh Exp $ */
+/* $NetBSD: usbnet.c,v 1.91 2022/03/03 05:56:44 riastradh Exp $ */
/*
* Copyright (c) 2019 Matthew R. Green
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.90 2022/03/03 05:56:28 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.91 2022/03/03 05:56:44 riastradh Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -1130,6 +1130,9 @@
usb_rem_task_wait(un->un_udev, &unp->unp_ticktask, USB_TASKQ_DRIVER,
&unp->unp_core_lock);
+ /* Stop transfers. */
+ usbnet_ep_stop_pipes(un);
+
/*
* Now that the software is quiescent, ask the driver to stop
* the hardware. The driver's uno_stop routine now has
@@ -1143,9 +1146,6 @@
if (!usbnet_isdying(un))
uno_stop(un, ifp, disable);
- /* Stop transfers. */
- usbnet_ep_stop_pipes(un);
-
/* Free RX/TX resources. */
usbnet_rx_list_fini(un);
usbnet_tx_list_fini(un);
Home |
Main Index |
Thread Index |
Old Index