Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb mutexes are destroyed unconditionally in detach,...
details: https://anonhg.NetBSD.org/src/rev/581a0ab2f7c2
branches: trunk
changeset: 999342:581a0ab2f7c2
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Wed May 29 08:23:54 2019 +0000
description:
mutexes are destroyed unconditionally in detach, so also init them
unconditionally.
diffstat:
sys/dev/usb/if_mue.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r cab9e7b27406 -r 581a0ab2f7c2 sys/dev/usb/if_mue.c
--- a/sys/dev/usb/if_mue.c Wed May 29 07:46:08 2019 +0000
+++ b/sys/dev/usb/if_mue.c Wed May 29 08:23:54 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_mue.c,v 1.48 2019/05/28 07:41:50 msaitoh Exp $ */
+/* $NetBSD: if_mue.c,v 1.49 2019/05/29 08:23:54 mlelstv 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.48 2019/05/28 07:41:50 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.49 2019/05/29 08:23:54 mlelstv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -923,6 +923,9 @@
aprint_normal_dev(self, "%s\n", devinfop);
usbd_devinfo_free(devinfop);
+ mutex_init(&sc->mue_mii_lock, MUTEX_DEFAULT, IPL_NONE);
+ mutex_init(&sc->mue_usb_lock, MUTEX_DEFAULT, IPL_NET);
+
#define MUE_CONFIG_NO 1
err = usbd_set_config_no(dev, MUE_CONFIG_NO, 1);
if (err) {
@@ -958,7 +961,6 @@
sc->mue_tx_list_cnt = MUE_TX_LIST_CNT;
}
sc->mue_txbufsz = MUE_TX_BUFSIZE;
- mutex_init(&sc->mue_usb_lock, MUTEX_DEFAULT, IPL_NET);
/* Find endpoints. */
id = usbd_get_interface_descriptor(sc->mue_iface);
@@ -1062,8 +1064,6 @@
splx(s);
- mutex_init(&sc->mue_mii_lock, MUTEX_DEFAULT, IPL_NONE);
-
usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->mue_udev, sc->mue_dev);
}
Home |
Main Index |
Thread Index |
Old Index