Module Name:    src
Committed By:   mrg
Date:           Wed Nov  6 07:30:59 UTC 2019

Modified Files:
        src/sys/dev/usb: usbnet.c

Log Message:
add a note about ifnet lock vs usbnet locks.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/usb/usbnet.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/usbnet.c
diff -u src/sys/dev/usb/usbnet.c:1.29 src/sys/dev/usb/usbnet.c:1.30
--- src/sys/dev/usb/usbnet.c:1.29	Fri Sep 13 07:55:07 2019
+++ src/sys/dev/usb/usbnet.c	Wed Nov  6 07:30:59 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbnet.c,v 1.29 2019/09/13 07:55:07 msaitoh Exp $	*/
+/*	$NetBSD: usbnet.c,v 1.30 2019/11/06 07:30:59 mrg Exp $	*/
 
 /*
  * Copyright (c) 2019 Matthew R. Green
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.29 2019/09/13 07:55:07 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.30 2019/11/06 07:30:59 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -64,6 +64,8 @@ struct usbnet_private {
 	 *	ifnet lock -> unp_lock -> unp_rxlock -> unp_txlock
 	 *      unp_lock -> unp_miilock
 	 * and unp_lock may be dropped after taking unp_miilock.
+	 * - ifnet lock is not needed for unp_lock, but if ifnet lock is
+	 *   involved, it must be taken first
 	 */
 	kmutex_t		unp_lock;
 	kmutex_t		unp_miilock;

Reply via email to