Module Name: src
Committed By: riastradh
Date: Thu Mar 3 05:48:14 UTC 2022
Modified Files:
src/sys/dev/usb: if_url.c usbnet.c usbnet.h
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/dev/usb/if_url.c
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/usb/usbnet.c
cvs rdiff -u -r1.22 -r1.23 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/if_url.c
diff -u src/sys/dev/usb/if_url.c:1.77 src/sys/dev/usb/if_url.c:1.78
--- src/sys/dev/usb/if_url.c:1.77 Thu Apr 2 04:09:36 2020
+++ src/sys/dev/usb/if_url.c Thu Mar 3 05:48:14 2022
@@ -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 @@ url_attach(device_t parent, device_t sel
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 */
Index: src/sys/dev/usb/usbnet.c
diff -u src/sys/dev/usb/usbnet.c:1.54 src/sys/dev/usb/usbnet.c:1.55
--- src/sys/dev/usb/usbnet.c:1.54 Thu Mar 3 05:47:58 2022
+++ src/sys/dev/usb/usbnet.c Thu Mar 3 05:48:14 2022
@@ -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>
@@ -1288,12 +1288,6 @@ usbnet_set_link(struct usbnet *un, bool
un->un_pri->unp_link = link;
}
-void
-usbnet_set_dying(struct usbnet *un, bool link)
-{
- un->un_pri->unp_dying = link;
-}
-
struct ifnet *
usbnet_ifp(struct usbnet *un)
{
Index: src/sys/dev/usb/usbnet.h
diff -u src/sys/dev/usb/usbnet.h:1.22 src/sys/dev/usb/usbnet.h:1.23
--- src/sys/dev/usb/usbnet.h:1.22 Sat Dec 11 19:24:21 2021
+++ src/sys/dev/usb/usbnet.h Thu Mar 3 05:48:14 2022
@@ -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 @@ struct usbnet {
/* 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 *);