Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/nick-nhusb]: src/sys/dev/usb consistent softc member name prefix
details: https://anonhg.NetBSD.org/src/rev/bf2641022fcf
branches: nick-nhusb
changeset: 334608:bf2641022fcf
user: skrll <skrll%NetBSD.org@localhost>
date: Thu Jan 26 12:40:16 2017 +0000
description:
consistent softc member name prefix
diffstat:
sys/dev/usb/if_url.c | 10 +++-------
sys/dev/usb/if_urndis.c | 34 +++++++++++++++++-----------------
sys/dev/usb/if_urndisreg.h | 8 ++++----
3 files changed, 24 insertions(+), 28 deletions(-)
diffs (167 lines):
diff -r 6279198a6d35 -r bf2641022fcf sys/dev/usb/if_url.c
--- a/sys/dev/usb/if_url.c Tue Jan 03 12:50:50 2017 +0000
+++ b/sys/dev/usb/if_url.c Thu Jan 26 12:40:16 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_url.c,v 1.48.4.11 2016/12/05 10:55:18 skrll Exp $ */
+/* $NetBSD: if_url.c,v 1.48.4.12 2017/01/26 12:40:16 skrll Exp $ */
/*
* Copyright (c) 2001, 2002
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.48.4.11 2016/12/05 10:55:18 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.48.4.12 2017/01/26 12:40:16 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -192,7 +192,7 @@
struct ifnet *ifp;
struct mii_data *mii;
u_char eaddr[ETHER_ADDR_LEN];
- int i, s;
+ int i;
sc->sc_dev = self;
@@ -256,8 +256,6 @@
goto bad;
}
- s = splnet();
-
/* reset the adapter */
url_reset(sc);
@@ -266,7 +264,6 @@
ETHER_ADDR_LEN);
if (err) {
aprint_error_dev(self, "read MAC address failed\n");
- splx(s);
goto bad;
}
@@ -321,7 +318,6 @@
callout_init(&sc->sc_stat_ch, 0);
sc->sc_attached = 1;
- splx(s);
usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, dev, sc->sc_dev);
diff -r 6279198a6d35 -r bf2641022fcf sys/dev/usb/if_urndis.c
--- a/sys/dev/usb/if_urndis.c Tue Jan 03 12:50:50 2017 +0000
+++ b/sys/dev/usb/if_urndis.c Thu Jan 26 12:40:16 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_urndis.c,v 1.9.4.14 2016/12/29 08:04:08 skrll Exp $ */
+/* $NetBSD: if_urndis.c,v 1.9.4.15 2017/01/26 12:40:16 skrll Exp $ */
/* $OpenBSD: if_urndis.c,v 1.31 2011/07/03 15:47:17 matthew Exp $ */
/*
@@ -21,7 +21,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_urndis.c,v 1.9.4.14 2016/12/29 08:04:08 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_urndis.c,v 1.9.4.15 2017/01/26 12:40:16 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -1046,9 +1046,9 @@
{
struct urndis_softc *sc = ifp->if_softc;
- mutex_enter(&sc->urndis_lock);
+ mutex_enter(&sc->sc_lock);
int ret = urndis_init_locked(ifp);
- mutex_exit(&sc->urndis_lock);
+ mutex_exit(&sc->sc_lock);
return ret;
}
@@ -1130,9 +1130,9 @@
{
struct urndis_softc *sc = ifp->if_softc;
- mutex_enter(&sc->urndis_lock);
+ mutex_enter(&sc->sc_lock);
urndis_stop_locked(ifp);
- mutex_exit(&sc->urndis_lock);
+ mutex_exit(&sc->sc_lock);
}
static void
@@ -1188,9 +1188,9 @@
struct urndis_softc *sc = ifp->if_softc;
KASSERT(ifp->if_extflags & IFEF_START_MPSAFE);
- mutex_enter(&sc->urndis_txlock);
+ mutex_enter(&sc->sc_txlock);
urndis_start_locked(ifp);
- mutex_exit(&sc->urndis_txlock);
+ mutex_exit(&sc->sc_txlock);
}
static void
@@ -1476,9 +1476,9 @@
return;
found:
- mutex_init(&sc->urndis_lock, MUTEX_DEFAULT, IPL_NONE);
- mutex_init(&sc->urndis_txlock, MUTEX_DEFAULT, IPL_SOFTUSB);
- mutex_init(&sc->urndis_rxlock, MUTEX_DEFAULT, IPL_SOFTUSB);
+ mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_NONE);
+ mutex_init(&sc->sc_txlock, MUTEX_DEFAULT, IPL_SOFTUSB);
+ mutex_init(&sc->sc_rxlock, MUTEX_DEFAULT, IPL_SOFTUSB);
ifp = GET_IFP(sc);
ifp->if_softc = sc;
@@ -1537,9 +1537,9 @@
return;
fail:
- mutex_destroy(&sc->urndis_lock);
- mutex_destroy(&sc->urndis_txlock);
- mutex_destroy(&sc->urndis_rxlock);
+ mutex_destroy(&sc->sc_lock);
+ mutex_destroy(&sc->sc_txlock);
+ mutex_destroy(&sc->sc_rxlock);
}
static int
@@ -1568,9 +1568,9 @@
urndis_stop(ifp);
- mutex_destroy(&sc->urndis_rxlock);
- mutex_destroy(&sc->urndis_txlock);
- mutex_destroy(&sc->urndis_lock);
+ mutex_destroy(&sc->sc_rxlock);
+ mutex_destroy(&sc->sc_txlock);
+ mutex_destroy(&sc->sc_lock);
sc->sc_attached = 0;
diff -r 6279198a6d35 -r bf2641022fcf sys/dev/usb/if_urndisreg.h
--- a/sys/dev/usb/if_urndisreg.h Tue Jan 03 12:50:50 2017 +0000
+++ b/sys/dev/usb/if_urndisreg.h Thu Jan 26 12:40:16 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_urndisreg.h,v 1.1.32.4 2016/12/28 08:55:20 skrll Exp $ */
+/* $NetBSD: if_urndisreg.h,v 1.1.32.5 2017/01/26 12:40:16 skrll Exp $ */
/* $OpenBSD: if_urndisreg.h,v 1.14 2010/07/08 18:22:01 ckuethe Exp $ */
/*
@@ -42,9 +42,9 @@
struct urndis_softc {
device_t sc_dev;
- kmutex_t urndis_lock;
- kmutex_t urndis_txlock;
- kmutex_t urndis_rxlock;
+ kmutex_t sc_lock;
+ kmutex_t sc_txlock;
+ kmutex_t sc_rxlock;
char sc_attached;
int sc_dying;
Home |
Main Index |
Thread Index |
Old Index