Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#1853 closed bug (fixed)

RTL8168 recognized but not working

Reported by: borg1980 Owned by: axeld
Priority: normal Milestone: R1
Component: Drivers/Network Version: R1/pre-alpha1
Keywords: Cc: codeanxiety@…
Blocked By: Blocking:
Platform: x86

Description

After hrev24062 my Realtek RTL8168/8111 Gigabit Card (on Asus P5B Mainboard - Vendor 0x10EC, Device 0x8168) is recognized in Haiku, but unfortunately still not working properly. DHCP is setting incorrect IP's and card isn't working on manual settings too.

Attachments (2)

RTL8169 - Offset Bug.diff (777 bytes ) - added by anxiety 16 years ago.
Tracked down the problem to the wrong offset being read from the pci config. Now matches Realtek's Linux driver. I couldn't find why it worked before as the value hasn't changed since the original version added to the repository. This is only verified with my own 8168 but I found no special logic in other drivers for 8167 or 8169. (Working)
RTL8169 - Slight Change.diff (685 bytes ) - added by anxiety 16 years ago.
Slight change to axeld's fix.

Download all attachments as: .zip

Change History (20)

comment:1 by anxiety, 16 years ago

I just tested the old revision, despite seeing nothing wrong with the changes. I'm getting the same issue so it must be problem somewhere else.

Do 0x8167 or 0x8169 work? Is anyone else having similar problems with other network cards?

Nothing else in the drive has been touched so your guess is as good as mine as to where the problem lies.

comment:2 by phoudoin, 16 years ago

Same here on my temporary motherboard replacement, which comes with builtin rtl8168/8111 gigabit ethernet controller. It's recognized as an ethernet card by the driver, but the link checker always report "no link".

Hope my old no so "Rock Solid (tm)" Asus P5W DH motherboard will be fixed soon. Meanwhile, let's look in the mess if I can found a supported PCI NIC :-)

comment:3 by umccullough, 16 years ago

Component: Network & InternetDrivers/Network

Now that Haiku runs on my ECS G33T-M2 machine, it also suffers from this issue.

Integrated RTl8111/RTL8169B controller is recognized, but doesn't work.

Looking briefly at the Linux driver, it appears there are definitely differences, including the startup code to init the hardware.

Perhaps some adaptation to support rtl8168 is going to be required for it to work properly...

Should the 8168 be removed from the list of supported devices until that occurs?

by anxiety, 16 years ago

Attachment: RTL8169 - Offset Bug.diff added

Tracked down the problem to the wrong offset being read from the pci config. Now matches Realtek's Linux driver. I couldn't find why it worked before as the value hasn't changed since the original version added to the repository. This is only verified with my own 8168 but I found no special logic in other drivers for 8167 or 8169. (Working)

comment:4 by mmlr, 16 years ago

Just a notice that a patch was attached to this bug. E-Mail notifications for attachments are still not there. Would apply it myself, but I'm at work right now.

comment:5 by stippi, 16 years ago

Thanks a lot for the patch, I applied it in hrev26873!

comment:6 by stippi, 16 years ago

Oh, I meant to say... can more people with that NIC report if it is working now, or was working before and isn't anymore? If there are no issues, then we can close this bug I guess.

comment:7 by umccullough, 16 years ago

Aha! I have this chipset in my core 2 duo box IIRC (and it didn't work before) - will give it another shot in the next couple days and report back.

RE: the attachment notification issue with trac, it's logged as #1740 (explanation of why it's still broken there)

comment:8 by axeld, 16 years ago

I reverted that change again, but only because I misread the commit message (I thought anxiety didn't have the hardware, not me). In any case, I do have this chip: device 8167: RTL-8110SC/8169SC Gigabit Ethernet and it doesn't work anymore after the change. 0x14 is just a part of the standard config space that declares the base addresses (and a different than 0x18). Dunno why this seem to work this way on Linux.

comment:9 by anxiety, 16 years ago

Cc: codeanxiety@… added

I've downloaded a few more linux drivers for different cards. I was wrong, there was a difference between the two... 8169 uses PCI_BASE_ADDRESS_1 (0x14) and 8168 uses PCI_BASE_ADDRESS_2 (0x18).

comment:10 by axeld, 16 years ago

I just take a look at the linux hrev8169.c driver, and it does indeed use different base addresses. I'll just implement this.

comment:11 by axeld, 16 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev26886. Test reports welcome :-)

by anxiety, 16 years ago

Slight change to axeld's fix.

in reply to:  11 comment:12 by anxiety, 16 years ago

Resolution: fixed
Status: closedreopened

Replying to axeld:

Fixed in hrev26886. Test reports welcome :-)

Works fine after a slight change. Thanks axeld, glad to finally have networking in Haiku again. :)

comment:13 by axeld, 16 years ago

Resolution: fixed
Status: reopenedclosed

Thanks for your patch; I applied it in hrev26904. I just wonder why your previous patch worked for you then, as you used range 0 there (the linux driver indeed uses 2, though). Maybe it's the I/O (and not the MMI/O) region? Anyway, this one should be finally nailed.

comment:14 by borg1980, 16 years ago

Works fine now. I'm in Haiku now. Thanks :)

comment:15 by umccullough, 16 years ago

Working fine here too, thanks!

vendor 10ec: Realtek Semiconductor Co., Ltd. device 8168: RTL8111/8168B PCI Express Gigabit Ethernet controller

comment:16 by Heavyiron, 15 years ago

Works fine after updating bios on Asus M3A78 Pro (it doesn't work on 0105 version of the bios) but Network status display "No Link". Is it normal?

PS: In other OS it works even without updating the bios.

in reply to:  16 comment:17 by phoudoin, 15 years ago

Replying to Heavyiron:

Works fine after updating bios on Asus M3A78 Pro (it doesn't work on 0105 version of the bios) but Network status display "No Link". Is it normal?

Nope. Except when, indeed, no link is available ;-)

What kind of link do you have? Gigabit or fast ethernet (100Mb)? If you can, try with both cases.

My rtl8168 doesn't work with my Gigabit switch, but does with a 100Mb one. You may find similar behavior, as I suspect Gigabit PHY for newer rtl8xxx (8168 & 8169C) behave differently thant expect by our driver. Or we just don't support them correctly.

comment:18 by Heavyiron, 15 years ago

My 8168 is directly connected to Thomson TCM420 (http://www.speedguide.net/broadband-view.php?hw=172). It's 100Mb.

Note: See TracTickets for help on using tickets.