Module Name: src
Committed By: martin
Date: Sat Jan 17 13:50:57 UTC 2015
Modified Files:
src/sys/dev/mii [netbsd-7]: rgephy.c
Log Message:
Pull up following revision(s) (requested by nonaka in ticket #434):
sys/dev/mii/rgephy.c: revision 1.36, 1.37
Add support for Realtek RTL8251.
To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.35.4.1 src/sys/dev/mii/rgephy.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/mii/rgephy.c
diff -u src/sys/dev/mii/rgephy.c:1.35 src/sys/dev/mii/rgephy.c:1.35.4.1
--- src/sys/dev/mii/rgephy.c:1.35 Tue Dec 17 16:00:23 2013
+++ src/sys/dev/mii/rgephy.c Sat Jan 17 13:50:57 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: rgephy.c,v 1.35 2013/12/17 16:00:23 martin Exp $ */
+/* $NetBSD: rgephy.c,v 1.35.4.1 2015/01/17 13:50:57 martin Exp $ */
/*
* Copyright (c) 2003
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.35 2013/12/17 16:00:23 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.35.4.1 2015/01/17 13:50:57 martin Exp $");
/*
@@ -87,6 +87,9 @@ static const struct mii_phydesc rgephys[
{ MII_OUI_REALTEK, MII_MODEL_REALTEK_RTL8169S,
MII_STR_REALTEK_RTL8169S },
+ { MII_OUI_REALTEK, MII_MODEL_REALTEK_RTL8251,
+ MII_STR_REALTEK_RTL8251 },
+
{ 0, 0,
NULL }
};
@@ -453,7 +456,8 @@ rgephy_loop(struct mii_softc *sc)
uint32_t bmsr;
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, MII_BMCR, BMCR_PDOWN);
DELAY(1000);
}
@@ -487,7 +491,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;
#if 1
@@ -587,7 +592,8 @@ rgephy_reset(struct mii_softc *sc)
mii_phy_reset(sc);
DELAY(1000);
- if (sc->mii_mpd_rev < 2) {
+ if (sc->mii_mpd_model != MII_MODEL_REALTEK_RTL8251 &&
+ sc->mii_mpd_rev < 2) {
rgephy_load_dspcode(sc);
} else if (sc->mii_mpd_rev == 3) {
/* RTL8211C(L) */