diff options
| author | msaitoh <msaitoh@NetBSD.org> | 2014-06-12 12:09:47 +0000 |
|---|---|---|
| committer | msaitoh <msaitoh@NetBSD.org> | 2014-06-12 12:09:47 +0000 |
| commit | cb7341ae45aed53fcda9d7e5cfa75c0f70ef774b (patch) | |
| tree | 5a460de1c464e33a9bee1c281808f7e039274601 /sys/dev/mii/brgphy.c | |
| parent | 32d0ef9bc9f4c34817d0281750fe16977e9471f0 (diff) | |
No functional change:
- Remove BRGPHY_SERDES_ANAR_* and BRGPHY_SERDES_ANLPAR_*. Those registers
are the same as MII_ANAR_* and MII_ANLPAR_*.
- Fix typo.
- Remove trailing white spaces.
- KNF.
Diffstat (limited to 'sys/dev/mii/brgphy.c')
| -rw-r--r-- | sys/dev/mii/brgphy.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/dev/mii/brgphy.c b/sys/dev/mii/brgphy.c index 53ed5a2a30d..7867e73e19a 100644 --- a/sys/dev/mii/brgphy.c +++ b/sys/dev/mii/brgphy.c @@ -1,4 +1,4 @@ -/* $NetBSD: brgphy.c,v 1.68 2013/10/31 04:26:40 msaitoh Exp $ */ +/* $NetBSD: brgphy.c,v 1.69 2014/06/12 12:09:47 msaitoh Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.68 2013/10/31 04:26:40 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.69 2014/06/12 12:09:47 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -376,9 +376,8 @@ setit: if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) { speed |= BMCR_FDX; gig = GTCR_ADV_1000TFDX; - } else { + } else gig = GTCR_ADV_1000THDX; - } PHY_WRITE(sc, MII_100T2CR, 0); PHY_WRITE(sc, MII_ANAR, ANAR_CSMA); @@ -635,7 +634,7 @@ brgphy_mii_phy_auto(struct mii_softc *sc) if (sc->mii_flags & MIIF_HAVEFIBER) { anar = ANAR_X_FD | ANAR_X_HD; if (sc->mii_flags & MIIF_DOPAUSE) - anar |= BRGPHY_SERDES_ANAR_BOTH_PAUSE; + anar |= ANAR_X_PAUSE_TOWARDS; } else { anar = BMSR_MEDIA_TO_ANAR(sc->mii_capabilities) | ANAR_CSMA; if (sc->mii_flags & MIIF_DOPAUSE) @@ -645,8 +644,7 @@ brgphy_mii_phy_auto(struct mii_softc *sc) DELAY(1000); /* Start autonegotiation */ - PHY_WRITE(sc, MII_BMCR, - BMCR_AUTOEN | BMCR_STARTNEG); + PHY_WRITE(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG); PHY_WRITE(sc, BRGPHY_MII_IMR, 0xFF00); return (EJUSTRETURN); |
