Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb add a note about ifnet lock vs usbnet locks.



details:   https://anonhg.NetBSD.org/src/rev/39684dc043d4
branches:  trunk
changeset: 460845:39684dc043d4
user:      mrg <mrg%NetBSD.org@localhost>
date:      Wed Nov 06 07:30:59 2019 +0000

description:
add a note about ifnet lock vs usbnet locks.

diffstat:

 sys/dev/usb/usbnet.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 40872c6933b9 -r 39684dc043d4 sys/dev/usb/usbnet.c
--- a/sys/dev/usb/usbnet.c      Wed Nov 06 07:29:08 2019 +0000
+++ b/sys/dev/usb/usbnet.c      Wed Nov 06 07:30:59 2019 +0000
@@ -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 @@
         *      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;



Home | Main Index | Thread Index | Old Index