Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet Use ifmedia_fini().
details: https://anonhg.NetBSD.org/src/rev/c11744aa25ce
branches: trunk
changeset: 968999:c11744aa25ce
user: thorpej <thorpej%NetBSD.org@localhost>
date: Tue Feb 04 05:44:14 2020 +0000
description:
Use ifmedia_fini().
diffstat:
sys/dev/pci/cxgb/cxgb_main.c | 4 +++-
sys/dev/pci/if_age.c | 10 +++++-----
sys/dev/pci/if_alc.c | 8 ++++----
sys/dev/pci/if_ale.c | 10 +++++-----
sys/dev/pci/if_aq.c | 6 ++++--
sys/dev/pci/if_bge.c | 10 +++++-----
sys/dev/pci/if_bnx.c | 10 +++++-----
sys/dev/pci/if_cas.c | 6 +++---
sys/dev/pci/if_ena.c | 3 ++-
sys/dev/pci/if_et.c | 10 +++++-----
sys/dev/pci/if_ixl.c | 4 ++--
sys/dev/pci/if_msk.c | 10 +++++-----
sys/dev/pci/if_nfe.c | 5 +++--
sys/dev/pci/if_sip.c | 5 +++--
sys/dev/pci/if_vte.c | 6 +++---
sys/dev/pci/ixgbe/ixv.c | 3 ++-
sys/dev/pcmcia/if_ray.c | 6 +++---
sys/dev/usb/if_umb.c | 6 +++---
sys/dev/usb/usbnet.c | 6 +++---
sys/net/if_spppsubr.c | 7 +++----
sys/net/if_tap.c | 6 +++---
sys/net80211/ieee80211.c | 6 +++---
sys/netinet/ip_carp.c | 6 +++---
23 files changed, 80 insertions(+), 73 deletions(-)
diffs (truncated from 644 to 300 lines):
diff -r 675fef504559 -r c11744aa25ce sys/dev/pci/cxgb/cxgb_main.c
--- a/sys/dev/pci/cxgb/cxgb_main.c Tue Feb 04 05:18:36 2020 +0000
+++ b/sys/dev/pci/cxgb/cxgb_main.c Tue Feb 04 05:44:14 2020 +0000
@@ -28,7 +28,7 @@
***************************************************************************/
#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 @@
PORT_LOCK_DEINIT(p);
if_detach(p->ifp);
+ ifmedia_fini(&p->media);
+
return (0);
}
diff -r 675fef504559 -r c11744aa25ce sys/dev/pci/if_age.c
--- a/sys/dev/pci/if_age.c Tue Feb 04 05:18:36 2020 +0000
+++ b/sys/dev/pci/if_age.c Tue Feb 04 05:44:14 2020 +0000
@@ -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 @@
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;
diff -r 675fef504559 -r c11744aa25ce sys/dev/pci/if_alc.c
--- a/sys/dev/pci/if_alc.c Tue Feb 04 05:18:36 2020 +0000
+++ b/sys/dev/pci/if_alc.c Tue Feb 04 05:44:14 2020 +0000
@@ -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@localhost>
@@ -1542,13 +1542,13 @@
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);
diff -r 675fef504559 -r c11744aa25ce sys/dev/pci/if_ale.c
--- a/sys/dev/pci/if_ale.c Tue Feb 04 05:18:36 2020 +0000
+++ b/sys/dev/pci/if_ale.c Tue Feb 04 05:44:14 2020 +0000
@@ -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@localhost>
@@ -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 @@
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;
diff -r 675fef504559 -r c11744aa25ce sys/dev/pci/if_aq.c
--- a/sys/dev/pci/if_aq.c Tue Feb 04 05:18:36 2020 +0000
+++ b/sys/dev/pci/if_aq.c Tue Feb 04 05:44:14 2020 +0000
@@ -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_EVCNT_DETACH(sc, cprc);
#endif
+ ifmedia_fini(&sc->sc_media);
+
mutex_destroy(&sc->sc_mpi_mutex);
mutex_destroy(&sc->sc_mutex);
diff -r 675fef504559 -r c11744aa25ce sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c Tue Feb 04 05:18:36 2020 +0000
+++ b/sys/dev/pci/if_bge.c Tue Feb 04 05:44:14 2020 +0000
@@ -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 @@
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;
diff -r 675fef504559 -r c11744aa25ce sys/dev/pci/if_bnx.c
--- a/sys/dev/pci/if_bnx.c Tue Feb 04 05:18:36 2020 +0000
+++ b/sys/dev/pci/if_bnx.c Tue Feb 04 05:44:14 2020 +0000
@@ -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 @@
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);
diff -r 675fef504559 -r c11744aa25ce sys/dev/pci/if_cas.c
--- a/sys/dev/pci/if_cas.c Tue Feb 04 05:18:36 2020 +0000
+++ b/sys/dev/pci/if_cas.c Tue Feb 04 05:44:14 2020 +0000
@@ -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 @@
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);
diff -r 675fef504559 -r c11744aa25ce sys/dev/pci/if_ena.c
--- a/sys/dev/pci/if_ena.c Tue Feb 04 05:18:36 2020 +0000
+++ b/sys/dev/pci/if_ena.c Tue Feb 04 05:44:14 2020 +0000
@@ -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 @@
ether_ifdetach(adapter->ifp);
if_free(adapter->ifp);
}
+ ifmedia_fini(&adapter->media);
ena_free_all_io_rings_resources(adapter);
diff -r 675fef504559 -r c11744aa25ce sys/dev/pci/if_et.c
--- a/sys/dev/pci/if_et.c Tue Feb 04 05:18:36 2020 +0000
+++ b/sys/dev/pci/if_et.c Tue Feb 04 05:44:14 2020 +0000
@@ -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 @@
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;
diff -r 675fef504559 -r c11744aa25ce sys/dev/pci/if_ixl.c
--- a/sys/dev/pci/if_ixl.c Tue Feb 04 05:18:36 2020 +0000
+++ b/sys/dev/pci/if_ixl.c Tue Feb 04 05:44:14 2020 +0000
@@ -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 $ */
Home |
Main Index |
Thread Index |
Old Index