]> Zhao Yanbai Git Server - minix.git/commitdiff
rtl8169: add support for RTL8101E family
authorDavid van Moolenbroek <david@minix3.org>
Wed, 13 Feb 2013 22:57:28 +0000 (23:57 +0100)
committerDavid van Moolenbroek <david@minix3.org>
Fri, 15 Feb 2013 10:05:35 +0000 (11:05 +0100)
All cards in this family (RTL8101E, RTL8102E, RTL8103E, RTL8105E,
possibly others) should be recognized based on the added PCI ID.
The hardware version number of the RTL8105E has been added only to
serve as an example of a card that does not require modification of
certain undocumented registers.

drivers/pci/pci_table.c
drivers/rtl8169/rtl8169.c
drivers/rtl8169/rtl8169.conf
drivers/rtl8169/rtl8169.h

index f53a9e0b25e3acd71759111516199e15f52d63f6..e468f2948c4619d2e0af87307e3862c157aae10e 100644 (file)
@@ -92,6 +92,7 @@ struct pci_device pci_device_table[]=
        { 0x10DE, 0x0110, "nVidia GeForce2 MX [NV11]" },
        { 0x10EC, 0x8029, "Realtek RTL8029" },
        { 0x10EC, 0x8129, "Realtek RTL8129" },
+       { 0x10EC, 0x8136, "Realtek RTL8101E Family" },
        { 0x10EC, 0x8139, "Realtek RTL8139" },
        { 0x10EC, 0x8167, "Realtek RTL8169/8110 Family Gigabit NIC" },
        { 0x10EC, 0x8169, "Realtek RTL8169" },
index 6a3490205895623e56e43189355294c3bbcde8eb..587514ecdb31b3ddff720dd605d03aa8df9753d8 100644 (file)
@@ -980,6 +980,9 @@ re_t *rep;
                printf("Set MAC Reg C+CR Offset 0x82h = 0x01h\n");
                rl_outw(port, 0x82, 0x01);
                break;
+       case RL_TCR_HWVER_RTL8105E:
+               rep->re_model = "RTL8105E";
+               break;
        default:
                rep->re_model = "Unknown";
                rep->re_mac = t;
@@ -1012,14 +1015,21 @@ re_t *rep;
 
        rl_outw(port, RL_9346CR, RL_9346CR_EEM_CONFIG); /* Unlock */
 
-       t = rl_inw(port, RL_CPLUSCMD);
-       if ((rep->re_mac == RL_TCR_HWVER_RTL8169S) ||
-           (rep->re_mac == RL_TCR_HWVER_RTL8110S)) {
+       switch (rep->re_mac) {
+       case RL_TCR_HWVER_RTL8169S:
+       case RL_TCR_HWVER_RTL8110S:
                printf("Set MAC Reg C+CR Offset 0xE0. "
                        "Bit-3 and bit-14 MUST be 1\n");
+               t = rl_inw(port, RL_CPLUSCMD);
                rl_outw(port, RL_CPLUSCMD, t | RL_CPLUS_MULRW | (1 << 14));
-       } else
+               break;
+       case RL_TCR_HWVER_RTL8169:
+       case RL_TCR_HWVER_RTL8169SB:
+       case RL_TCR_HWVER_RTL8110SCd:
+               t = rl_inw(port, RL_CPLUSCMD);
                rl_outw(port, RL_CPLUSCMD, t | RL_CPLUS_MULRW);
+               break;
+       }
 
        rl_outw(port, RL_INTRMITIGATE, 0x00);
 
index b97a6427820f263a5eb2cdea7b04c50fe2740388..79a21dc4b8f7af0b6034a9f34061fd6e8656e085 100644 (file)
@@ -9,6 +9,7 @@ service rtl8169
                 DEVIO           # 21
         ;
         pci device      10ec/8129;
+        pci device      10ec/8136;
         pci device      10ec/8167;
         pci device      10ec/8169;
         pci device      10ec/8168;
index d806c589a9d5509c667960dd52eb00c550ef121c..19f4dc0efd2157830bd974715fef09d026de8e90 100644 (file)
 #define                        RL_TCR_HWVER_RTL8110S   0x04000000 /* RTL8110S */
 #define                        RL_TCR_HWVER_RTL8169SB  0x10000000 /* RTL8169sb/8110sb */
 #define                        RL_TCR_HWVER_RTL8110SCd 0x18000000 /* RTL8169sc/8110sc */
+#define                        RL_TCR_HWVER_RTL8105E   0x40800000 /* RTL8105E */
 #define                RL_TCR_RES1     0x00380000 /* Reserved */
 #define                RL_TCR_LBK_M    0x00060000 /* Loopback Test */
 #define                        RL_TCR_LBK_NORMAL       0x00000000 /* Normal */