Module Name: src Committed By: riastradh Date: Sat Mar 5 06:55:49 UTC 2022
Modified Files: src/share/man/man9: usbnet.9 src/sys/dev/usb: usbnet.c Log Message: usbnet(9): uno_init is now optional. Update assertion and man page accordingly. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/share/man/man9/usbnet.9 cvs rdiff -u -r1.93 -r1.94 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/share/man/man9/usbnet.9 diff -u src/share/man/man9/usbnet.9:1.15 src/share/man/man9/usbnet.9:1.16 --- src/share/man/man9/usbnet.9:1.15 Thu Mar 3 05:57:05 2022 +++ src/share/man/man9/usbnet.9 Sat Mar 5 06:55:49 2022 @@ -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 @@ internally by 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. Index: src/sys/dev/usb/usbnet.c diff -u src/sys/dev/usb/usbnet.c:1.93 src/sys/dev/usb/usbnet.c:1.94 --- src/sys/dev/usb/usbnet.c:1.93 Thu Mar 3 06:06:52 2022 +++ src/sys/dev/usb/usbnet.c Sat Mar 5 06:55:49 2022 @@ -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 @@ usbnet_attach(struct usbnet *un) /* 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);