Module Name:    src
Committed By:   skrll
Date:           Sat May 14 08:52:20 UTC 2016

Modified Files:
        src/sys/dev/ic: sl811hs.c

Log Message:
Another locking fix in slhci_roothub_ctrl


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/dev/ic/sl811hs.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/ic/sl811hs.c
diff -u src/sys/dev/ic/sl811hs.c:1.68 src/sys/dev/ic/sl811hs.c:1.69
--- src/sys/dev/ic/sl811hs.c:1.68	Thu May 12 18:57:38 2016
+++ src/sys/dev/ic/sl811hs.c	Sat May 14 08:52:20 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: sl811hs.c,v 1.68 2016/05/12 18:57:38 skrll Exp $	*/
+/*	$NetBSD: sl811hs.c,v 1.69 2016/05/14 08:52:20 skrll Exp $	*/
 
 /*
  * Not (c) 2007 Matthew Orgass
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.68 2016/05/12 18:57:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.69 2016/05/14 08:52:20 skrll Exp $");
 
 #include "opt_slhci.h"
 
@@ -3162,9 +3162,11 @@ slhci_roothub_ctrl(struct usbd_bus *bus,
 	/* Write Requests */
 	case UR_CLEAR_FEATURE:
 		if (type == UT_WRITE_CLASS_OTHER) {
-			if (index == 1 /* Port */)
+			if (index == 1 /* Port */) {
+				mutex_enter(&sc->sc_intr_lock);
 				error = slhci_clear_feature(sc, value);
-			else
+				mutex_exit(&sc->sc_intr_lock);
+			} else
 				DLOG(D_ROOT, "Clear Port Feature "
 				    "index = %#.4x", index, 0,0,0);
 		}

Reply via email to