Module Name: src
Committed By: riastradh
Date: Sat Aug 20 14:08:05 UTC 2022
Modified Files:
src/sys/dev/usb: usbnet.c
Log Message:
usbnet(9): Call uno_tick before mii stuff.
The one driver that uses it, cue(4), uses it just for statistics
gathering; hard to imagine that order could be important here. But
this will allow for some simplification of the surrounding code.
To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 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.103 src/sys/dev/usb/usbnet.c:1.104
--- src/sys/dev/usb/usbnet.c:1.103 Sat Aug 20 14:07:53 2022
+++ src/sys/dev/usb/usbnet.c Sat Aug 20 14:08:05 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: usbnet.c,v 1.103 2022/08/20 14:07:53 riastradh Exp $ */
+/* $NetBSD: usbnet.c,v 1.104 2022/08/20 14:08:05 riastradh Exp $ */
/*
* Copyright (c) 2019 Matthew R. Green
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.103 2022/08/20 14:07:53 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.104 2022/08/20 14:08:05 riastradh Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -1234,6 +1234,9 @@ usbnet_tick_task(void *arg)
if (timeout)
usbnet_watchdog(ifp);
+ /* Call driver if requested. */
+ uno_tick(un);
+
DPRINTFN(8, "mii %#jx ifp %#jx", (uintptr_t)mii, (uintptr_t)ifp, 0, 0);
if (mii) {
mutex_enter(&unp->unp_core_lock);
@@ -1243,9 +1246,6 @@ usbnet_tick_task(void *arg)
mutex_exit(&unp->unp_core_lock);
}
- /* Call driver if requested. */
- uno_tick(un);
-
mutex_enter(&unp->unp_core_lock);
if (!unp->unp_stopped && !usbnet_isdying(un))
callout_schedule(&unp->unp_stat_ch, hz);