Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/dev/usb Pull up following revision(s) (requested by m...
details: https://anonhg.NetBSD.org/src/rev/548bfaef3def
branches: netbsd-8
changeset: 435216:548bfaef3def
user: martin <martin%NetBSD.org@localhost>
date: Sun Aug 26 08:05:16 2018 +0000
description:
Pull up following revision(s) (requested by mlelstv in ticket #990):
sys/dev/usb/usb_subr.c: revision 1.224
add missing KERNEL_LOCK protection around autoconf calls.
Also replace NULL argument with curlwp for style.
diffstat:
sys/dev/usb/usb_subr.c | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
diffs (66 lines):
diff -r 085ba35051c0 -r 548bfaef3def sys/dev/usb/usb_subr.c
--- a/sys/dev/usb/usb_subr.c Sat Aug 25 17:14:38 2018 +0000
+++ b/sys/dev/usb/usb_subr.c Sun Aug 26 08:05:16 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usb_subr.c,v 1.220.2.3 2018/08/08 10:28:35 martin Exp $ */
+/* $NetBSD: usb_subr.c,v 1.220.2.4 2018/08/26 08:05:16 martin Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
/*
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.220.2.3 2018/08/08 10:28:35 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.220.2.4 2018/08/26 08:05:16 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -859,7 +859,9 @@
uaa.uaa_subclass = dd->bDeviceSubClass;
uaa.uaa_proto = dd->bDeviceProtocol;
+ KERNEL_LOCK(1, curlwp);
dv = config_found_ia(parent, "usbroothubif", &uaa, 0);
+ KERNEL_UNLOCK_ONE(curlwp);
if (dv) {
dev->ud_subdevs = kmem_alloc(sizeof(dv), KM_SLEEP);
dev->ud_subdevs[0] = dv;
@@ -904,10 +906,10 @@
dlocs[USBDEVIFCF_CONFIGURATION] = -1;
dlocs[USBDEVIFCF_INTERFACE] = -1;
- KERNEL_LOCK(1, NULL);
+ KERNEL_LOCK(1, curlwp);
dv = config_found_sm_loc(parent, "usbdevif", dlocs, &uaa, usbd_print,
config_stdsubmatch);
- KERNEL_UNLOCK_ONE(NULL);
+ KERNEL_UNLOCK_ONE(curlwp);
if (dv) {
dev->ud_subdevs = kmem_alloc(sizeof(dv), KM_SLEEP);
dev->ud_subdevs[0] = dv;
@@ -981,10 +983,10 @@
loc != uiaa.uiaa_ifaceno)
continue;
}
- KERNEL_LOCK(1, NULL);
+ KERNEL_LOCK(1, curlwp);
dv = config_found_sm_loc(parent, "usbifif", ilocs, &uiaa,
usbd_ifprint, config_stdsubmatch);
- KERNEL_UNLOCK_ONE(NULL);
+ KERNEL_UNLOCK_ONE(curlwp);
if (!dv)
continue;
@@ -1728,7 +1730,10 @@
continue;
strlcpy(subdevname, device_xname(subdev),
sizeof(subdevname));
- if ((rc = config_detach(subdev, flags)) != 0)
+ KERNEL_LOCK(1, curlwp);
+ rc = config_detach(subdev, flags);
+ KERNEL_UNLOCK_ONE(curlwp);
+ if (rc != 0)
return rc;
printf("%s: at %s", subdevname, hubname);
if (up->up_portno != 0)
Home |
Main Index |
Thread Index |
Old Index