re(4): Add 8168DP support
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 27 May 2011 08:18:07 +0000 (16:18 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 27 May 2011 08:56:14 +0000 (16:56 +0800)
sys/dev/netif/re/if_re.c
sys/dev/netif/re/if_rereg.h
sys/dev/netif/re/if_revar.h

index e53867d..8c19d7c 100644 (file)
@@ -241,6 +241,10 @@ static const struct re_hwrev re_hwrevs[] = {
          RE_C_HWIM | RE_C_HWCSUM | RE_C_MAC2 | RE_C_PHYPMGT |
          RE_C_AUTOPAD | RE_C_CONTIGRX | RE_C_STOP_RXTX },
 
+       { RE_HWREV_8168DP,      RE_MACVER_2D,           RE_MTU_9K,
+         RE_C_HWIM | RE_C_HWCSUM | RE_C_MAC2 | RE_C_PHYPMGT |
+         RE_C_AUTOPAD | RE_C_CONTIGRX | RE_C_STOP_RXTX },
+
        { RE_HWREV_8168E,       RE_MACVER_UNKN,         RE_MTU_9K,
          RE_C_HWIM | RE_C_HWCSUM | RE_C_MAC2 | RE_C_PHYPMGT |
          RE_C_AUTOPAD | RE_C_CONTIGRX | RE_C_STOP_RXTX },
@@ -1019,6 +1023,12 @@ re_probe(device_t dev)
                                else if (macmode == 0x100000)
                                        sc->re_macver = RE_MACVER_28;
                                break;
+                       case RE_HWREV_8168DP:
+                               if (macmode == 0)
+                                       sc->re_macver = RE_MACVER_2B;
+                               else if (macmode == 0x200000)
+                                       sc->re_macver = RE_MACVER_2C;
+                               break;
                        case RE_HWREV_8168E:
                                if (macmode == 0x100000)
                                        sc->re_macver = RE_MACVER_2E;
index 999cf15..75c27fb 100644 (file)
 #define RE_HWREV_8169SC1       0x18000000
 #define RE_HWREV_8102EL                0x24800000
 #define RE_HWREV_8168D         0x28000000
+#define RE_HWREV_8168DP                0x28800000
 #define RE_HWREV_8168E         0x2C000000
 #define RE_HWREV_8168B1                0x30000000
 #define RE_HWREV_8100E         0x30800000
index 1287b72..5827166 100644 (file)
@@ -105,6 +105,8 @@ struct re_hwrev {
 #define RE_MACVER_29           0x29
 #define RE_MACVER_2A           0x2a
 #define RE_MACVER_2B           0x2b
+#define RE_MACVER_2C           0x2c
+#define RE_MACVER_2D           0x2d
 #define RE_MACVER_2E           0x2e
 #define RE_MACVER_2F           0x2f