Thu Mar 3 05:48:14 2022 UTC ()
usbnet: Remove usbnet_set_dying.

Not necessary for the one caller that did it (url(4)): usbnet_detach
handles failed attach just fine without it.


(riastradh)
diff -r1.77 -r1.78 src/sys/dev/usb/if_url.c
diff -r1.54 -r1.55 src/sys/dev/usb/usbnet.c
diff -r1.22 -r1.23 src/sys/dev/usb/usbnet.h

cvs diff -r1.77 -r1.78 src/sys/dev/usb/if_url.c (expand / switch to context diff)
--- src/sys/dev/usb/if_url.c 2020/04/02 04:09:36 1.77
+++ src/sys/dev/usb/if_url.c 2022/03/03 05:48:14 1.78
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_url.c,v 1.77 2020/04/02 04:09:36 nisimura Exp $	*/
+/*	$NetBSD: if_url.c,v 1.78 2022/03/03 05:48:14 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002
@@ -44,7 +44,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.77 2020/04/02 04:09:36 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.78 2022/03/03 05:48:14 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -256,18 +256,12 @@
 	usbnet_unlock_core(un);
 	if (err) {
 		aprint_error_dev(self, "read MAC address failed\n");
-		goto bad;
+		return;
 	}
 
 	/* initialize interface information */
 	usbnet_attach_ifp(un, IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST,
 	    0, &unm);
-
-	return;
-
- bad:
-	usbnet_set_dying(un, true);
-	return;
 }
 
 /* read/write memory */

cvs diff -r1.54 -r1.55 src/sys/dev/usb/usbnet.c (expand / switch to context diff)
--- src/sys/dev/usb/usbnet.c 2022/03/03 05:47:58 1.54
+++ src/sys/dev/usb/usbnet.c 2022/03/03 05:48:14 1.55
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbnet.c,v 1.54 2022/03/03 05:47:58 riastradh Exp $	*/
+/*	$NetBSD: usbnet.c,v 1.55 2022/03/03 05:48:14 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2019 Matthew R. Green
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.54 2022/03/03 05:47:58 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.55 2022/03/03 05:48:14 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -1286,12 +1286,6 @@
 usbnet_set_link(struct usbnet *un, bool link)
 {
 	un->un_pri->unp_link = link;
-}
-
-void
-usbnet_set_dying(struct usbnet *un, bool link)
-{
-	un->un_pri->unp_dying = link;
 }
 
 struct ifnet *

cvs diff -r1.22 -r1.23 src/sys/dev/usb/usbnet.h (expand / switch to context diff)
--- src/sys/dev/usb/usbnet.h 2021/12/11 19:24:21 1.22
+++ src/sys/dev/usb/usbnet.h 2022/03/03 05:48:14 1.23
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbnet.h,v 1.22 2021/12/11 19:24:21 mrg Exp $	*/
+/*	$NetBSD: usbnet.h,v 1.23 2022/03/03 05:48:14 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2019 Matthew R. Green
@@ -284,7 +284,6 @@
 /* Various accessors. */
 
 void usbnet_set_link(struct usbnet *, bool);
-void usbnet_set_dying(struct usbnet *, bool);
 
 struct ifnet *usbnet_ifp(struct usbnet *);
 struct ethercom *usbnet_ec(struct usbnet *);