Possible bug in realtek 8169 ethernet driver
Subsystems (2)
Hello,
On my system running linux kernel 2.6.21.5, I can't get my ethernet card to work. When loading the r8169 module, it will claim to be detected as eth0, but it will show up as eth2 in ifconfig. There are no eth0 or eth1 devices though. It doesn't work as eth2 either.
The router attached to it indicates a 100mbit link. But that's about it. I cannot get any data over it. I can manually configure it to have an IP address and netmask, but it won't see anything on the local net. DHCP doesn't work either. Nothing out of the ordinary is logged in dmesg or anywhere else. An usb ethernet dongle on the system works just fine, ruling out (absent anyway) firewall or similar trouble. The device works well in windows XP.
Relevant system specs:
-Gigabyte GA-G33m-DS2R motherboard, with the integrated realtec nic -intel c2d CPU
I've included output of several programs below, hope this helps.
Please CC: to my email address, as I have not subscribed myself to the kernel list.
dmesg output:
r8169 Gigabit Ethernet driver 2.2LK loaded
ACPI: PCI Interrupt 0000:04:00.0[A] -> GSI 17 (level, low) -> IRQ 18
PCI: Setting latency timer of device 0000:04:00.0 to 64
eth0: RTL8168b/8111b at 0xf8854000, 00:1a:4d:44:a1:1f, IRQ 18
...
r8169: eth2: link up
r8169: eth2: link up
ifconfig output:
eth2 Link encap:Ethernet HWaddr 00:1A:4D:44:A1:1F
inet addr:192.168.3.10 Bcast:192.168.3.255 Mask:255.255.255.0
inet6 addr: 2001:610:1108:5203::2/64 Scope:Global
inet6 addr: 2001:610:1108:5203:21a:4dff:fe44:a11f/64 Scope:Global
inet6 addr: fe80::21a:4dff:fe44:a11f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:296529 errors:0 dropped:0 overruns:0 frame:0
TX packets:221678 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:438053177 (417.7 MiB) TX bytes:14156999 (13.5 MiB)
Interrupt:18 Base address:0x4000 lspci output:
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
Subsystem: Giga-byte Technology Unknown device e000
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0, Cache Line Size: 32 bytes
Interrupt: pin A routed to IRQ 18
Region 0: I/O ports at c000 [size=256]
Region 2: Memory at ec000000 (64-bit, non-prefetchable) [size=4K]
[virtual] Expansion ROM at ed200000 [disabled] [size=64K]
Capabilities: [40] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0-,D1+,D2+,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [48] Vital Product Data
Capabilities: [50] Message Signalled Interrupts: Mask- 64bit+ Queue=0/1 Enable-
Address: 0000000000000000 Data: 0000
Capabilities: [60] Express Endpoint IRQ 0
Device: Supported: MaxPayload 1024 bytes, PhantFunc 0, ExtTag+
Device: Latency L0s unlimited, L1 unlimited
Device: AtnBtn+ AtnInd+ PwrInd+
Device: Errors: Correctable- Non-Fatal- Fatal- Unsupported-
Device: RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
Device: MaxPayload 128 bytes, MaxReadReq 512 bytes
Link: Supported Speed 2.5Gb/s, Width x1, ASPM L0s, Port 0
Link: Latency L0s unlimited, L1 unlimited
Link: ASPM Disabled RCB 64 bytes CommClk- ExtSynch-
Link: Speed 2.5Gb/s, Width x1
Capabilities: [84] Vendor Specific Information
Capabilities: [100] Advanced Error Reporting
Capabilities: [12c] Virtual Channel
Capabilities: [148] Device Serial Number 68-81-ec-10-00-00-00-25
Capabilities: [154] Power Budgeting
Best regards,
Bram
Bram <[email protected]> :
[...]
Quoted 7 lines
The router attached to it indicates a 100mbit link. But that's about it. I cannot get any data over it. I can manually configure it to have an IP address and netmask, but it won't see anything on the local net. DHCP doesn't work either. Nothing out of the ordinary is logged in dmesg or anywhere else. An usb ethernet dongle on the system works just fine, ruling out (absent anyway) firewall or similar trouble. The device works well in windows XP.
Please try the patch below on top of 2.6.23-rc2 ?
Quoted 2 lines
Relevant system specs:
-Gigabyte GA-G33m-DS2R motherboard, with the integrated realtec nic
Ok, unknown beast.
[...]
Quoted 9 lines
dmesg output:
r8169 Gigabit Ethernet driver 2.2LK loaded
ACPI: PCI Interrupt 0000:04:00.0[A] -> GSI 17 (level, low) -> IRQ 18
PCI: Setting latency timer of device 0000:04:00.0 to 64
eth0: RTL8168b/8111b at0xf8854000, 00:1a:4d:44:a1:1f, IRQ 18
...
r8169: eth2: link up
r8169: eth2: link up
Do not hesitate to send a whole dmesg. More context to not hurt.
drivers/net/r8169.c +6 -0
@@ -789,6 +789,12 @@ static int rtl8169_set_speed_xmii(struct net_device *dev, auto_nego |=ADVERTISE_PAUSE_CAP |ADVERTISE_PAUSE_ASYM ; +if (tp->mac_version ==RTL_GIGA_MAC_VER_12 ) { +/* Vendor specific (0x1f) and reserved (0x0e) MII registers. */ +mdio_write (ioaddr,0x1f ,0x0000 ); +mdio_write (ioaddr,0x0e ,0x0000 ); + } + tp->phy_auto_nego_reg = auto_nego; tp->phy_1000_ctrl_reg = giga_ctrl;
Signature · 4 lines
1.4.4.2 -- Ueimor
Quoted 2 lines
Please try the patch below on top of 2.6.23-rc2 ?
Ok, I did that.
The device now works! But, it still comes up as eth2 instead of eth0, even though it's first detected as eth0. There are no other network interfaces according to ifconfig -a.
I've attached the entire dmesg, which ends with messages from me unloading and reloading the r8169 module again. If you need anything else, just let me know.
Best regards,
Bram
Bram <[email protected]> :
[...]
Quoted 2 lines
The device now works! But, it still comes up as eth2 instead of eth0, even though it's first detected as eth0. There are no other network
Check the udev rules and/or your init scripts ?
Signature · 1 line
Ueimor
Quoted 7 lines · Francois Romieu
Bram <[email protected]> :
[...]Quoted 2 lines
The device now works! But, it still comes up as eth2 instead of eth0, even though it's first detected as eth0. There are no other network
Check the udev rules and/or your init scripts ?
You're right, it's a udev script assigning new names to unknown cards, I wasn't aware of that.
Thanks,
Bram
Quoted 7 lines · Francois Romieu
Bram <[email protected]> :
[...]Quoted 2 lines
The device now works! But, it still comes up as eth2 instead of eth0, even though it's first detected as eth0. There are no other network
Check the udev rules and/or your init scripts ?
You're right, it's a udev script assigning new names to unknown cards, I wasn't aware of that.
Thanks,
Bram