summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2022-03-03 05:51:27 +0000
committerriastradh <riastradh@NetBSD.org>2022-03-03 05:51:27 +0000
commit4ff21059fcb683f9e36a5f3f459e8541ff3c06e6 (patch)
tree588797bc1e26c2e807203478f89adc91311447cd /sys/dev
parent77f11cf04d39fcdd6e8463b2c7c785354b24a61b (diff)
usbnet drivers: No need for usbnet_busy in uno_mcast.
This callback always runs with IFNET_LOCK held, and during a task that usbnet_detach prevents scheduling anew and waits for finishing before completing the detach, so there is no need to hang onto a reference count here.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/if_axe.c6
-rw-r--r--sys/dev/usb/if_axen.c6
-rw-r--r--sys/dev/usb/if_cue.c6
-rw-r--r--sys/dev/usb/if_kue.c6
-rw-r--r--sys/dev/usb/if_mos.c6
-rw-r--r--sys/dev/usb/if_mue.c6
-rw-r--r--sys/dev/usb/if_smsc.c6
-rw-r--r--sys/dev/usb/if_udav.c6
-rw-r--r--sys/dev/usb/if_ure.c6
-rw-r--r--sys/dev/usb/if_url.c6
10 files changed, 20 insertions, 40 deletions
diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c
index 390180c60ce..120b48972c0 100644
--- a/sys/dev/usb/if_axe.c
+++ b/sys/dev/usb/if_axe.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_axe.c,v 1.135 2022/03/03 05:51:17 riastradh Exp $ */
+/* $NetBSD: if_axe.c,v 1.136 2022/03/03 05:51:27 riastradh Exp $ */
/* $OpenBSD: if_axe.c,v 1.137 2016/04/13 11:03:37 mpi Exp $ */
/*
@@ -87,7 +87,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.135 2022/03/03 05:51:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.136 2022/03/03 05:51:27 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -1326,11 +1326,9 @@ axe_uno_mcast(struct ifnet *ifp)
struct usbnet * const un = ifp->if_softc;
usbnet_lock_core(un);
- usbnet_busy(un);
axe_rcvfilt_locked(un);
- usbnet_unbusy(un);
usbnet_unlock_core(un);
}
diff --git a/sys/dev/usb/if_axen.c b/sys/dev/usb/if_axen.c
index dbed7f2c2df..3fbb2c28414 100644
--- a/sys/dev/usb/if_axen.c
+++ b/sys/dev/usb/if_axen.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_axen.c,v 1.77 2022/03/03 05:51:17 riastradh Exp $ */
+/* $NetBSD: if_axen.c,v 1.78 2022/03/03 05:51:27 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.77 2022/03/03 05:51:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.78 2022/03/03 05:51:27 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -580,11 +580,9 @@ axen_uno_mcast(struct ifnet *ifp)
struct usbnet * const un = ifp->if_softc;
usbnet_lock_core(un);
- usbnet_busy(un);
axen_setiff_locked(un);
- usbnet_unbusy(un);
usbnet_unlock_core(un);
}
diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c
index 7c7d38547db..3f9d42dcf6f 100644
--- a/sys/dev/usb/if_cue.c
+++ b/sys/dev/usb/if_cue.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_cue.c,v 1.95 2022/03/03 05:51:17 riastradh Exp $ */
+/* $NetBSD: if_cue.c,v 1.96 2022/03/03 05:51:27 riastradh Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_cue.c,v 1.95 2022/03/03 05:51:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cue.c,v 1.96 2022/03/03 05:51:27 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -683,11 +683,9 @@ cue_uno_mcast(struct ifnet *ifp)
struct usbnet * const un = ifp->if_softc;
usbnet_lock_core(un);
- usbnet_busy(un);
cue_setiff_locked(un);
- usbnet_unbusy(un);
usbnet_unlock_core(un);
}
diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c
index 26d701cfec5..53ec761d293 100644
--- a/sys/dev/usb/if_kue.c
+++ b/sys/dev/usb/if_kue.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_kue.c,v 1.108 2022/03/03 05:51:17 riastradh Exp $ */
+/* $NetBSD: if_kue.c,v 1.109 2022/03/03 05:51:27 riastradh Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.108 2022/03/03 05:51:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.109 2022/03/03 05:51:27 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -643,11 +643,9 @@ kue_uno_mcast(struct ifnet *ifp)
struct usbnet * const un = ifp->if_softc;
usbnet_lock_core(un);
- usbnet_busy(un);
kue_setiff_locked(un);
- usbnet_unbusy(un);
usbnet_unlock_core(un);
}
diff --git a/sys/dev/usb/if_mos.c b/sys/dev/usb/if_mos.c
index 2cd9ea76459..b90062d7ddd 100644
--- a/sys/dev/usb/if_mos.c
+++ b/sys/dev/usb/if_mos.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_mos.c,v 1.11 2022/03/03 05:51:17 riastradh Exp $ */
+/* $NetBSD: if_mos.c,v 1.12 2022/03/03 05:51:27 riastradh Exp $ */
/* $OpenBSD: if_mos.c,v 1.40 2019/07/07 06:40:10 kevlo Exp $ */
/*
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mos.c,v 1.11 2022/03/03 05:51:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mos.c,v 1.12 2022/03/03 05:51:27 riastradh Exp $");
#include <sys/param.h>
@@ -773,11 +773,9 @@ mos_uno_mcast(struct ifnet *ifp)
struct usbnet * const un = ifp->if_softc;
usbnet_lock_core(un);
- usbnet_busy(un);
mos_rcvfilt_locked(un);
- usbnet_unbusy(un);
usbnet_unlock_core(un);
}
diff --git a/sys/dev/usb/if_mue.c b/sys/dev/usb/if_mue.c
index df5c9d61822..7e12cb3cf2c 100644
--- a/sys/dev/usb/if_mue.c
+++ b/sys/dev/usb/if_mue.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_mue.c,v 1.67 2022/03/03 05:51:17 riastradh Exp $ */
+/* $NetBSD: if_mue.c,v 1.68 2022/03/03 05:51:27 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.67 2022/03/03 05:51:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.68 2022/03/03 05:51:27 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -1294,11 +1294,9 @@ mue_uno_mcast(struct ifnet *ifp)
struct usbnet * const un = ifp->if_softc;
usbnet_lock_core(un);
- usbnet_busy(un);
mue_setiff_locked(un);
- usbnet_unbusy(un);
usbnet_unlock_core(un);
}
diff --git a/sys/dev/usb/if_smsc.c b/sys/dev/usb/if_smsc.c
index c1c04bc055a..0f9cbe6c221 100644
--- a/sys/dev/usb/if_smsc.c
+++ b/sys/dev/usb/if_smsc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_smsc.c,v 1.75 2022/03/03 05:51:17 riastradh Exp $ */
+/* $NetBSD: if_smsc.c,v 1.76 2022/03/03 05:51:27 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.75 2022/03/03 05:51:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_smsc.c,v 1.76 2022/03/03 05:51:27 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -774,11 +774,9 @@ smsc_uno_mcast(struct ifnet *ifp)
struct usbnet * const un = ifp->if_softc;
usbnet_lock_core(un);
- usbnet_busy(un);
smsc_setiff_locked(un);
- usbnet_unbusy(un);
usbnet_unlock_core(un);
}
diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c
index ac3abaa8a01..267e8f67f97 100644
--- a/sys/dev/usb/if_udav.c
+++ b/sys/dev/usb/if_udav.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_udav.c,v 1.82 2022/03/03 05:51:17 riastradh Exp $ */
+/* $NetBSD: if_udav.c,v 1.83 2022/03/03 05:51:27 riastradh Exp $ */
/* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */
/*
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.82 2022/03/03 05:51:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.83 2022/03/03 05:51:27 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -719,11 +719,9 @@ udav_uno_mcast(struct ifnet *ifp)
struct usbnet * const un = ifp->if_softc;
usbnet_lock_core(un);
- usbnet_busy(un);
udav_setiff_locked(un);
- usbnet_unbusy(un);
usbnet_unlock_core(un);
}
diff --git a/sys/dev/usb/if_ure.c b/sys/dev/usb/if_ure.c
index a227eece73a..34620f7431a 100644
--- a/sys/dev/usb/if_ure.c
+++ b/sys/dev/usb/if_ure.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ure.c,v 1.44 2022/03/03 05:51:17 riastradh Exp $ */
+/* $NetBSD: if_ure.c,v 1.45 2022/03/03 05:51:27 riastradh Exp $ */
/* $OpenBSD: if_ure.c,v 1.10 2018/11/02 21:32:30 jcs Exp $ */
/*-
@@ -30,7 +30,7 @@
/* RealTek RTL8152/RTL8153 10/100/Gigabit USB Ethernet device */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ure.c,v 1.44 2022/03/03 05:51:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ure.c,v 1.45 2022/03/03 05:51:27 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -804,11 +804,9 @@ ure_uno_mcast(struct ifnet *ifp)
struct usbnet * const un = ifp->if_softc;
usbnet_lock_core(un);
- usbnet_busy(un);
ure_rcvfilt_locked(un);
- usbnet_unbusy(un);
usbnet_unlock_core(un);
}
diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c
index 9583eed5b76..f8b89fe996d 100644
--- a/sys/dev/usb/if_url.c
+++ b/sys/dev/usb/if_url.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_url.c,v 1.82 2022/03/03 05:51:17 riastradh Exp $ */
+/* $NetBSD: if_url.c,v 1.83 2022/03/03 05:51:27 riastradh Exp $ */
/*
* Copyright (c) 2001, 2002
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.82 2022/03/03 05:51:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.83 2022/03/03 05:51:27 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -561,11 +561,9 @@ url_uno_mcast(struct ifnet *ifp)
struct usbnet * const un = ifp->if_softc;
usbnet_lock_core(un);
- usbnet_busy(un);
url_rcvfilt_locked(un);
- usbnet_unbusy(un);
usbnet_unlock_core(un);
}