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 drivers: No need for usbnet_busy in uno_i...
details: https://anonhg.NetBSD.org/src/rev/94989924601f
branches: trunk
changeset: 362519:94989924601f
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Mar 03 05:51:35 2022 +0000
description:
usbnet drivers: No need for usbnet_busy in uno_ioctl.
This callback always runs with the IFNET_LOCK held, and the interface
cannot be detached until the IFNET_LOCK is released, so there is no
need to hang onto a reference count here. (None of the subnet
drivers touch the IFNET_LOCK except to verify it is held sometimes.)
diffstat:
sys/dev/usb/if_axen.c | 6 ++----
sys/dev/usb/if_mue.c | 6 ++----
sys/dev/usb/if_smsc.c | 6 ++----
3 files changed, 6 insertions(+), 12 deletions(-)
diffs (102 lines):
diff -r 671689585d08 -r 94989924601f sys/dev/usb/if_axen.c
--- a/sys/dev/usb/if_axen.c Thu Mar 03 05:51:27 2022 +0000
+++ b/sys/dev/usb/if_axen.c Thu Mar 03 05:51:35 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_axen.c,v 1.78 2022/03/03 05:51:27 riastradh Exp $ */
+/* $NetBSD: if_axen.c,v 1.79 2022/03/03 05:51:35 riastradh Exp $ */
/* $OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $ */
/*
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.78 2022/03/03 05:51:27 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.79 2022/03/03 05:51:35 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -558,7 +558,6 @@
struct usbnet * const un = ifp->if_softc;
usbnet_lock_core(un);
- usbnet_busy(un);
switch (cmd) {
case SIOCSIFCAP:
@@ -568,7 +567,6 @@
break;
}
- usbnet_unbusy(un);
usbnet_unlock_core(un);
return 0;
diff -r 671689585d08 -r 94989924601f sys/dev/usb/if_mue.c
--- a/sys/dev/usb/if_mue.c Thu Mar 03 05:51:27 2022 +0000
+++ b/sys/dev/usb/if_mue.c Thu Mar 03 05:51:35 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_mue.c,v 1.68 2022/03/03 05:51:27 riastradh Exp $ */
+/* $NetBSD: if_mue.c,v 1.69 2022/03/03 05:51:35 riastradh Exp $ */
/* $OpenBSD: if_mue.c,v 1.3 2018/08/04 16:42:46 jsg Exp $ */
/*
@@ -20,7 +20,7 @@
/* Driver for Microchip LAN7500/LAN7800 chipsets. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.68 2022/03/03 05:51:27 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.69 2022/03/03 05:51:35 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -1269,7 +1269,6 @@
struct usbnet * const un = ifp->if_softc;
usbnet_lock_core(un);
- usbnet_busy(un);
switch (cmd) {
case SIOCSIFCAP:
@@ -1282,7 +1281,6 @@
break;
}
- usbnet_unbusy(un);
usbnet_unlock_core(un);
return 0;
diff -r 671689585d08 -r 94989924601f sys/dev/usb/if_smsc.c
--- a/sys/dev/usb/if_smsc.c Thu Mar 03 05:51:27 2022 +0000
+++ b/sys/dev/usb/if_smsc.c Thu Mar 03 05:51:35 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_smsc.c,v 1.76 2022/03/03 05:51:27 riastradh Exp $ */
+/* $NetBSD: if_smsc.c,v 1.77 2022/03/03 05:51:35 riastradh Exp $ */
/* $OpenBSD: if_smsc.c,v 1.4 2012/09/27 12:38:11 jsg Exp $ */
/* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_smsc.c,v 1.76 2022/03/03 05:51:27 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_smsc.c,v 1.77 2022/03/03 05:51:35 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -752,7 +752,6 @@
struct usbnet * const un = ifp->if_softc;
usbnet_lock_core(un);
- usbnet_busy(un);
switch (cmd) {
case SIOCSIFCAP:
@@ -762,7 +761,6 @@
break;
}
- usbnet_unbusy(un);
usbnet_unlock_core(un);
return 0;
Home |
Main Index |
Thread Index |
Old Index