Please test the following diff with any re(4) adapters.
This is an adaption of some code from FreeBSD to help with
identification of certain chipsets. Just make sure the
driver still attaches Ok. There should be no change
with the dmesg info printed. Let me know if there is.

Please provide me with a dmesg.


Index: re.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/re.c,v
retrieving revision 1.117
diff -u -p -r1.117 re.c
--- re.c        17 Feb 2010 22:16:34 -0000      1.117
+++ re.c        3 Apr 2010 22:27:49 -0000
@@ -804,10 +804,28 @@ re_attach(struct rl_softc *sc, const cha
        struct ifnet    *ifp;
        u_int16_t       re_did = 0;
        int             error = 0, i;
+       u_int32_t       hwrev;
        const struct re_revision *rr;
        const char      *re_name = NULL;
 
-       sc->sc_hwrev = CSR_READ_4(sc, RL_TXCFG) & RL_TXCFG_HWREV;
+       hwrev = CSR_READ_4(sc, RL_TXCFG);
+
+       DPRINTF((" Chip rev. "));
+
+       switch (hwrev & 0x70000000) {
+       case 0x00000000:
+       case 0x10000000:
+               DPRINTF(("0x%08x", hwrev & 0xfc800000));
+               hwrev &= (RL_TXCFG_HWREV | 0x80000000);
+               break;
+       default:
+               DPRINTF(("0x%08x", hwrev & 0x7c800000));
+               hwrev &= RL_TXCFG_HWREV;
+       }
+
+       DPRINTF((" MAC rev. 0x%08x", hwrev & 0x00700000));
+
+       sc->sc_hwrev = hwrev;
 
        switch (sc->sc_hwrev) {
        case RL_HWREV_8139CPLUS:
Index: rtl81x9reg.h
===================================================================
RCS file: /cvs/src/sys/dev/ic/rtl81x9reg.h,v
retrieving revision 1.67
diff -u -p -r1.67 rtl81x9reg.h
--- rtl81x9reg.h        10 Aug 2009 20:29:54 -0000      1.67
+++ rtl81x9reg.h        3 Apr 2010 20:23:26 -0000
@@ -151,7 +151,7 @@
 #define RL_TXCFG_LOOPBKTST     0x00060000      /* loopback test */
 #define RL_TXCFG_IFG2          0x00080000      /* 8169 only */
 #define RL_TXCFG_IFG           0x03000000      /* interframe gap */
-#define RL_TXCFG_HWREV         0x7C800000
+#define RL_TXCFG_HWREV         0x7CC00000
 
 #define RL_LOOPTEST_OFF                0x00000000
 #define RL_LOOPTEST_ON         0x00020000

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply via email to