usbnet: Omit needless detachcv name parameter to usbnet_attach.

This commit is contained in:
riastradh 2022-03-03 05:56:28 +00:00
parent 05a3622e31
commit 0b4ab8ce17
16 changed files with 47 additions and 48 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_aue.c,v 1.189 2022/03/03 05:56:09 riastradh Exp $ */
/* $NetBSD: if_aue.c,v 1.190 2022/03/03 05:56:28 riastradh Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.189 2022/03/03 05:56:09 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.190 2022/03/03 05:56:28 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -847,7 +847,7 @@ aue_attach(device_t parent, device_t self, void *aux)
}
/* First level attach. */
usbnet_attach(un, "auedet");
usbnet_attach(un);
/* Reset the adapter and get station address from the EEPROM. */
aue_reset(sc);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_axe.c,v 1.149 2022/03/03 05:56:09 riastradh Exp $ */
/* $NetBSD: if_axe.c,v 1.150 2022/03/03 05:56:28 riastradh Exp $ */
/* $OpenBSD: if_axe.c,v 1.137 2016/04/13 11:03:37 mpi Exp $ */
/*
@ -87,7 +87,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.149 2022/03/03 05:56:09 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.150 2022/03/03 05:56:28 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -925,7 +925,7 @@ axe_attach(device_t parent, device_t self, void *aux)
}
/* Set these up now for axe_cmd(). */
usbnet_attach(un, "axedet");
usbnet_attach(un);
/* We need the PHYID for init dance in some cases */
if (axe_cmd(sc, AXE_CMD_READ_PHYID, 0, 0, &sc->axe_phyaddrs)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_axen.c,v 1.92 2022/03/03 05:56:09 riastradh Exp $ */
/* $NetBSD: if_axen.c,v 1.93 2022/03/03 05:56:28 riastradh Exp $ */
/* $OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $ */
/*
@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.92 2022/03/03 05:56:09 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.93 2022/03/03 05:56:28 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -650,7 +650,7 @@ axen_attach(device_t parent, device_t self, void *aux)
}
/* Set these up now for axen_cmd(). */
usbnet_attach(un, "axendet");
usbnet_attach(un);
un->un_phyno = AXEN_PHY_ID;
DPRINTF(("%s: phyno %d\n", device_xname(self), un->un_phyno));

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_cdce.c,v 1.80 2022/03/03 05:56:18 riastradh Exp $ */
/* $NetBSD: if_cdce.c,v 1.81 2022/03/03 05:56:28 riastradh Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul@windriver.com>
@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.80 2022/03/03 05:56:18 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.81 2022/03/03 05:56:28 riastradh Exp $");
#include <sys/param.h>
@ -248,7 +248,7 @@ cdce_attach(device_t parent, device_t self, void *aux)
un->un_eaddr[5] = (uint8_t)(device_unit(un->un_dev));
}
usbnet_attach(un, "cdcedet");
usbnet_attach(un);
usbnet_attach_ifp(un, IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST,
0, NULL);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_cue.c,v 1.105 2022/03/03 05:56:09 riastradh Exp $ */
/* $NetBSD: if_cue.c,v 1.106 2022/03/03 05:56:28 riastradh Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_cue.c,v 1.105 2022/03/03 05:56:09 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_cue.c,v 1.106 2022/03/03 05:56:28 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -525,7 +525,7 @@ cue_attach(device_t parent, device_t self, void *aux)
}
/* First level attach. */
usbnet_attach(un, "cuedet");
usbnet_attach(un);
#if 0
/* Reset the adapter. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_kue.c,v 1.117 2022/03/03 05:56:09 riastradh Exp $ */
/* $NetBSD: if_kue.c,v 1.118 2022/03/03 05:56:28 riastradh Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.117 2022/03/03 05:56:09 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.118 2022/03/03 05:56:28 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -494,7 +494,7 @@ kue_attach(device_t parent, device_t self, void *aux)
}
/* First level attach, so kue_ctl() works. */
usbnet_attach(un, "kuedet");
usbnet_attach(un);
/* Read ethernet descriptor */
err = kue_ctl(un, KUE_CTL_READ, KUE_CMD_GET_ETHER_DESCRIPTOR,

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_mos.c,v 1.21 2022/03/03 05:56:09 riastradh Exp $ */
/* $NetBSD: if_mos.c,v 1.22 2022/03/03 05:56:28 riastradh Exp $ */
/* $OpenBSD: if_mos.c,v 1.40 2019/07/07 06:40:10 kevlo Exp $ */
/*
@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_mos.c,v 1.21 2022/03/03 05:56:09 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_mos.c,v 1.22 2022/03/03 05:56:28 riastradh Exp $");
#include <sys/param.h>
@ -639,7 +639,7 @@ mos_attach(device_t parent, device_t self, void *aux)
aprint_normal_dev(self, "MCS7832\n");
/* Set these up now for register access. */
usbnet_attach(un, "mosdet");
usbnet_attach(un);
mos_chip_init(un);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_mue.c,v 1.80 2022/03/03 05:56:09 riastradh Exp $ */
/* $NetBSD: if_mue.c,v 1.81 2022/03/03 05:56:28 riastradh Exp $ */
/* $OpenBSD: if_mue.c,v 1.3 2018/08/04 16:42:46 jsg Exp $ */
/*
@ -20,7 +20,7 @@
/* Driver for Microchip LAN7500/LAN7800 chipsets. */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.80 2022/03/03 05:56:09 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.81 2022/03/03 05:56:28 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -856,7 +856,7 @@ mue_attach(device_t parent, device_t self, void *aux)
}
/* Set these up now for mue_cmd(). */
usbnet_attach(un, "muedet");
usbnet_attach(un);
un->un_phyno = 1;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_smsc.c,v 1.91 2022/03/03 05:56:09 riastradh Exp $ */
/* $NetBSD: if_smsc.c,v 1.92 2022/03/03 05:56:28 riastradh Exp $ */
/* $OpenBSD: if_smsc.c,v 1.4 2012/09/27 12:38:11 jsg Exp $ */
/* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_smsc.c,v 1.91 2022/03/03 05:56:09 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_smsc.c,v 1.92 2022/03/03 05:56:28 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -826,7 +826,7 @@ smsc_attach(device_t parent, device_t self, void *aux)
}
}
usbnet_attach(un, "smscdet");
usbnet_attach(un);
#ifdef notyet
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_udav.c,v 1.96 2022/03/03 05:56:09 riastradh Exp $ */
/* $NetBSD: if_udav.c,v 1.97 2022/03/03 05:56:28 riastradh Exp $ */
/* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */
/*
@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.96 2022/03/03 05:56:09 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.97 2022/03/03 05:56:28 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -236,7 +236,7 @@ udav_attach(device_t parent, device_t self, void *aux)
/* Not supported yet. */
un->un_ed[USBNET_ENDPT_INTR] = 0;
usbnet_attach(un, "udavdet");
usbnet_attach(un);
// /* reset the adapter */
// udav_reset(un);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_upl.c,v 1.76 2022/03/03 05:56:18 riastradh Exp $ */
/* $NetBSD: if_upl.c,v 1.77 2022/03/03 05:56:28 riastradh Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.76 2022/03/03 05:56:18 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.77 2022/03/03 05:56:28 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -205,7 +205,7 @@ upl_attach(device_t parent, device_t self, void *aux)
return;
}
usbnet_attach(un, "upldet");
usbnet_attach(un);
/* Initialize interface info.*/
struct ifnet *ifp = usbnet_ifp(un);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ure.c,v 1.55 2022/03/03 05:56:09 riastradh Exp $ */
/* $NetBSD: if_ure.c,v 1.56 2022/03/03 05:56:28 riastradh Exp $ */
/* $OpenBSD: if_ure.c,v 1.10 2018/11/02 21:32:30 jcs Exp $ */
/*-
@ -30,7 +30,7 @@
/* RealTek RTL8152/RTL8153 10/100/Gigabit USB Ethernet device */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ure.c,v 1.55 2022/03/03 05:56:09 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ure.c,v 1.56 2022/03/03 05:56:28 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -855,7 +855,7 @@ ure_attach(device_t parent, device_t self, void *aux)
}
/* Set these up now for ure_ctl(). */
usbnet_attach(un, "uredet");
usbnet_attach(un);
un->un_phyno = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_url.c,v 1.95 2022/03/03 05:56:09 riastradh Exp $ */
/* $NetBSD: if_url.c,v 1.96 2022/03/03 05:56:28 riastradh Exp $ */
/*
* Copyright (c) 2001, 2002
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.95 2022/03/03 05:56:09 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.96 2022/03/03 05:56:28 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -240,7 +240,7 @@ url_attach(device_t parent, device_t self, void *aux)
}
/* Set these up now for url_mem(). */
usbnet_attach(un, "urldet");
usbnet_attach(un);
/* reset the adapter */
url_reset(un);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_urndis.c,v 1.45 2022/03/03 05:56:09 riastradh Exp $ */
/* $NetBSD: if_urndis.c,v 1.46 2022/03/03 05:56:28 riastradh Exp $ */
/* $OpenBSD: if_urndis.c,v 1.31 2011/07/03 15:47:17 matthew Exp $ */
/*
@ -21,7 +21,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_urndis.c,v 1.45 2022/03/03 05:56:09 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_urndis.c,v 1.46 2022/03/03 05:56:28 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -1042,7 +1042,7 @@ urndis_attach(device_t parent, device_t self, void *aux)
ifp->if_watchdog = urndis_watchdog;
#endif
usbnet_attach(un, "urndisdet");
usbnet_attach(un);
struct ifnet *ifp = usbnet_ifp(un);
urndis_init_un(ifp, un);

View File

@ -1,4 +1,4 @@
/* $NetBSD: usbnet.c,v 1.89 2022/03/03 05:56:18 riastradh Exp $ */
/* $NetBSD: usbnet.c,v 1.90 2022/03/03 05:56:28 riastradh Exp $ */
/*
* Copyright (c) 2019 Matthew R. Green
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.89 2022/03/03 05:56:18 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.90 2022/03/03 05:56:28 riastradh Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -1390,8 +1390,7 @@ usbnet_empty_eaddr(struct usbnet * const un)
*/
void
usbnet_attach(struct usbnet *un,
const char *detname) /* detach cv name */
usbnet_attach(struct usbnet *un)
{
USBNETHIST_FUNC(); USBNETHIST_CALLED();

View File

@ -1,4 +1,4 @@
/* $NetBSD: usbnet.h,v 1.30 2022/03/03 05:56:09 riastradh Exp $ */
/* $NetBSD: usbnet.h,v 1.31 2022/03/03 05:56:28 riastradh Exp $ */
/*
* Copyright (c) 2019 Matthew R. Green
@ -315,7 +315,7 @@ void usbnet_enqueue(struct usbnet * const, uint8_t *, size_t, int,
void usbnet_input(struct usbnet * const, uint8_t *, size_t);
/* autoconf */
void usbnet_attach(struct usbnet *un, const char *);
void usbnet_attach(struct usbnet *);
void usbnet_attach_ifp(struct usbnet *, unsigned, unsigned,
const struct usbnet_mii *);
int usbnet_detach(device_t, int);