summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-04-28 20:34:20 +0000
committerphk <phk@FreeBSD.org>2002-04-28 20:34:20 +0000
commite67296b3b06948c8abac60000a1a1b3fd9d271f7 (patch)
tree57f15bd8169ec54566fa5890d74e3139943e0ce4 /sys/dev
parentf8c369f7e5ced10460a44577e47774f38701b831 (diff)
downloadFreeBSD-src-e67296b3b06948c8abac60000a1a1b3fd9d271f7.zip
FreeBSD-src-e67296b3b06948c8abac60000a1a1b3fd9d271f7.tar.gz
Follow NetBSD and s/IFM_1000_TX/IFM_1000_T/
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/bge/if_bge.c4
-rw-r--r--sys/dev/em/if_em.c8
-rw-r--r--sys/dev/gx/if_gx.c6
-rw-r--r--sys/dev/lge/if_lge.c4
-rw-r--r--sys/dev/mii/brgphy.c12
-rw-r--r--sys/dev/mii/e1000phy.c8
-rw-r--r--sys/dev/mii/nsgphy.c12
-rw-r--r--sys/dev/my/if_my.c18
-rw-r--r--sys/dev/nge/if_nge.c4
-rw-r--r--sys/dev/sk/if_sk.c2
-rw-r--r--sys/dev/ti/if_ti.c8
11 files changed, 43 insertions, 43 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index 53b4d49..d4440f8 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -541,7 +541,7 @@ bge_miibus_statchg(dev)
mii = device_get_softc(sc->bge_miibus);
BGE_CLRBIT(sc, BGE_MAC_MODE, BGE_MACMODE_PORTMODE);
- if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_TX) {
+ if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) {
BGE_SETBIT(sc, BGE_MAC_MODE, BGE_PORTMODE_GMII);
} else {
BGE_SETBIT(sc, BGE_MAC_MODE, BGE_PORTMODE_MII);
@@ -2102,7 +2102,7 @@ bge_tick(xsc)
if (!sc->bge_link && mii->mii_media_status & IFM_ACTIVE &&
IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
sc->bge_link++;
- if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_TX ||
+ if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T ||
IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX)
printf("bge%d: gigabit link up\n",
sc->bge_unit);
diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c
index e641037..018f669 100644
--- a/sys/dev/em/if_em.c
+++ b/sys/dev/em/if_em.c
@@ -1010,7 +1010,7 @@ em_media_status(struct ifnet *ifp, struct ifmediareq *ifmr)
ifmr->ifm_active |= IFM_100_TX;
break;
case 1000:
- ifmr->ifm_active |= IFM_1000_TX;
+ ifmr->ifm_active |= IFM_1000_T;
break;
}
if (adapter->link_duplex == FULL_DUPLEX)
@@ -1050,7 +1050,7 @@ em_media_change(struct ifnet *ifp)
}
break;
case IFM_1000_SX:
- case IFM_1000_TX:
+ case IFM_1000_T:
adapter->shared.autoneg = DO_AUTO_NEG;
adapter->shared.autoneg_advertised = ADVERTISE_1000_FULL;
break;
@@ -1297,9 +1297,9 @@ em_setup_interface(device_t dev, struct adapter * adapter)
ifmedia_add(&adapter->media, IFM_ETHER | IFM_100_TX, 0, NULL);
ifmedia_add(&adapter->media, IFM_ETHER | IFM_100_TX | IFM_FDX, 0,
NULL);
- ifmedia_add(&adapter->media, IFM_ETHER | IFM_1000_TX | IFM_FDX, 0,
+ ifmedia_add(&adapter->media, IFM_ETHER | IFM_1000_T | IFM_FDX, 0,
NULL);
- ifmedia_add(&adapter->media, IFM_ETHER | IFM_1000_TX, 0, NULL);
+ ifmedia_add(&adapter->media, IFM_ETHER | IFM_1000_T, 0, NULL);
}
ifmedia_add(&adapter->media, IFM_ETHER | IFM_AUTO, 0, NULL);
ifmedia_set(&adapter->media, IFM_ETHER | IFM_AUTO);
diff --git a/sys/dev/gx/if_gx.c b/sys/dev/gx/if_gx.c
index 0ac3b71..38f63ff 100644
--- a/sys/dev/gx/if_gx.c
+++ b/sys/dev/gx/if_gx.c
@@ -725,7 +725,7 @@ gx_ifmedia_upd(struct ifnet *ifp)
* 1000TX half duplex does not work.
*/
if (IFM_TYPE(ifm->ifm_media) == IFM_ETHER &&
- IFM_SUBTYPE(ifm->ifm_media) == IFM_1000_TX &&
+ IFM_SUBTYPE(ifm->ifm_media) == IFM_1000_T &&
(IFM_OPTIONS(ifm->ifm_media) & IFM_FDX) == 0)
return (EINVAL);
mii = device_get_softc(gx->gx_miibus);
@@ -759,8 +759,8 @@ gx_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
} else {
mii = device_get_softc(gx->gx_miibus);
mii_pollstat(mii);
- if ((mii->mii_media_active & (IFM_1000_TX | IFM_HDX)) ==
- (IFM_1000_TX | IFM_HDX))
+ if ((mii->mii_media_active & (IFM_1000_T | IFM_HDX)) ==
+ (IFM_1000_T | IFM_HDX))
mii->mii_media_active = IFM_ETHER | IFM_NONE;
ifmr->ifm_active = mii->mii_media_active;
ifmr->ifm_status = mii->mii_media_status;
diff --git a/sys/dev/lge/if_lge.c b/sys/dev/lge/if_lge.c
index b1ac426..44bd531 100644
--- a/sys/dev/lge/if_lge.c
+++ b/sys/dev/lge/if_lge.c
@@ -342,7 +342,7 @@ static void lge_miibus_statchg(dev)
LGE_CLRBIT(sc, LGE_GMIIMODE, LGE_GMIIMODE_SPEED);
switch (IFM_SUBTYPE(mii->mii_media_active)) {
- case IFM_1000_TX:
+ case IFM_1000_T:
case IFM_1000_SX:
LGE_SETBIT(sc, LGE_GMIIMODE, LGE_SPEED_1000);
break;
@@ -1121,7 +1121,7 @@ static void lge_tick(xsc)
IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
sc->lge_link++;
if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX||
- IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_TX)
+ IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T)
printf("lge%d: gigabit link up\n",
sc->lge_unit);
if (ifp->if_snd.ifq_head != NULL)
diff --git a/sys/dev/mii/brgphy.c b/sys/dev/mii/brgphy.c
index b9f5732..1554ff7 100644
--- a/sys/dev/mii/brgphy.c
+++ b/sys/dev/mii/brgphy.c
@@ -163,10 +163,10 @@ static int brgphy_attach(dev)
sc->mii_capabilities &= ~BMSR_ANEG;
device_printf(dev, " ");
mii_add_media(sc);
- ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_TX, 0, sc->mii_inst),
+ ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, 0, sc->mii_inst),
BRGPHY_BMCR_FDX);
PRINT(", 1000baseTX");
- ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_TX, IFM_FDX, sc->mii_inst), 0);
+ ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, IFM_FDX, sc->mii_inst), 0);
PRINT("1000baseTX-FDX");
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), 0);
PRINT("auto");
@@ -248,7 +248,7 @@ brgphy_service(sc, mii, cmd)
#endif
(void) brgphy_mii_phy_auto(sc, 1);
break;
- case IFM_1000_TX:
+ case IFM_1000_T:
speed = BRGPHY_S1000;
goto setit;
case IFM_100_TX:
@@ -265,7 +265,7 @@ setit:
}
PHY_WRITE(sc, BRGPHY_MII_ANAR, BRGPHY_SEL_TYPE);
- if (IFM_SUBTYPE(ife->ifm_media) != IFM_1000_TX)
+ if (IFM_SUBTYPE(ife->ifm_media) != IFM_1000_T)
break;
/*
@@ -374,10 +374,10 @@ brgphy_status(sc)
switch (PHY_READ(sc, BRGPHY_MII_AUXSTS) &
BRGPHY_AUXSTS_AN_RES) {
case BRGPHY_RES_1000FD:
- mii->mii_media_active |= IFM_1000_TX | IFM_FDX;
+ mii->mii_media_active |= IFM_1000_T | IFM_FDX;
break;
case BRGPHY_RES_1000HD:
- mii->mii_media_active |= IFM_1000_TX | IFM_HDX;
+ mii->mii_media_active |= IFM_1000_T | IFM_HDX;
break;
case BRGPHY_RES_100FD:
mii->mii_media_active |= IFM_100_TX | IFM_FDX;
diff --git a/sys/dev/mii/e1000phy.c b/sys/dev/mii/e1000phy.c
index 1f99cce..db97a85 100644
--- a/sys/dev/mii/e1000phy.c
+++ b/sys/dev/mii/e1000phy.c
@@ -146,9 +146,9 @@ e1000phy_attach(device_t dev)
* 1000BT-simplex not supported; driver must ignore this entry,
* but it must be present in order to manually set full-duplex.
*/
- ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_TX, 0, sc->mii_inst),
+ ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, 0, sc->mii_inst),
E1000_CR_SPEED_1000);
- ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_TX, IFM_FDX, sc->mii_inst),
+ ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, IFM_FDX, sc->mii_inst),
E1000_CR_SPEED_1000 | E1000_CR_FULL_DUPLEX);
printf("1000baseTX-FDX, ");
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), 0);
@@ -261,7 +261,7 @@ e1000phy_service(struct mii_softc *sc, struct mii_data *mii, int cmd)
(void)e1000phy_mii_phy_auto(sc, 1);
break;
- case IFM_1000_TX:
+ case IFM_1000_T:
if (sc->mii_flags & MIIF_DOINGAUTO)
return (0);
@@ -385,7 +385,7 @@ e1000phy_status(struct mii_softc *sc)
}
if (ssr & E1000_SSR_1000MBS)
- mii->mii_media_active |= IFM_1000_TX;
+ mii->mii_media_active |= IFM_1000_T;
else if (ssr & E1000_SSR_100MBS)
mii->mii_media_active |= IFM_100_TX;
else
diff --git a/sys/dev/mii/nsgphy.c b/sys/dev/mii/nsgphy.c
index 57ff861..2f4cad6 100644
--- a/sys/dev/mii/nsgphy.c
+++ b/sys/dev/mii/nsgphy.c
@@ -156,10 +156,10 @@ nsgphy_attach(device_t dev)
mii_phy_reset(sc);
device_printf(dev, " ");
- ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_TX, IFM_FDX, sc->mii_inst),
+ ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, IFM_FDX, sc->mii_inst),
BMCR_S1000|BMCR_FDX);
PRINT("1000baseTX-FDX");
- ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_TX, 0, sc->mii_inst),
+ ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, 0, sc->mii_inst),
BMCR_S1000);
PRINT("1000baseTX");
sc->mii_capabilities =
@@ -245,7 +245,7 @@ nsgphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd)
#endif
(void) nsgphy_mii_phy_auto(sc, 0);
break;
- case IFM_1000_TX:
+ case IFM_1000_T:
if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) {
PHY_WRITE(sc, MII_BMCR,
BMCR_FDX|BMCR_SPEED1);
@@ -373,9 +373,9 @@ nsgphy_status(struct mii_softc *sc)
anlpar = PHY_READ(sc, MII_ANLPAR);
gstat = PHY_READ(sc, MII_100T2SR);
if (gstat & GTSR_LP_1000TFDX)
- mii->mii_media_active |= IFM_1000_TX|IFM_FDX;
+ mii->mii_media_active |= IFM_1000_T|IFM_FDX;
else if (gstat & GTSR_LP_1000THDX)
- mii->mii_media_active |= IFM_1000_TX|IFM_HDX;
+ mii->mii_media_active |= IFM_1000_T|IFM_HDX;
else if (anlpar & ANLPAR_T4)
mii->mii_media_active |= IFM_100_T4;
else if (anlpar & ANLPAR_TX_FD)
@@ -393,7 +393,7 @@ nsgphy_status(struct mii_softc *sc)
switch(bmcr & (BMCR_SPEED1|BMCR_SPEED0)) {
case BMCR_S1000:
- mii->mii_media_active |= IFM_1000_TX;
+ mii->mii_media_active |= IFM_1000_T;
break;
case BMCR_S100:
mii->mii_media_active |= IFM_100_TX;
diff --git a/sys/dev/my/if_my.c b/sys/dev/my/if_my.c
index 275e824..c8484a4 100644
--- a/sys/dev/my/if_my.c
+++ b/sys/dev/my/if_my.c
@@ -516,7 +516,7 @@ my_autoneg_mii(struct my_softc * sc, int flag, int verbose)
/*
* this version did not support 1000M,
* ifm->ifm_media =
- * IFM_ETHER|IFM_1000_TX|IFM_FDX;
+ * IFM_ETHER|IFM_1000_T|IFM_FDX;
*/
ifm->ifm_media =
IFM_ETHER | IFM_100_TX | IFM_FDX;
@@ -529,7 +529,7 @@ my_autoneg_mii(struct my_softc * sc, int flag, int verbose)
ability = 0;
/*
* this version did not support 1000M,
- * ifm->ifm_media = IFM_ETHER|IFM_1000_TX;
+ * ifm->ifm_media = IFM_ETHER|IFM_1000_T;
*/
ifm->ifm_media = IFM_ETHER | IFM_100_TX;
media &= ~PHY_BMCR_SPEEDSEL;
@@ -663,16 +663,16 @@ my_getmode_mii(struct my_softc * sc)
sc->my_unit);
ifp->if_baudrate = 1000000000;
- ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_1000_TX, 0, NULL);
- ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_1000_TX | IFM_HDX,
+ ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_1000_T, 0, NULL);
+ ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_1000_T | IFM_HDX,
0, NULL);
if (bootverbose)
printf("my%d: 1000Mbps full-duplex mode supported\n",
sc->my_unit);
ifp->if_baudrate = 1000000000;
- ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_1000_TX | IFM_FDX,
+ ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_1000_T | IFM_FDX,
0, NULL);
- sc->ifmedia.ifm_media = IFM_ETHER | IFM_1000_TX | IFM_FDX;
+ sc->ifmedia.ifm_media = IFM_ETHER | IFM_1000_T | IFM_FDX;
}
#endif
if (bmsr & PHY_BMSR_CANAUTONEG) {
@@ -712,7 +712,7 @@ my_setmode_mii(struct my_softc * sc, int media)
PHY_BMCR_DUPLEX | PHY_BMCR_LOOPBK);
#if 0 /* this version did not support 1000M, */
- if (IFM_SUBTYPE(media) == IFM_1000_TX) {
+ if (IFM_SUBTYPE(media) == IFM_1000_T) {
printf("1000Mbps/T4, half-duplex\n");
bmcr &= ~PHY_BMCR_SPEEDSEL;
bmcr &= ~PHY_BMCR_DUPLEX;
@@ -1721,11 +1721,11 @@ my_ifmedia_sts(struct ifnet * ifp, struct ifmediareq * ifmr)
if (ability2 & PHY_1000SR_1000BTXFULL) {
advert = 0;
ability = 0;
- ifmr->ifm_active = IFM_ETHER|IFM_1000_TX|IFM_FDX;
+ ifmr->ifm_active = IFM_ETHER|IFM_1000_T|IFM_FDX;
} else if (ability & PHY_1000SR_1000BTXHALF) {
advert = 0;
ability = 0;
- ifmr->ifm_active = IFM_ETHER|IFM_1000_TX|IFM_HDX;
+ ifmr->ifm_active = IFM_ETHER|IFM_1000_T|IFM_HDX;
}
}
#endif
diff --git a/sys/dev/nge/if_nge.c b/sys/dev/nge/if_nge.c
index 77b0034..53bd1f0 100644
--- a/sys/dev/nge/if_nge.c
+++ b/sys/dev/nge/if_nge.c
@@ -627,7 +627,7 @@ static void nge_miibus_statchg(dev)
}
/* If we have a 1000Mbps link, set the mode_1000 bit. */
- if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_TX ||
+ if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T ||
IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX) {
NGE_SETBIT(sc, NGE_CFG, NGE_CFG_MODE_1000);
} else {
@@ -1429,7 +1429,7 @@ static void nge_tick(xsc)
if (mii->mii_media_status & IFM_ACTIVE &&
IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
sc->nge_link++;
- if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_TX)
+ if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T)
printf("nge%d: gigabit link up\n",
sc->nge_unit);
if (ifp->if_snd.ifq_head != NULL)
diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c
index 3a6cb4f..0b0a30c 100644
--- a/sys/dev/sk/if_sk.c
+++ b/sys/dev/sk/if_sk.c
@@ -1316,7 +1316,7 @@ static int sk_attach(dev)
sc->sk_pmd = IFM_1000_CX;
break;
case SK_PMD_1000BASETX:
- sc->sk_pmd = IFM_1000_TX;
+ sc->sk_pmd = IFM_1000_T;
break;
default:
printf("skc%d: unknown media type: 0x%x\n",
diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c
index 17f5a00..dac0fb3 100644
--- a/sys/dev/ti/if_ti.c
+++ b/sys/dev/ti/if_ti.c
@@ -1643,9 +1643,9 @@ static int ti_attach(dev)
ifmedia_add(&sc->ifmedia, IFM_ETHER|IFM_100_TX, 0, NULL);
ifmedia_add(&sc->ifmedia,
IFM_ETHER|IFM_100_TX|IFM_FDX, 0, NULL);
- ifmedia_add(&sc->ifmedia, IFM_ETHER|IFM_1000_TX, 0, NULL);
+ ifmedia_add(&sc->ifmedia, IFM_ETHER|IFM_1000_T, 0, NULL);
ifmedia_add(&sc->ifmedia,
- IFM_ETHER|IFM_1000_TX|IFM_FDX, 0, NULL);
+ IFM_ETHER|IFM_1000_T|IFM_FDX, 0, NULL);
} else {
/* Fiber cards don't support 10/100 modes. */
ifmedia_add(&sc->ifmedia, IFM_ETHER|IFM_1000_SX, 0, NULL);
@@ -2230,7 +2230,7 @@ static int ti_ifmedia_upd(ifp)
TI_CMD_CODE_NEGOTIATE_BOTH, 0);
break;
case IFM_1000_SX:
- case IFM_1000_TX:
+ case IFM_1000_T:
CSR_WRITE_4(sc, TI_GCR_GLINK, TI_GLNK_PREF|TI_GLNK_1000MB|
TI_GLNK_RX_FLOWCTL_Y|TI_GLNK_ENB);
CSR_WRITE_4(sc, TI_GCR_LINK, 0);
@@ -2288,7 +2288,7 @@ static void ti_ifmedia_sts(ifp, ifmr)
if (sc->ti_linkstat == TI_EV_CODE_GIG_LINK_UP) {
media = CSR_READ_4(sc, TI_GCR_GLINK_STAT);
if (sc->ti_copper)
- ifmr->ifm_active |= IFM_1000_TX;
+ ifmr->ifm_active |= IFM_1000_T;
else
ifmr->ifm_active |= IFM_1000_SX;
if (media & TI_GLNK_FULL_DUPLEX)
OpenPOWER on IntegriCloud