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 uno_tick before mii stuff.
details: https://anonhg.NetBSD.org/src/rev/f327a41251d2
branches: trunk
changeset: 369501:f327a41251d2
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Aug 20 14:08:05 2022 +0000
description:
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.
diffstat:
sys/dev/usb/usbnet.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (38 lines):
diff -r 3a5987bb06ec -r f327a41251d2 sys/dev/usb/usbnet.c
--- a/sys/dev/usb/usbnet.c Sat Aug 20 14:07:53 2022 +0000
+++ b/sys/dev/usb/usbnet.c Sat Aug 20 14:08:05 2022 +0000
@@ -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 @@
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 @@
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);
Home |
Main Index |
Thread Index |
Old Index