Module Name: src
Committed By: nonaka
Date: Sun Nov 9 17:54:45 UTC 2014
Modified Files:
src/sys/dev/mii: rgephy.c
Log Message:
match Realtek RTL8251.
To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 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.36
--- src/sys/dev/mii/rgephy.c:1.35 Tue Dec 17 16:00:23 2013
+++ src/sys/dev/mii/rgephy.c Sun Nov 9 17:54:45 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: rgephy.c,v 1.35 2013/12/17 16:00:23 martin Exp $ */
+/* $NetBSD: rgephy.c,v 1.36 2014/11/09 17:54:45 nonaka 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.36 2014/11/09 17:54:45 nonaka 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 }
};
@@ -487,7 +490,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 +591,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) */