Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb usbnet: Remove usbnet_set_dying.
details: https://anonhg.NetBSD.org/src/rev/a5421d75b5e9
branches: trunk
changeset: 362494:a5421d75b5e9
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Mar 03 05:48:14 2022 +0000
description:
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.
diffstat:
sys/dev/usb/if_url.c | 12 +++---------
sys/dev/usb/usbnet.c | 10 ++--------
sys/dev/usb/usbnet.h | 3 +--
3 files changed, 6 insertions(+), 19 deletions(-)
diffs (86 lines):
diff -r 2f32db5e9926 -r a5421d75b5e9 sys/dev/usb/if_url.c
--- a/sys/dev/usb/if_url.c Thu Mar 03 05:48:06 2022 +0000
+++ b/sys/dev/usb/if_url.c Thu Mar 03 05:48:14 2022 +0000
@@ -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 */
diff -r 2f32db5e9926 -r a5421d75b5e9 sys/dev/usb/usbnet.c
--- a/sys/dev/usb/usbnet.c Thu Mar 03 05:48:06 2022 +0000
+++ b/sys/dev/usb/usbnet.c Thu Mar 03 05:48:14 2022 +0000
@@ -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 @@
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)
{
diff -r 2f32db5e9926 -r a5421d75b5e9 sys/dev/usb/usbnet.h
--- a/sys/dev/usb/usbnet.h Thu Mar 03 05:48:06 2022 +0000
+++ b/sys/dev/usb/usbnet.h Thu Mar 03 05:48:14 2022 +0000
@@ -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 *);
Home |
Main Index |
Thread Index |
Old Index