Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/mii match Realtek RTL8251.



details:   https://anonhg.NetBSD.org/src/rev/c3ba0a17838a
branches:  trunk
changeset: 333578:c3ba0a17838a
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Sun Nov 09 17:54:45 2014 +0000

description:
match Realtek RTL8251.

diffstat:

 sys/dev/mii/rgephy.c |  13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diffs (48 lines):

diff -r 9578d332ef87 -r c3ba0a17838a sys/dev/mii/rgephy.c
--- a/sys/dev/mii/rgephy.c      Sun Nov 09 17:54:02 2014 +0000
+++ b/sys/dev/mii/rgephy.c      Sun Nov 09 17:54:45 2014 +0000
@@ -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 @@
        { 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 @@
 {
        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 @@
        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) */



Home | Main Index | Thread Index | Old Index