Source-Changes-HG archive

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

[src/trunk]: src usbnet(9): uno_init is now optional.



details:   https://anonhg.NetBSD.org/src/rev/2fc9ab111226
branches:  trunk
changeset: 362973:2fc9ab111226
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Mar 05 06:55:49 2022 +0000

description:
usbnet(9): uno_init is now optional.

Update assertion and man page accordingly.

diffstat:

 share/man/man9/usbnet.9 |  6 +++---
 sys/dev/usb/usbnet.c    |  5 ++---
 2 files changed, 5 insertions(+), 6 deletions(-)

diffs (46 lines):

diff -r 5fdc00f47ed1 -r 2fc9ab111226 share/man/man9/usbnet.9
--- a/share/man/man9/usbnet.9   Fri Mar 04 23:17:16 2022 +0000
+++ b/share/man/man9/usbnet.9   Sat Mar 05 06:55:49 2022 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: usbnet.9,v 1.15 2022/03/03 05:57:05 riastradh Exp $
+.\"    $NetBSD: usbnet.9,v 1.16 2022/03/05 06:55:49 riastradh Exp $
 .\"
 .\" Copyright (c) 2019 Matthew R. Green
 .\" All rights reserved.
@@ -378,8 +378,8 @@
 May or may not be called under
 .Xr IFNET_LOCK 9 .
 .It Ft int Fn (*uno_init) "struct ifnet *ifp"
-Initialize hardware activity.
-Required.
+Initialize hardware activity
+.Pq optional .
 Called under
 .Xr IFNET_LOCK 9
 when bringing the interface up.
diff -r 5fdc00f47ed1 -r 2fc9ab111226 sys/dev/usb/usbnet.c
--- a/sys/dev/usb/usbnet.c      Fri Mar 04 23:17:16 2022 +0000
+++ b/sys/dev/usb/usbnet.c      Sat Mar 05 06:55:49 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbnet.c,v 1.93 2022/03/03 06:06:52 riastradh Exp $    */
+/*     $NetBSD: usbnet.c,v 1.94 2022/03/05 06:55:49 riastradh Exp $    */
 
 /*
  * Copyright (c) 2019 Matthew R. Green
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.93 2022/03/03 06:06:52 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.94 2022/03/05 06:55:49 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -1385,7 +1385,6 @@
        /* Required inputs.  */
        KASSERT(un->un_ops->uno_tx_prepare);
        KASSERT(un->un_ops->uno_rx_loop);
-       KASSERT(un->un_ops->uno_init);
        KASSERT(un->un_rx_bufsz);
        KASSERT(un->un_tx_bufsz);
        KASSERT(un->un_rx_list_cnt);



Home | Main Index | Thread Index | Old Index