Source-Changes-HG archive

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

[src/trunk]: src/sys Bring some order to the chaos which was the MII code fun...



details:   https://anonhg.NetBSD.org/src/rev/f6e74382a57c
branches:  trunk
changeset: 481572:f6e74382a57c
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Feb 02 08:05:26 2000 +0000

description:
Bring some order to the chaos which was the MII code function naming
"conventions".

diffstat:

 sys/arch/macppc/dev/if_bm.c |   4 ++--
 sys/dev/ic/elink3.c         |   4 ++--
 sys/dev/ic/elinkxl.c        |   4 ++--
 sys/dev/ic/hme.c            |   4 ++--
 sys/dev/ic/i82557.c         |   4 ++--
 sys/dev/ic/smc83c170.c      |   4 ++--
 sys/dev/ic/tulip.c          |  18 +++++++++---------
 sys/dev/mii/dmphy.c         |   8 ++++----
 sys/dev/mii/exphy.c         |   8 ++++----
 sys/dev/mii/icsphy.c        |   8 ++++----
 sys/dev/mii/inphy.c         |   8 ++++----
 sys/dev/mii/iophy.c         |   8 ++++----
 sys/dev/mii/lxtphy.c        |   8 ++++----
 sys/dev/mii/mii.c           |  18 +++++++++---------
 sys/dev/mii/mii.h           |   3 ++-
 sys/dev/mii/mii_physubr.c   |  12 ++++++------
 sys/dev/mii/miivar.h        |  27 +++++++++++++--------------
 sys/dev/mii/nsphy.c         |   8 ++++----
 sys/dev/mii/nsphyter.c      |   7 ++++---
 sys/dev/mii/qsphy.c         |   8 ++++----
 sys/dev/mii/sqphy.c         |   8 ++++----
 sys/dev/mii/tlphy.c         |   8 ++++----
 sys/dev/mii/tqphy.c         |   8 ++++----
 sys/dev/mii/ukphy.c         |   8 ++++----
 sys/dev/pci/if_rl.c         |   4 ++--
 sys/dev/pci/if_sip.c        |   4 ++--
 sys/dev/pci/if_tl.c         |   4 ++--
 sys/dev/pci/if_vr.c         |   4 ++--
 sys/dev/pcmcia/if_xe.c      |   4 ++--
 sys/dev/sbus/be.c           |   4 ++--
 sys/dev/usb/if_aue.c        |   4 ++--
 31 files changed, 117 insertions(+), 116 deletions(-)

diffs (truncated from 909 to 300 lines):

diff -r 5d07bb8322f9 -r f6e74382a57c sys/arch/macppc/dev/if_bm.c
--- a/sys/arch/macppc/dev/if_bm.c       Wed Feb 02 08:00:21 2000 +0000
+++ b/sys/arch/macppc/dev/if_bm.c       Wed Feb 02 08:05:26 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bm.c,v 1.4 2000/01/25 14:38:50 tsubai Exp $ */
+/*     $NetBSD: if_bm.c,v 1.5 2000/02/02 08:05:31 thorpej Exp $        */
 
 /*-
  * Copyright (C) 1998, 1999, 2000 Tsubai Masanari.  All rights reserved.
@@ -251,7 +251,7 @@
        mii->mii_statchg = bmac_mii_statchg;
 
        ifmedia_init(&mii->mii_media, 0, bmac_mediachange, bmac_mediastatus);
-       mii_phy_probe(&sc->sc_dev, mii, 0xffffffff, MII_PHY_ANY,
+       mii_attach(&sc->sc_dev, mii, 0xffffffff, MII_PHY_ANY,
                      MII_OFFSET_ANY);
 
        /* Choose a default media. */
