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(9): Call mii_down once we've finished wit...
details: https://anonhg.NetBSD.org/src/rev/ed84469aea82
branches: trunk
changeset: 369503:ed84469aea82
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Aug 20 14:08:27 2022 +0000
description:
usbnet(9): Call mii_down once we've finished with mii_tick.
diffstat:
sys/dev/usb/usbnet.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (40 lines):
diff -r 135133e7434e -r ed84469aea82 sys/dev/usb/usbnet.c
--- a/sys/dev/usb/usbnet.c Sat Aug 20 14:08:17 2022 +0000
+++ b/sys/dev/usb/usbnet.c Sat Aug 20 14:08:27 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usbnet.c,v 1.105 2022/08/20 14:08:17 riastradh Exp $ */
+/* $NetBSD: usbnet.c,v 1.106 2022/08/20 14:08:27 riastradh Exp $ */
/*
* Copyright (c) 2019 Matthew R. Green
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.105 2022/08/20 14:08:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.106 2022/08/20 14:08:27 riastradh Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -1082,6 +1082,7 @@
usbnet_stop(struct usbnet *un, struct ifnet *ifp, int disable)
{
struct usbnet_private * const unp = un->un_pri;
+ struct mii_data * const mii = usbnet_mii(un);
USBNETHIST_FUNC(); USBNETHIST_CALLED();
@@ -1125,6 +1126,13 @@
usb_rem_task_wait(un->un_udev, &unp->unp_ticktask, USB_TASKQ_DRIVER,
&unp->unp_core_lock);
+ /*
+ * Now that we have stopped calling mii_tick, bring the MII
+ * state machine down.
+ */
+ if (mii)
+ mii_down(mii);
+
/* Stop transfers. */
usbnet_ep_stop_pipes(un);
Home |
Main Index |
Thread Index |
Old Index