rtl8169: add support for RTL8101E family

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.
This commit is contained in:
David van Moolenbroek 2013-02-13 23:57:28 +01:00
parent d6be9725c9
commit 91cea699bb
4 changed files with 17 additions and 4 deletions

View 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" },

View 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);

View 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;

View file

@ -114,6 +114,7 @@
#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 */