Port-i386 archive

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

a kludge for RTL8111C



This patch is a black art but significantly reduce seeing
"ifmedia_set: no match for 0x20/0xfffffff".
I tested on RTL8111C of GA-EG31MF-S2, GA-G31M-S2L, and P5Q-EM,
but not tested on RTL8169/8169S/8110S/8110SB/8111SC.
This patch is derived from FreeBSD's if_re.c.

Can anyone test this patch?


Index: sys/dev/ic/rtl8169.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/rtl8169.c,v
retrieving revision 1.107
diff -u -r1.107 rtl8169.c
--- sys/dev/ic/rtl8169.c        3 Jan 2009 03:43:22 -0000       1.107
+++ sys/dev/ic/rtl8169.c        7 Feb 2009 13:24:45 -0000
@@ -392,7 +392,8 @@
         * NB: Realtek-supplied Linux driver does this only for
         * MCFG_METHOD_2, which corresponds to sc->sc_rev == 3.
         */
-       if (1) /* XXX check softc flag for 8169s version */
+       if (sc->sc_rev == 1 || sc->sc_rev == 3 || sc->sc_rev == 4
+           || sc->sc_rev == 5)
                CSR_WRITE_1(sc, RTK_LDPS, 1);
 
 }
@@ -627,6 +628,10 @@
                sc->re_ldata.re_tx_desc_cnt = RE_TX_DESC_CNT_8139;
        }
 
+       if (sc->sc_rev == 1 || sc->sc_rev == 3 || sc->sc_rev == 4
+           || sc->sc_rev == 5)
+               CSR_WRITE_1(sc, RTK_LDPS, 1);
+
        if (sc->sc_rev == 24 || sc->sc_rev == 25) {
                /*
                 * Get station address from ID registers.


-- 
<tkhr.hash%gmail.com@localhost>



Home | Main Index | Thread Index | Old Index