diff -r 5d07bb8322f9 -r f6e74382a57c sys/dev/ic/elink3.c
--- a/sys/dev/ic/elink3.c       Wed Feb 02 08:00:21 2000 +0000
+++ b/sys/dev/ic/elink3.c       Wed Feb 02 08:05:26 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: elink3.c,v 1.68 2000/02/02 08:00:21 augustss Exp $     */
+/*     $NetBSD: elink3.c,v 1.69 2000/02/02 08:05:26 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -482,7 +482,7 @@
                 * we don't, just treat the Boomerang like the Vortex.
                 */
                if (sc->ep_flags & ELINK_FLAGS_MII) {
-                       mii_phy_probe(&sc->sc_dev, &sc->sc_mii, 0xffffffff,
+                       mii_attach(&sc->sc_dev, &sc->sc_mii, 0xffffffff,
                            MII_PHY_ANY, MII_OFFSET_ANY);
                        if (LIST_FIRST(&sc->sc_mii.mii_phys) == NULL) {
                                ifmedia_add(&sc->sc_mii.mii_media,
diff -r 5d07bb8322f9 -r f6e74382a57c sys/dev/ic/elinkxl.c
--- a/sys/dev/ic/elinkxl.c      Wed Feb 02 08:00:21 2000 +0000
+++ b/sys/dev/ic/elinkxl.c      Wed Feb 02 08:05:26 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: elinkxl.c,v 1.22 2000/01/18 03:35:40 mycroft Exp $     */
+/*     $NetBSD: elinkxl.c,v 1.23 2000/02/02 08:05:26 thorpej Exp $     */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -409,7 +409,7 @@
                                << (CONFIG_XCVR_SEL_SHIFT + 16);
                bus_space_write_4(iot, ioh, ELINK_W3_INTERNAL_CONFIG, icfg);
 
-               mii_phy_probe(&sc->sc_dev, &sc->ex_mii, 0xffffffff,
+               mii_attach(&sc->sc_dev, &sc->ex_mii, 0xffffffff,
                    MII_PHY_ANY, MII_OFFSET_ANY);
                if (LIST_FIRST(&sc->ex_mii.mii_phys) == NULL) {
                        ifmedia_add(&sc->ex_mii.mii_media, IFM_ETHER|IFM_NONE,
diff -r 5d07bb8322f9 -r f6e74382a57c sys/dev/ic/hme.c
--- a/sys/dev/ic/hme.c  Wed Feb 02 08:00:21 2000 +0000
+++ b/sys/dev/ic/hme.c  Wed Feb 02 08:05:26 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hme.c,v 1.5 1999/12/18 14:05:37 pk Exp $       */
+/*     $NetBSD: hme.c,v 1.6 2000/02/02 08:05:26 thorpej Exp $  */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -246,7 +246,7 @@
 
        hme_mifinit(sc);
 
-       mii_phy_probe(&sc->sc_dev, mii, 0xffffffff,
+       mii_attach(&sc->sc_dev, mii, 0xffffffff,
                        MII_PHY_ANY, MII_OFFSET_ANY);
 
        child = LIST_FIRST(&mii->mii_phys);
diff -r 5d07bb8322f9 -r f6e74382a57c sys/dev/ic/i82557.c
--- a/sys/dev/ic/i82557.c       Wed Feb 02 08:00:21 2000 +0000
+++ b/sys/dev/ic/i82557.c       Wed Feb 02 08:05:26 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i82557.c,v 1.15 1999/12/12 17:46:36 thorpej Exp $      */
+/*     $NetBSD: i82557.c,v 1.16 2000/02/02 08:05:27 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
@@ -401,7 +401,7 @@
        sc->sc_mii.mii_statchg = fxp_statchg;
        ifmedia_init(&sc->sc_mii.mii_media, 0, fxp_mii_mediachange,
            fxp_mii_mediastatus);
-       mii_phy_probe(&sc->sc_dev, &sc->sc_mii, 0xffffffff, MII_PHY_ANY,
+       mii_attach(&sc->sc_dev, &sc->sc_mii, 0xffffffff, MII_PHY_ANY,
            MII_OFFSET_ANY);
        if (LIST_FIRST(&sc->sc_mii.mii_phys) == NULL) {
                ifmedia_add(&sc->sc_mii.mii_media, IFM_ETHER|IFM_NONE, 0, NULL);
diff -r 5d07bb8322f9 -r f6e74382a57c sys/dev/ic/smc83c170.c
--- a/sys/dev/ic/smc83c170.c    Wed Feb 02 08:00:21 2000 +0000
+++ b/sys/dev/ic/smc83c170.c    Wed Feb 02 08:05:26 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: smc83c170.c,v 1.23 1999/11/12 18:14:18 thorpej Exp $   */
+/*     $NetBSD: smc83c170.c,v 1.24 2000/02/02 08:05:27 thorpej Exp $   */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -229,7 +229,7 @@
        sc->sc_mii.mii_statchg = epic_statchg;
        ifmedia_init(&sc->sc_mii.mii_media, 0, epic_mediachange,
            epic_mediastatus);
-       mii_phy_probe(&sc->sc_dev, &sc->sc_mii, 0xffffffff, MII_PHY_ANY,
+       mii_attach(&sc->sc_dev, &sc->sc_mii, 0xffffffff, MII_PHY_ANY,
            MII_OFFSET_ANY);
        if (LIST_FIRST(&sc->sc_mii.mii_phys) == NULL) {
                ifmedia_add(&sc->sc_mii.mii_media, IFM_ETHER|IFM_NONE, 0, NULL);
diff -r 5d07bb8322f9 -r f6e74382a57c sys/dev/ic/tulip.c
--- a/sys/dev/ic/tulip.c        Wed Feb 02 08:00:21 2000 +0000
+++ b/sys/dev/ic/tulip.c        Wed Feb 02 08:05:26 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tulip.c,v 1.42 2000/02/01 22:54:47 thorpej Exp $       */
+/*     $NetBSD: tulip.c,v 1.43 2000/02/02 08:05:27 thorpej Exp $       */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -531,7 +531,7 @@
 
        case DVACT_DEACTIVATE:
                if (sc->sc_flags & TULIPF_HAS_MII)
-                       mii_phy_activate(&sc->sc_mii, act, MII_PHY_ANY,
+                       mii_activate(&sc->sc_mii, act, MII_PHY_ANY,
                            MII_OFFSET_ANY);
                if_deactivate(&sc->sc_ethercom.ec_if);
                break;
@@ -561,7 +561,7 @@
 
        if (sc->sc_flags & TULIPF_HAS_MII) {
                /* Detach all PHYs */
-               mii_phy_detach(&sc->sc_mii, MII_PHY_ANY, MII_OFFSET_ANY);
+               mii_detach(&sc->sc_mii, MII_PHY_ANY, MII_OFFSET_ANY);
        }
 
        /* Delete all remaining media. */
@@ -4310,7 +4310,7 @@
                         * particularly care; the MII code just likes to
                         * search the whole thing anyhow.
                         */
-                       mii_phy_probe(&sc->sc_dev, &sc->sc_mii, 0xffffffff,
+                       mii_attach(&sc->sc_dev, &sc->sc_mii, 0xffffffff,
                            MII_PHY_ANY, tm->tm_phyno);
 
                        /*
@@ -4470,7 +4470,7 @@
                         * particularly care; the MII code just likes to
                         * search the whole thing anyhow.
                         */
-                       mii_phy_probe(&sc->sc_dev, &sc->sc_mii, 0xffffffff,
+                       mii_attach(&sc->sc_dev, &sc->sc_mii, 0xffffffff,
                            MII_PHY_ANY, tm->tm_phyno);
 
                        /*
@@ -4687,7 +4687,7 @@
        sc->sc_mii.mii_statchg = sc->sc_statchg;
        ifmedia_init(&sc->sc_mii.mii_media, 0, tlp_mediachange,
            tlp_mediastatus);
-       mii_phy_probe(&sc->sc_dev, &sc->sc_mii, 0xffffffff, MII_PHY_ANY,
+       mii_attach(&sc->sc_dev, &sc->sc_mii, 0xffffffff, MII_PHY_ANY,
            MII_OFFSET_ANY);
        if (LIST_FIRST(&sc->sc_mii.mii_phys) == NULL) {
                ifmedia_add(&sc->sc_mii.mii_media, IFM_ETHER|IFM_NONE, 0, NULL);
@@ -4735,7 +4735,7 @@
        sc->sc_mii.mii_statchg = sc->sc_statchg;
        ifmedia_init(&sc->sc_mii.mii_media, 0, tlp_mediachange,
            tlp_mediastatus);
-       mii_phy_probe(&sc->sc_dev, &sc->sc_mii, 0xffffffff, MII_PHY_ANY,
+       mii_attach(&sc->sc_dev, &sc->sc_mii, 0xffffffff, MII_PHY_ANY,
            MII_OFFSET_ANY);
        if (LIST_FIRST(&sc->sc_mii.mii_phys) == NULL) {
                /* XXX What about AUI/BNC support? */
@@ -5147,7 +5147,7 @@
            tlp_mediastatus);
        if (sc->sc_chip == TULIP_CHIP_MX98713 ||
            sc->sc_chip == TULIP_CHIP_MX98713A) {
-               mii_phy_probe(&sc->sc_dev, &sc->sc_mii, 0xffffffff,
+               mii_attach(&sc->sc_dev, &sc->sc_mii, 0xffffffff,
                    MII_PHY_ANY, MII_OFFSET_ANY);
                if (LIST_FIRST(&sc->sc_mii.mii_phys) != NULL) {
                        sc->sc_flags |= TULIPF_HAS_MII;
@@ -5215,7 +5215,7 @@
        sc->sc_mii.mii_statchg = sc->sc_statchg;
        ifmedia_init(&sc->sc_mii.mii_media, 0, tlp_mediachange,
            tlp_mediastatus);
-       mii_phy_probe(&sc->sc_dev, &sc->sc_mii, 0xffffffff, MII_PHY_ANY,
+       mii_attach(&sc->sc_dev, &sc->sc_mii, 0xffffffff, MII_PHY_ANY,
            MII_OFFSET_ANY);
        if (LIST_FIRST(&sc->sc_mii.mii_phys) == NULL) {
                ifmedia_add(&sc->sc_mii.mii_media, IFM_ETHER|IFM_NONE, 0, NULL);
diff -r 5d07bb8322f9 -r f6e74382a57c sys/dev/mii/dmphy.c
--- a/sys/dev/mii/dmphy.c       Wed Feb 02 08:00:21 2000 +0000
+++ b/sys/dev/mii/dmphy.c       Wed Feb 02 08:05:26 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dmphy.c,v 1.1 2000/02/02 04:29:49 thorpej Exp $        */
+/*     $NetBSD: dmphy.c,v 1.2 2000/02/02 08:05:32 thorpej Exp $        */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -92,8 +92,8 @@
 void   dmphyattach __P((struct device *, struct device *, void *));
 
 struct cfattach dmphy_ca = {
-       sizeof(struct mii_softc), dmphymatch, dmphyattach, mii_detach,
-           mii_activate
+       sizeof(struct mii_softc), dmphymatch, dmphyattach, mii_phy_detach,
+           mii_phy_activate
 };
 
 int    dmphy_service __P((struct mii_softc *, struct mii_data *, int));
@@ -139,7 +139,7 @@
        if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0)
                printf("no media present");
        else
-               mii_add_media(sc);
+               mii_phy_add_media(sc);
        printf("\n");
 }
 
diff -r 5d07bb8322f9 -r f6e74382a57c sys/dev/mii/exphy.c
--- a/sys/dev/mii/exphy.c       Wed Feb 02 08:00:21 2000 +0000
+++ b/sys/dev/mii/exphy.c       Wed Feb 02 08:05:26 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exphy.c,v 1.19 2000/01/27 16:44:30 thorpej Exp $       */
+/*     $NetBSD: exphy.c,v 1.20 2000/02/02 08:05:32 thorpej Exp $       */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -88,8 +88,8 @@
 void   exphyattach __P((struct device *, struct device *, void *));
 
 struct cfattach exphy_ca = {
-       sizeof(struct mii_softc), exphymatch, exphyattach, mii_detach,
-           mii_activate
+       sizeof(struct mii_softc), exphymatch, exphyattach, mii_phy_detach,
+           mii_phy_activate
 };
 
 int    exphy_service __P((struct mii_softc *, struct mii_data *, int));
@@ -154,7 +154,7 @@
        if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0)
                printf("no media present");
        else
-               mii_add_media(sc);
+               mii_phy_add_media(sc);
        printf("\n");
 }
 
diff -r 5d07bb8322f9 -r f6e74382a57c sys/dev/mii/icsphy.c
--- a/sys/dev/mii/icsphy.c      Wed Feb 02 08:00:21 2000 +0000
+++ b/sys/dev/mii/icsphy.c      Wed Feb 02 08:05:26 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: icsphy.c,v 1.13 2000/01/27 16:44:30 thorpej Exp $      */
+/*     $NetBSD: icsphy.c,v 1.14 2000/02/02 08:05:32 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -91,8 +91,8 @@
 void   icsphyattach __P((struct device *, struct device *, void *));
 
 struct cfattach icsphy_ca = {
-       sizeof(struct mii_softc), icsphymatch, icsphyattach, mii_detach,
-           mii_activate
+       sizeof(struct mii_softc), icsphymatch, icsphyattach, mii_phy_detach,
+           mii_phy_activate
 };
 
 int    icsphy_service __P((struct mii_softc *, struct mii_data *, int));
@@ -139,7 +139,7 @@
        if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0)
                printf("no media present");
        else
-               mii_add_media(sc);
+               mii_phy_add_media(sc);
        printf("\n");
 }
 
diff -r 5d07bb8322f9 -r f6e74382a57c sys/dev/mii/inphy.c
--- a/sys/dev/mii/inphy.c       Wed Feb 02 08:00:21 2000 +0000
+++ b/sys/dev/mii/inphy.c       Wed Feb 02 08:05:26 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: inphy.c,v 1.14 2000/01/27 16:44:30 thorpej Exp $       */
+/*     $NetBSD: inphy.c,v 1.15 2000/02/02 08:05:32 thorpej Exp $       */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -92,8 +92,8 @@
 void   inphyattach __P((struct device *, struct device *, void *));
 
 struct cfattach inphy_ca = {
-       sizeof(struct mii_softc), inphymatch, inphyattach, mii_detach,
-           mii_activate
+       sizeof(struct mii_softc), inphymatch, inphyattach, mii_phy_detach,
+           mii_phy_activate
 };
 
 int    inphy_service __P((struct mii_softc *, struct mii_data *, int));
@@ -146,7 +146,7 @@
        if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0)
                printf("no media present");
        else



Home | Main Index | Thread Index | Old Index