Module Name:    src
Committed By:   mrg
Date:           Mon Feb 20 05:24:42 UTC 2012

Modified Files:
        src/sys/dev/usb [jmcneill-usbmp]: umidi.c

Log Message:
don't take the kernel lock when calling into the usb code anymore


To generate a diff of this commit:
cvs rdiff -u -r1.53.2.3 -r1.53.2.4 src/sys/dev/usb/umidi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/umidi.c
diff -u src/sys/dev/usb/umidi.c:1.53.2.3 src/sys/dev/usb/umidi.c:1.53.2.4
--- src/sys/dev/usb/umidi.c:1.53.2.3	Sun Feb 19 21:01:52 2012
+++ src/sys/dev/usb/umidi.c	Mon Feb 20 05:24:42 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: umidi.c,v 1.53.2.3 2012/02/19 21:01:52 mrg Exp $	*/
+/*	$NetBSD: umidi.c,v 1.53.2.4 2012/02/20 05:24:42 mrg Exp $	*/
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umidi.c,v 1.53.2.3 2012/02/19 21:01:52 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umidi.c,v 1.53.2.4 2012/02/20 05:24:42 mrg Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -363,10 +363,8 @@ umidi_close(void *addr)
 {
 	struct umidi_mididev *mididev = addr;
 
-	/* XXX SMP */
 	mididev->closing = 1;
 
-	KERNEL_LOCK(1, curlwp);
 	mutex_spin_exit(&mididev->sc->sc_lock);
 
 	if ((mididev->flags & FWRITE) && mididev->out_jack)
@@ -376,7 +374,6 @@ umidi_close(void *addr)
 
 	/* XXX SMP */
 	mutex_spin_enter(&mididev->sc->sc_lock);
-	KERNEL_UNLOCK_ONE(curlwp);
 
 	mididev->opened = 0;
 }
@@ -1134,9 +1131,7 @@ open_in_jack(struct umidi_jack *jack, vo
 	jack->u.in.intr = intr;
 	jack->opened = 1;
 	if (ep->num_open++ == 0 && UE_GET_DIR(ep->addr)==UE_DIR_IN) {
-		KERNEL_LOCK(1, curlwp);
 		err = start_input_transfer(ep);
-		KERNEL_UNLOCK_ONE(curlwp);
 		if (err != USBD_NORMAL_COMPLETION &&
 		    err != USBD_IN_PROGRESS) {
 			ep->num_open--;

Reply via email to