diff options
author | yongari <yongari@FreeBSD.org> | 2013-11-04 05:52:33 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2013-11-04 05:52:33 +0000 |
commit | 2d1cef2d8318a9a31c0c1a73707ecf3f043568e1 (patch) | |
tree | 44682d81d502578ddcc0f169a43b8c1269cfc7c0 /sys/dev/mii/rgephy.c | |
parent | 821219af32e4fc45dac87d189de5f22e6524199d (diff) | |
download | FreeBSD-src-2d1cef2d8318a9a31c0c1a73707ecf3f043568e1.zip FreeBSD-src-2d1cef2d8318a9a31c0c1a73707ecf3f043568e1.tar.gz |
MFC r257304:
Add support for new Gigabit PHY of RealTek.
I don't have a copy of data sheet so I'm not sure exact PHY model
name. Vendor's web page indicates RTL8251 is latest PHY so I used
the name. This PHY is used with RTL8168G, RTL8168GU and RTL8411B.
Approved by: re (delphij)
Diffstat (limited to 'sys/dev/mii/rgephy.c')
-rw-r--r-- | sys/dev/mii/rgephy.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/mii/rgephy.c b/sys/dev/mii/rgephy.c index aa919f5..8345f1f 100644 --- a/sys/dev/mii/rgephy.c +++ b/sys/dev/mii/rgephy.c @@ -90,6 +90,7 @@ static void rgephy_load_dspcode(struct mii_softc *); static const struct mii_phydesc rgephys[] = { MII_PHY_DESC(REALTEK, RTL8169S), + MII_PHY_DESC(REALTEK, RTL8251), MII_PHY_END }; @@ -406,7 +407,8 @@ rgephy_loop(struct mii_softc *sc) { int i; - if (sc->mii_mpd_rev < 2) { + if (sc->mii_mpd_model != MII_MODEL_REALTEK_RTL8251 && + sc->mii_mpd_rev < 2) { PHY_WRITE(sc, RGEPHY_MII_BMCR, RGEPHY_BMCR_PDOWN); DELAY(1000); } @@ -439,7 +441,8 @@ rgephy_load_dspcode(struct mii_softc *sc) { int val; - if (sc->mii_mpd_rev >= 2) + if (sc->mii_mpd_model == MII_MODEL_REALTEK_RTL8251 || + sc->mii_mpd_rev >= 2) return; PHY_WRITE(sc, 31, 0x0001); |