Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm Use ifmedia_fini().



details:   https://anonhg.NetBSD.org/src/rev/4061eee8b794
branches:  trunk
changeset: 744502:4061eee8b794
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Feb 04 05:15:44 2020 +0000

description:
Use ifmedia_fini().

diffstat:

 sys/arch/arm/omap/if_cpsw.c |  10 +++++-----
 sys/arch/arm/ti/if_cpsw.c   |  10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

diffs (68 lines):

diff -r 51bad8bd927f -r 4061eee8b794 sys/arch/arm/omap/if_cpsw.c
--- a/sys/arch/arm/omap/if_cpsw.c       Tue Feb 04 04:19:24 2020 +0000
+++ b/sys/arch/arm/omap/if_cpsw.c       Tue Feb 04 05:15:44 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_cpsw.c,v 1.26 2020/01/06 06:50:00 msaitoh Exp $     */
+/*     $NetBSD: if_cpsw.c,v 1.27 2020/02/04 05:15:44 thorpej Exp $     */
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.26 2020/01/06 06:50:00 msaitoh Exp $");
+__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.27 2020/02/04 05:15:44 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -362,12 +362,12 @@
        intr_disestablish(sc->sc_txih);
        intr_disestablish(sc->sc_miscih);
 
-       /* Delete all media. */
-       ifmedia_delete_instance(&sc->sc_mii.mii_media, IFM_INST_ANY);
-
        ether_ifdetach(ifp);
        if_detach(ifp);
 
+       /* Delete all media. */
+       ifmedia_fini(&sc->sc_mii.mii_media);
+
        /* Free the packet padding buffer */
        kmem_free(sc->sc_txpad, ETHER_MIN_LEN);
        bus_dmamap_destroy(sc->sc_bdt, sc->sc_txpad_dm);
diff -r 51bad8bd927f -r 4061eee8b794 sys/arch/arm/ti/if_cpsw.c
--- a/sys/arch/arm/ti/if_cpsw.c Tue Feb 04 04:19:24 2020 +0000
+++ b/sys/arch/arm/ti/if_cpsw.c Tue Feb 04 05:15:44 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_cpsw.c,v 1.11 2020/01/29 06:05:31 thorpej Exp $     */
+/*     $NetBSD: if_cpsw.c,v 1.12 2020/02/04 05:15:45 thorpej Exp $     */
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.11 2020/01/29 06:05:31 thorpej Exp $");
+__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.12 2020/02/04 05:15:45 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -361,12 +361,12 @@
        intr_disestablish(sc->sc_txih);
        intr_disestablish(sc->sc_miscih);
 
-       /* Delete all media. */
-       ifmedia_delete_instance(&sc->sc_mii.mii_media, IFM_INST_ANY);
-
        ether_ifdetach(ifp);
        if_detach(ifp);
 
+       /* Delete all media. */
+       ifmedia_fini(&sc->sc_mii.mii_media);
+
        /* Free the packet padding buffer */
        kmem_free(sc->sc_txpad, ETHER_MIN_LEN);
        bus_dmamap_destroy(sc->sc_bdt, sc->sc_txpad_dm);



Home | Main Index | Thread Index | Old Index