Use ifmedia_fini().
This commit is contained in:
parent
2fba6779ed
commit
4947e861f2
@ -28,7 +28,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
***************************************************************************/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cxgb_main.c,v 1.7 2018/12/09 11:49:06 jdolecek Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cxgb_main.c,v 1.8 2020/02/04 05:44:14 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -810,6 +810,8 @@ cxgb_port_detach(device_t self, int flags)
|
||||
PORT_LOCK_DEINIT(p);
|
||||
if_detach(p->ifp);
|
||||
|
||||
ifmedia_fini(&p->media);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_age.c,v 1.66 2020/01/30 13:59:24 thorpej Exp $ */
|
||||
/* $NetBSD: if_age.c,v 1.67 2020/02/04 05:44:14 thorpej Exp $ */
|
||||
/* $OpenBSD: if_age.c,v 1.1 2009/01/16 05:00:34 kevlo Exp $ */
|
||||
|
||||
/*-
|
||||
@ -31,7 +31,7 @@
|
||||
/* Driver for Attansic Technology Corp. L1 Gigabit Ethernet. */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.66 2020/01/30 13:59:24 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.67 2020/02/04 05:44:14 thorpej Exp $");
|
||||
|
||||
#include "vlan.h"
|
||||
|
||||
@ -320,13 +320,13 @@ age_detach(device_t self, int flags)
|
||||
|
||||
mii_detach(&sc->sc_miibus, MII_PHY_ANY, MII_OFFSET_ANY);
|
||||
|
||||
/* Delete all remaining media. */
|
||||
ifmedia_delete_instance(&sc->sc_miibus.mii_media, IFM_INST_ANY);
|
||||
|
||||
ether_ifdetach(ifp);
|
||||
if_detach(ifp);
|
||||
age_dma_free(sc);
|
||||
|
||||
/* Delete all remaining media. */
|
||||
ifmedia_fini(&sc->sc_miibus.mii_media);
|
||||
|
||||
if (sc->sc_irq_handle != NULL) {
|
||||
pci_intr_disestablish(sc->sc_pct, sc->sc_irq_handle);
|
||||
sc->sc_irq_handle = NULL;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_alc.c,v 1.47 2020/01/30 13:59:24 thorpej Exp $ */
|
||||
/* $NetBSD: if_alc.c,v 1.48 2020/02/04 05:44:14 thorpej Exp $ */
|
||||
/* $OpenBSD: if_alc.c,v 1.1 2009/08/08 09:31:13 kevlo Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2009, Pyun YongHyeon <yongari@FreeBSD.org>
|
||||
@ -1542,13 +1542,13 @@ alc_detach(device_t self, int flags)
|
||||
|
||||
mii_detach(&sc->sc_miibus, MII_PHY_ANY, MII_OFFSET_ANY);
|
||||
|
||||
/* Delete all remaining media. */
|
||||
ifmedia_delete_instance(&sc->sc_miibus.mii_media, IFM_INST_ANY);
|
||||
|
||||
ether_ifdetach(ifp);
|
||||
if_detach(ifp);
|
||||
alc_dma_free(sc);
|
||||
|
||||
/* Delete all remaining media. */
|
||||
ifmedia_fini(&sc->sc_miibus.mii_media);
|
||||
|
||||
alc_phy_down(sc);
|
||||
if (sc->sc_irq_handle != NULL) {
|
||||
pci_intr_disestablish(sc->sc_pct, sc->sc_irq_handle);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_ale.c,v 1.38 2020/01/30 13:59:24 thorpej Exp $ */
|
||||
/* $NetBSD: if_ale.c,v 1.39 2020/02/04 05:44:14 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org>
|
||||
@ -32,7 +32,7 @@
|
||||
/* Driver for Atheros AR8121/AR8113/AR8114 PCIe Ethernet. */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.38 2020/01/30 13:59:24 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.39 2020/02/04 05:44:14 thorpej Exp $");
|
||||
|
||||
#include "vlan.h"
|
||||
|
||||
@ -613,13 +613,13 @@ ale_detach(device_t self, int flags)
|
||||
|
||||
mii_detach(&sc->sc_miibus, MII_PHY_ANY, MII_OFFSET_ANY);
|
||||
|
||||
/* Delete all remaining media. */
|
||||
ifmedia_delete_instance(&sc->sc_miibus.mii_media, IFM_INST_ANY);
|
||||
|
||||
ether_ifdetach(ifp);
|
||||
if_detach(ifp);
|
||||
ale_dma_free(sc);
|
||||
|
||||
/* Delete all remaining media. */
|
||||
ifmedia_fini(&sc->sc_miibus.mii_media);
|
||||
|
||||
if (sc->sc_irq_handle != NULL) {
|
||||
pci_intr_disestablish(sc->sc_pct, sc->sc_irq_handle);
|
||||
sc->sc_irq_handle = NULL;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_aq.c,v 1.6 2020/01/31 22:41:07 thorpej Exp $ */
|
||||
/* $NetBSD: if_aq.c,v 1.7 2020/02/04 05:44:14 thorpej Exp $ */
|
||||
|
||||
/**
|
||||
* aQuantia Corporation Network Driver
|
||||
@ -62,7 +62,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.6 2020/01/31 22:41:07 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.7 2020/02/04 05:44:14 thorpej Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_if_aq.h"
|
||||
@ -1581,6 +1581,8 @@ aq_detach(device_t self, int flags __unused)
|
||||
AQ_EVCNT_DETACH(sc, cprc);
|
||||
#endif
|
||||
|
||||
ifmedia_fini(&sc->sc_media);
|
||||
|
||||
mutex_destroy(&sc->sc_mpi_mutex);
|
||||
mutex_destroy(&sc->sc_mutex);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_bge.c,v 1.343 2020/02/01 06:17:23 thorpej Exp $ */
|
||||
/* $NetBSD: if_bge.c,v 1.344 2020/02/04 05:44:14 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Wind River Systems
|
||||
@ -79,7 +79,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.343 2020/02/01 06:17:23 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.344 2020/02/04 05:44:14 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -4041,12 +4041,12 @@ bge_detach(device_t self, int flags __unused)
|
||||
|
||||
mii_detach(&sc->bge_mii, MII_PHY_ANY, MII_OFFSET_ANY);
|
||||
|
||||
/* Delete all remaining media. */
|
||||
ifmedia_delete_instance(&sc->bge_mii.mii_media, IFM_INST_ANY);
|
||||
|
||||
ether_ifdetach(ifp);
|
||||
if_detach(ifp);
|
||||
|
||||
/* Delete all remaining media. */
|
||||
ifmedia_fini(&sc->bge_mii.mii_media);
|
||||
|
||||
bge_release_resources(sc);
|
||||
|
||||
return 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_bnx.c,v 1.90 2020/02/01 07:12:40 thorpej Exp $ */
|
||||
/* $NetBSD: if_bnx.c,v 1.91 2020/02/04 05:44:14 thorpej Exp $ */
|
||||
/* $OpenBSD: if_bnx.c,v 1.101 2013/03/28 17:21:44 brad Exp $ */
|
||||
|
||||
/*-
|
||||
@ -35,7 +35,7 @@
|
||||
#if 0
|
||||
__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $");
|
||||
#endif
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.90 2020/02/01 07:12:40 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.91 2020/02/04 05:44:14 thorpej Exp $");
|
||||
|
||||
/*
|
||||
* The following controllers are supported by this driver:
|
||||
@ -975,12 +975,12 @@ bnx_detach(device_t dev, int flags)
|
||||
ether_ifdetach(ifp);
|
||||
workqueue_destroy(sc->bnx_wq);
|
||||
|
||||
/* Delete all remaining media. */
|
||||
ifmedia_delete_instance(&sc->bnx_mii.mii_media, IFM_INST_ANY);
|
||||
|
||||
if_detach(ifp);
|
||||
mii_detach(&sc->bnx_mii, MII_PHY_ANY, MII_OFFSET_ANY);
|
||||
|
||||
/* Delete all remaining media. */
|
||||
ifmedia_fini(&sc->bnx_mii.mii_media);
|
||||
|
||||
/* Release all remaining resources. */
|
||||
bnx_release_resources(sc);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_cas.c,v 1.38 2020/01/30 05:24:53 thorpej Exp $ */
|
||||
/* $NetBSD: if_cas.c,v 1.39 2020/02/04 05:44:14 thorpej Exp $ */
|
||||
/* $OpenBSD: if_cas.c,v 1.29 2009/11/29 16:19:38 kettenis Exp $ */
|
||||
|
||||
/*
|
||||
@ -44,7 +44,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.38 2020/01/30 05:24:53 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.39 2020/02/04 05:44:14 thorpej Exp $");
|
||||
|
||||
#ifndef _MODULE
|
||||
#include "opt_inet.h"
|
||||
@ -760,7 +760,7 @@ cas_detach(device_t self, int flags)
|
||||
|
||||
ether_ifdetach(ifp);
|
||||
if_detach(ifp);
|
||||
ifmedia_delete_instance(&sc->sc_mii.mii_media, IFM_INST_ANY);
|
||||
ifmedia_fini(&sc->sc_mii.mii_media);
|
||||
|
||||
callout_destroy(&sc->sc_tick_ch);
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
#if 0
|
||||
__FBSDID("$FreeBSD: head/sys/dev/ena/ena.c 333456 2018-05-10 09:37:54Z mw $");
|
||||
#endif
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.20 2020/02/01 02:32:40 riastradh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.21 2020/02/04 05:44:14 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -3880,6 +3880,7 @@ ena_detach(device_t pdev, int flags)
|
||||
ether_ifdetach(adapter->ifp);
|
||||
if_free(adapter->ifp);
|
||||
}
|
||||
ifmedia_fini(&adapter->media);
|
||||
|
||||
ena_free_all_io_rings_resources(adapter);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_et.c,v 1.29 2020/01/30 05:42:00 thorpej Exp $ */
|
||||
/* $NetBSD: if_et.c,v 1.30 2020/02/04 05:44:14 thorpej Exp $ */
|
||||
/* $OpenBSD: if_et.c,v 1.12 2008/07/11 09:29:02 kevlo $ */
|
||||
/*
|
||||
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.29 2020/01/30 05:42:00 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.30 2020/02/04 05:44:14 thorpej Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "vlan.h"
|
||||
@ -332,13 +332,13 @@ et_detach(device_t self, int flags)
|
||||
|
||||
mii_detach(&sc->sc_miibus, MII_PHY_ANY, MII_OFFSET_ANY);
|
||||
|
||||
/* Delete all remaining media. */
|
||||
ifmedia_delete_instance(&sc->sc_miibus.mii_media, IFM_INST_ANY);
|
||||
|
||||
ether_ifdetach(ifp);
|
||||
if_detach(ifp);
|
||||
et_dma_free(sc);
|
||||
|
||||
/* Delete all remaining media. */
|
||||
ifmedia_fini(&sc->sc_miibus.mii_media);
|
||||
|
||||
if (sc->sc_irq_handle != NULL) {
|
||||
pci_intr_disestablish(sc->sc_pct, sc->sc_irq_handle);
|
||||
sc->sc_irq_handle = NULL;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_ixl.c,v 1.35 2020/02/01 12:45:05 thorpej Exp $ */
|
||||
/* $NetBSD: if_ixl.c,v 1.36 2020/02/04 05:44:14 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2013-2015, Intel Corporation
|
||||
@ -1522,9 +1522,9 @@ ixl_detach(device_t self, int flags)
|
||||
sc->sc_workq_txrx = NULL;
|
||||
}
|
||||
|
||||
ifmedia_delete_instance(&sc->sc_media, IFM_INST_ANY);
|
||||
ether_ifdetach(ifp);
|
||||
if_detach(ifp);
|
||||
ifmedia_fini(&sc->sc_media);
|
||||
|
||||
ixl_teardown_interrupts(sc);
|
||||
ixl_teardown_stats(sc);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_msk.c,v 1.97 2020/01/30 05:42:00 thorpej Exp $ */
|
||||
/* $NetBSD: if_msk.c,v 1.98 2020/02/04 05:44:14 thorpej Exp $ */
|
||||
/* $OpenBSD: if_msk.c,v 1.79 2009/10/15 17:54:56 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
@ -52,7 +52,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.97 2020/01/30 05:42:00 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.98 2020/02/04 05:44:14 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -1332,14 +1332,14 @@ msk_detach(device_t self, int flags)
|
||||
if (LIST_FIRST(&sc_if->sk_mii.mii_phys) != NULL)
|
||||
mii_detach(&sc_if->sk_mii, MII_PHY_ANY, MII_OFFSET_ANY);
|
||||
|
||||
/* Delete any remaining media. */
|
||||
ifmedia_delete_instance(&sc_if->sk_mii.mii_media, IFM_INST_ANY);
|
||||
|
||||
pmf_device_deregister(self);
|
||||
|
||||
ether_ifdetach(ifp);
|
||||
if_detach(ifp);
|
||||
|
||||
/* Delete any remaining media. */
|
||||
ifmedia_fini(&sc_if->sk_mii.mii_media);
|
||||
|
||||
msk_free_jumbo_mem(sc_if);
|
||||
|
||||
bus_dmamem_unmap(sc->sc_dmatag, sc_if->sk_rdata,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_nfe.c,v 1.73 2020/01/30 05:42:00 thorpej Exp $ */
|
||||
/* $NetBSD: if_nfe.c,v 1.74 2020/02/04 05:44:14 thorpej Exp $ */
|
||||
/* $OpenBSD: if_nfe.c,v 1.77 2008/02/05 16:52:50 brad Exp $ */
|
||||
|
||||
/*-
|
||||
@ -21,7 +21,7 @@
|
||||
/* Driver for NVIDIA nForce MCP Fast Ethernet and Gigabit Ethernet */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.73 2020/01/30 05:42:00 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.74 2020/02/04 05:44:14 thorpej Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "vlan.h"
|
||||
@ -452,6 +452,7 @@ nfe_detach(device_t self, int flags)
|
||||
ether_ifdetach(ifp);
|
||||
if_detach(ifp);
|
||||
mii_detach(&sc->sc_mii, MII_PHY_ANY, MII_OFFSET_ANY);
|
||||
ifmedia_fini(&sc->sc_mii.mii_media);
|
||||
|
||||
nfe_free_rx_ring(sc, &sc->rxq);
|
||||
mutex_destroy(&sc->rxq.mtx);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_sip.c,v 1.176 2020/01/30 05:42:00 thorpej Exp $ */
|
||||
/* $NetBSD: if_sip.c,v 1.177 2020/02/04 05:44:14 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
|
||||
@ -73,7 +73,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.176 2020/01/30 05:42:00 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.177 2020/02/04 05:44:14 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -911,6 +911,7 @@ sipcom_do_detach(device_t self, enum sip_attach_stage stage)
|
||||
ether_ifdetach(ifp);
|
||||
if_detach(ifp);
|
||||
mii_detach(&sc->sc_mii, MII_PHY_ANY, MII_OFFSET_ANY);
|
||||
ifmedia_fini(&sc->sc_mii.mii_media);
|
||||
|
||||
/*FALLTHROUGH*/
|
||||
case SIP_ATTACH_CREATE_RXMAP:
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_vte.c,v 1.29 2020/02/01 05:14:28 thorpej Exp $ */
|
||||
/* $NetBSD: if_vte.c,v 1.30 2020/02/04 05:44:14 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2011 Manuel Bouyer. All rights reserved.
|
||||
@ -55,7 +55,7 @@
|
||||
/* Driver for DM&P Electronics, Inc, Vortex86 RDC R6040 FastEthernet. */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_vte.c,v 1.29 2020/02/01 05:14:28 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_vte.c,v 1.30 2020/02/04 05:44:14 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -325,10 +325,10 @@ vte_detach(device_t dev, int flags __unused)
|
||||
pmf_device_deregister(dev);
|
||||
|
||||
mii_detach(&sc->vte_mii, MII_PHY_ANY, MII_OFFSET_ANY);
|
||||
ifmedia_delete_instance(&sc->vte_mii.mii_media, IFM_INST_ANY);
|
||||
|
||||
ether_ifdetach(ifp);
|
||||
if_detach(ifp);
|
||||
ifmedia_fini(&sc->vte_mii.mii_media);
|
||||
|
||||
vte_dma_free(sc);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*$NetBSD: ixv.c,v 1.144 2020/01/21 14:55:55 msaitoh Exp $*/
|
||||
/*$NetBSD: ixv.c,v 1.145 2020/02/04 05:44:15 thorpej Exp $*/
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
@ -619,6 +619,7 @@ ixv_detach(device_t dev, int flags)
|
||||
bus_generic_detach(dev);
|
||||
#endif
|
||||
if_detach(adapter->ifp);
|
||||
ifmedia_fini(&adapter->media);
|
||||
if_percpuq_destroy(adapter->ipq);
|
||||
|
||||
sysctl_teardown(&adapter->sysctllog);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_ray.c,v 1.97 2020/01/29 13:54:41 thorpej Exp $ */
|
||||
/* $NetBSD: if_ray.c,v 1.98 2020/02/04 05:46:32 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000 Christian E. Hopps
|
||||
@ -57,7 +57,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_ray.c,v 1.97 2020/01/29 13:54:41 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_ray.c,v 1.98 2020/02/04 05:46:32 thorpej Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
|
||||
@ -642,9 +642,9 @@ ray_detach(device_t self, int flags)
|
||||
if (sc->sc_if.if_flags & IFF_UP)
|
||||
ray_disable(sc);
|
||||
|
||||
ifmedia_delete_instance(&sc->sc_media, IFM_INST_ANY);
|
||||
ether_ifdetach(ifp);
|
||||
if_detach(ifp);
|
||||
ifmedia_fini(&sc->sc_media);
|
||||
|
||||
pcmcia_function_unconfigure(sc->sc_pf);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_umb.c,v 1.11 2020/01/29 06:35:28 thorpej Exp $ */
|
||||
/* $NetBSD: if_umb.c,v 1.12 2020/02/04 05:46:32 thorpej Exp $ */
|
||||
/* $OpenBSD: if_umb.c,v 1.20 2018/09/10 17:00:45 gerhard Exp $ */
|
||||
|
||||
/*
|
||||
@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_umb.c,v 1.11 2020/01/29 06:35:28 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_umb.c,v 1.12 2020/02/04 05:46:32 thorpej Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_inet.h"
|
||||
@ -601,7 +601,7 @@ umb_detach(device_t self, int flags)
|
||||
sc->sc_resp_buf = NULL;
|
||||
}
|
||||
if (ifp->if_softc) {
|
||||
ifmedia_delete_instance(&sc->sc_im, IFM_INST_ANY);
|
||||
ifmedia_fini(&sc->sc_im);
|
||||
}
|
||||
if (sc->sc_attached) {
|
||||
rnd_detach_source(&sc->sc_rnd_source);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: usbnet.c,v 1.34 2020/01/29 06:39:07 thorpej Exp $ */
|
||||
/* $NetBSD: usbnet.c,v 1.35 2020/02/04 05:46:32 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2019 Matthew R. Green
|
||||
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.34 2020/01/29 06:39:07 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.35 2020/02/04 05:46:32 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -1534,7 +1534,7 @@ usbnet_detach(device_t self, int flags)
|
||||
|
||||
if (mii) {
|
||||
mii_detach(mii, MII_PHY_ANY, MII_OFFSET_ANY);
|
||||
ifmedia_delete_instance(&mii->mii_media, IFM_INST_ANY);
|
||||
ifmedia_fini(&mii->mii_media);
|
||||
}
|
||||
if (ifp->if_softc) {
|
||||
if (!usbnet_empty_eaddr(un))
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_spppsubr.c,v 1.185 2020/01/29 04:28:27 thorpej Exp $ */
|
||||
/* $NetBSD: if_spppsubr.c,v 1.186 2020/02/04 05:46:32 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Synchronous PPP/Cisco link level subroutines.
|
||||
@ -41,7 +41,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.185 2020/01/29 04:28:27 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.186 2020/02/04 05:46:32 thorpej Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_inet.h"
|
||||
@ -1094,8 +1094,7 @@ sppp_detach(struct ifnet *ifp)
|
||||
SPPP_UNLOCK(sp);
|
||||
rw_destroy(&sp->pp_lock);
|
||||
|
||||
/* Safety - shouldn't be needed as there is no media to set. */
|
||||
ifmedia_delete_instance(&sp->pp_im, IFM_INST_ANY);
|
||||
ifmedia_fini(&sp->pp_im);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_tap.c,v 1.116 2020/01/29 04:28:27 thorpej Exp $ */
|
||||
/* $NetBSD: if_tap.c,v 1.117 2020/02/04 05:46:32 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003, 2004, 2008, 2009 The NetBSD Foundation.
|
||||
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.116 2020/01/29 04:28:27 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.117 2020/02/04 05:46:32 thorpej Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
|
||||
@ -451,7 +451,7 @@ tap_detach(device_t self, int flags)
|
||||
"sysctl_destroyv returned %d, ignoring\n", error);
|
||||
ether_ifdetach(ifp);
|
||||
if_detach(ifp);
|
||||
ifmedia_removeall(&sc->sc_im);
|
||||
ifmedia_fini(&sc->sc_im);
|
||||
seldestroy(&sc->sc_rsel);
|
||||
mutex_destroy(&sc->sc_lock);
|
||||
cv_destroy(&sc->sc_cv);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ieee80211.c,v 1.57 2019/10/03 17:46:56 jmcneill Exp $ */
|
||||
/* $NetBSD: ieee80211.c,v 1.58 2020/02/04 05:46:32 thorpej Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2001 Atsushi Onoe
|
||||
* Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
|
||||
@ -36,7 +36,7 @@
|
||||
__FBSDID("$FreeBSD: src/sys/net80211/ieee80211.c,v 1.22 2005/08/10 16:22:29 sam Exp $");
|
||||
#endif
|
||||
#ifdef __NetBSD__
|
||||
__KERNEL_RCSID(0, "$NetBSD: ieee80211.c,v 1.57 2019/10/03 17:46:56 jmcneill Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ieee80211.c,v 1.58 2020/02/04 05:46:32 thorpej Exp $");
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -260,7 +260,7 @@ ieee80211_ifdetach(struct ieee80211com *ic)
|
||||
ieee80211_crypto_detach(ic);
|
||||
ieee80211_node_detach(ic);
|
||||
LIST_REMOVE(ic, ic_list);
|
||||
ifmedia_delete_instance(&ic->ic_media, IFM_INST_ANY);
|
||||
ifmedia_fini(&ic->ic_media);
|
||||
|
||||
IEEE80211_BEACON_LOCK_DESTROY(ic);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ip_carp.c,v 1.108 2020/01/29 04:37:24 thorpej Exp $ */
|
||||
/* $NetBSD: ip_carp.c,v 1.109 2020/02/04 05:46:32 thorpej Exp $ */
|
||||
/* $OpenBSD: ip_carp.c,v 1.113 2005/11/04 08:11:54 mcbride Exp $ */
|
||||
|
||||
/*
|
||||
@ -33,7 +33,7 @@
|
||||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ip_carp.c,v 1.108 2020/01/29 04:37:24 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ip_carp.c,v 1.109 2020/02/04 05:46:32 thorpej Exp $");
|
||||
|
||||
/*
|
||||
* TODO:
|
||||
@ -907,10 +907,10 @@ carp_clone_destroy(struct ifnet *ifp)
|
||||
{
|
||||
struct carp_softc *sc = ifp->if_softc;
|
||||
|
||||
ifmedia_delete_instance(&sc->sc_im, IFM_INST_ANY);
|
||||
carpdetach(ifp->if_softc);
|
||||
ether_ifdetach(ifp);
|
||||
if_detach(ifp);
|
||||
ifmedia_fini(&sc->sc_im);
|
||||
callout_destroy(&sc->sc_ad_tmo);
|
||||
callout_destroy(&sc->sc_md_tmo);
|
||||
callout_destroy(&sc->sc_md6_tmo);
|
||||
|
Loading…
Reference in New Issue
Block a user