Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Some lock comments.



details:   https://anonhg.NetBSD.org/src/rev/e7218fe4de44
branches:  trunk
changeset: 789776:e7218fe4de44
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Sep 07 16:47:23 2013 +0000

description:
Some lock comments.

diffstat:

 sys/dev/usb/usbdi.h    |  13 ++++++++++---
 sys/dev/usb/usbdivar.h |   4 ++--
 2 files changed, 12 insertions(+), 5 deletions(-)

diffs (46 lines):

diff -r 5e4ceec82e35 -r e7218fe4de44 sys/dev/usb/usbdi.h
--- a/sys/dev/usb/usbdi.h       Sat Sep 07 16:43:48 2013 +0000
+++ b/sys/dev/usb/usbdi.h       Sat Sep 07 16:47:23 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbdi.h,v 1.87 2013/01/22 13:27:59 jmcneill Exp $      */
+/*     $NetBSD: usbdi.h,v 1.88 2013/09/07 16:47:23 skrll Exp $ */
 /*     $FreeBSD: src/sys/dev/usb/usbdi.h,v 1.18 1999/11/17 22:33:49 n_hibma Exp $      */
 
 /*
@@ -278,9 +278,16 @@
 /* No match */
 #define UMATCH_NONE                                     0
 
+
+/*
+ * IPL_USB is defined as IPL_VM for drivers that have not been made MP safe.
+ * IPL_VM (currently) takes the kernel lock.
+ *
+ * Eventually, IPL_USB can/should be changed
+ */
 #define splusb splsoftnet
-#define splhardusb splbio
-#define IPL_USB IPL_BIO
+#define splhardusb splvm
 #define IPL_SOFTUSB IPL_SOFTNET
+#define IPL_USB IPL_VM
 
 #endif /* _USBDI_H_ */
diff -r 5e4ceec82e35 -r e7218fe4de44 sys/dev/usb/usbdivar.h
--- a/sys/dev/usb/usbdivar.h    Sat Sep 07 16:43:48 2013 +0000
+++ b/sys/dev/usb/usbdivar.h    Sat Sep 07 16:47:23 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbdivar.h,v 1.103 2013/03/24 22:38:45 skrll Exp $     */
+/*     $NetBSD: usbdivar.h,v 1.104 2013/09/07 16:47:23 skrll Exp $     */
 
 /*
  * Copyright (c) 1998, 2012 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 /*
  * Discussion about locking in the USB code:
  *
- * The host controller presents one lock at IPL_SOFTUSB.
+ * The host controller presents one lock at IPL_SOFTUSB (aka IPL_SOFTNET).
  *
  * List of hardware interface methods, and whether the lock is held
  * when each is called by this module:



Home | Main Index | Thread Index | Old Index