Module Name: src
Committed By: riastradh
Date: Tue Sep 13 09:38:19 UTC 2022
Modified Files:
src/sys/dev/usb: usbnet.c
Log Message:
usbnet(9): Call mii_down once we've finished with mii_tick.
To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/dev/usb/usbnet.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/usbnet.c
diff -u src/sys/dev/usb/usbnet.c:1.110 src/sys/dev/usb/usbnet.c:1.111
--- src/sys/dev/usb/usbnet.c:1.110 Tue Aug 23 01:08:04 2022
+++ src/sys/dev/usb/usbnet.c Tue Sep 13 09:38:19 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: usbnet.c,v 1.110 2022/08/23 01:08:04 riastradh Exp $ */
+/* $NetBSD: usbnet.c,v 1.111 2022/09/13 09:38:19 riastradh Exp $ */
/*
* Copyright (c) 2019 Matthew R. Green
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.110 2022/08/23 01:08:04 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.111 2022/09/13 09:38:19 riastradh Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -1162,6 +1162,13 @@ usbnet_stop(struct usbnet *un, struct if
mutex_exit(&unp->unp_miilock);
}
+ /*
+ * 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);