Module Name:    src
Committed By:   riastradh
Date:           Mon Aug 22 08:37:16 UTC 2022

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

Log Message:
usbnet(9): Update comments about locking to reflect current reality.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/usb/usbnet.h

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.h
diff -u src/sys/dev/usb/usbnet.h:1.34 src/sys/dev/usb/usbnet.h:1.35
--- src/sys/dev/usb/usbnet.h:1.34	Sat Aug 20 14:08:59 2022
+++ src/sys/dev/usb/usbnet.h	Mon Aug 22 08:37:16 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbnet.h,v 1.34 2022/08/20 14:08:59 riastradh Exp $	*/
+/*	$NetBSD: usbnet.h,v 1.35 2022/08/22 08:37:16 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2019 Matthew R. Green
@@ -157,28 +157,26 @@ typedef void (*usbnet_intr_cb)(struct us
  * usbnet_ops functions are invoked:
  *
  * I -> IFNET_LOCK (if_ioctl_lock)
- * C -> CORE_LOCK (usbnet core_lock)
- * T -> TX_LOCK (usbnet tx_lock)
- * R -> RX_LOCK (usbnet rx_lock)
+ * C -> usbnet un_mcastlock
+ * M -> usbnet un_miilock
+ * T -> usbnet un_txlock
+ * R -> usbnet un_rxlock
  * n -> no locks held
  *
- * Note that when CORE_LOCK is held, IFNET_LOCK may or may not also
- * be held.
- *
  * Note that the IFNET_LOCK **may not be held** for the ioctl commands
  * SIOCADDMULTI/SIOCDELMULTI.  These commands are only passed
  * explicitly to uno_override_ioctl; for all other devices, they are
  * handled by uno_mcast (also without IFNET_LOCK).
  */
 struct usbnet_ops {
-	usbnet_stop_cb		uno_stop;		/* C */
+	usbnet_stop_cb		uno_stop;		/* I */
 	usbnet_ioctl_cb		uno_ioctl;		/* I */
 	usbnet_ioctl_cb		uno_override_ioctl;	/* I (except mcast) */
-	usbnet_mcast_cb		uno_mcast;		/* I */
+	usbnet_mcast_cb		uno_mcast;		/* C */
 	usbnet_init_cb		uno_init;		/* I */
-	usbnet_mii_read_reg_cb	uno_read_reg;		/* C */
-	usbnet_mii_write_reg_cb uno_write_reg;		/* C */
-	usbnet_mii_statchg_cb	uno_statchg;		/* C */
+	usbnet_mii_read_reg_cb	uno_read_reg;		/* M */
+	usbnet_mii_write_reg_cb uno_write_reg;		/* M */
+	usbnet_mii_statchg_cb	uno_statchg;		/* M */
 	usbnet_tx_prepare_cb	uno_tx_prepare;		/* T */
 	usbnet_rx_loop_cb	uno_rx_loop;		/* R */
 	usbnet_tick_cb		uno_tick;		/* n */

Reply via email to