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): Omit needless miilock around uno_stop.
details: https://anonhg.NetBSD.org/src/rev/68a0f2a8bda9
branches: trunk
changeset: 370634:68a0f2a8bda9
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Sep 22 07:02:21 2022 +0000
description:
usbnet(9): Omit needless miilock around uno_stop.
This time for real!
diffstat:
sys/dev/usb/usbnet.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diffs (39 lines):
diff -r 245d9153bc46 -r 68a0f2a8bda9 sys/dev/usb/usbnet.c
--- a/sys/dev/usb/usbnet.c Thu Sep 22 06:04:26 2022 +0000
+++ b/sys/dev/usb/usbnet.c Thu Sep 22 07:02:21 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usbnet.c,v 1.112 2022/09/20 07:15:46 mrg Exp $ */
+/* $NetBSD: usbnet.c,v 1.113 2022/09/22 07:02:21 riastradh Exp $ */
/*
* Copyright (c) 2019 Matthew R. Green
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.112 2022/09/20 07:15:46 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.113 2022/09/22 07:02:21 riastradh Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -162,7 +162,6 @@
uno_stop(struct usbnet *un, struct ifnet *ifp, int disable)
{
KASSERTMSG(IFNET_LOCKED(ifp), "%s", ifp->if_xname);
- usbnet_isowned_mii(un);
if (un->un_ops->uno_stop)
(*un->un_ops->uno_stop)(ifp, disable);
}
@@ -1175,11 +1174,8 @@
* it's been unplugged then there's no point in trying to touch
* the registers.
*/
- if (!usbnet_isdying(un)) {
- mutex_enter(&unp->unp_miilock);
+ if (!usbnet_isdying(un))
uno_stop(un, ifp, disable);
- mutex_exit(&unp->unp_miilock);
- }
/* Free RX/TX resources. */
usbnet_rx_list_fini(un);
Home |
Main Index |
Thread Index |
Old Index