Subject: kern/33761: NetBSD doesn't recognize a RealTek 8168B nic
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <dieter.NetBSD@pandora.be>
List: netbsd-bugs
Date: 06/18/2006 18:45:00
>Number: 33761
>Category: kern
>Synopsis: NetBSD doesn't recognize a RealTek 8168B nic
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jun 18 18:45:00 +0000 2006
>Originator: dieter roelants
>Release: NetBSD 3.99.21
>Organization:
>Environment:
System: NetBSD simult.amelgem.be 3.99.21 NetBSD 3.99.21 (GENERIC.MPACPI) #2: Sun Jun 18 17:49:44 UTC 2006 dieter@simult.amelgem.be:/build/obj.current.i386/sys/arch/i386/compile/GENERIC.MPACPI i386
Architecture: i386
Machine: i386
>Description:
My asus P5LD2 SE motherboard has a realtek 8168B network
chip onboard. It isn't in pcidevs and hence not recognized.
Note: just adding the device information to pcidevs doesn't
make the nic work, but I'll send a separate PR for that.
>How-To-Repeat:
buy an asus P5LD2 SE or other motherboard with this nic :)
>Fix:
(From FreeBSD)
Index: pcidevs
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/pcidevs,v
retrieving revision 1.796
diff -u -r1.796 pcidevs
--- pcidevs 18 Jun 2006 10:33:12 -0000 1.796
+++ pcidevs 18 Jun 2006 16:12:15 -0000
@@ -2768,6 +2768,7 @@
product REALTEK RT8138 0x8138 8138 10/100 Ethernet
product REALTEK RT8139B 0x8138 8139B 10/100 Ethernet
product REALTEK RT8139 0x8139 8139 10/100 Ethernet
+product REALTEK RT8168 0x8168 8168 10/100/1000 Ethernet
product REALTEK RT8169 0x8169 8169 10/100/1000 Ethernet
product REALTEK RT8180 0x8180 8180 802.11b
Index: if_re_pci.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_re_pci.c,v
retrieving revision 1.12
diff -u -r1.12 if_re_pci.c
--- if_re_pci.c 25 Dec 2005 19:55:41 -0000 1.12
+++ if_re_pci.c 18 Jun 2006 16:12:26 -0000
@@ -102,6 +102,8 @@
static const struct rtk_type re_devs[] = {
{ PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RT8139, RTK_HWREV_8139CPLUS,
"RealTek 8139C+ 10/100BaseTX" },
+ { PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RT8168, RTK_HWREV_8168,
+ "RealTek 8168B/8111B Gigabit Ethernet" },
{ PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RT8169, RTK_HWREV_8169,
"RealTek 8169 Gigabit Ethernet" },
{ PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RT8169, RTK_HWREV_8169S,
@@ -130,6 +132,7 @@
{ RTK_HWREV_8139C, RTK_8139, "C" },
{ RTK_HWREV_8139D, RTK_8139, "8139D/8100B/8100C" },
{ RTK_HWREV_8139CPLUS, RTK_8139CPLUS, "C+"},
+ { RTK_HWREV_8168, RTK_8169, "8168B/8111B"},
{ RTK_HWREV_8169, RTK_8169, "8169"},
{ RTK_HWREV_8169S, RTK_8169, "8169S"},
{ RTK_HWREV_8169SB, RTK_8169, "8169SB"},
Index: rtl81x9reg.h
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/rtl81x9reg.h,v
retrieving revision 1.14
diff -u -r1.14 rtl81x9reg.h
--- rtl81x9reg.h 25 Dec 2005 19:55:40 -0000 1.14
+++ rtl81x9reg.h 18 Jun 2006 16:13:32 -0000
@@ -160,6 +160,7 @@
#define RTK_HWREV_8139CPLUS 0x74800000
#define RTK_HWREV_8101 0x74c00000
#define RTK_HWREV_8100 0x78800000
+#define RTK_HWREV_8168 0x30000000
#define RTK_TXDMA_16BYTES 0x00000000
#define RTK_TXDMA_32BYTES 0x00000100