Ticket #1853 (closed bug: fixed)

Opened 16 months ago

Last modified 11 months ago

RTL8168 recognized but not working

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

Description

After r24062 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

RTL8169 - Offset Bug.diff (0.8 KB) - added by anxiety 11 months 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 (0.7 KB) - added by anxiety 11 months ago.
Slight change to axeld's fix.

Change History

  Changed 14 months ago by anxiety

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.

  Changed 13 months ago by phoudoin

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 :-)

  Changed 13 months ago by umccullough

  • component changed from Network & Internet to Drivers/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?

Changed 11 months ago by anxiety

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)

  Changed 11 months ago by mmlr

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.

  Changed 11 months ago by stippi

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

  Changed 11 months ago by stippi

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.

  Changed 11 months ago by umccullough

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)

  Changed 11 months ago by axeld

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.

  Changed 11 months ago by anxiety

  • 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).

  Changed 11 months ago by axeld

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

follow-up: ↓ 12   Changed 11 months ago by axeld

  • status changed from new to closed
  • resolution set to fixed

Fixed in r26886. Test reports welcome :-)

Changed 11 months ago by anxiety

Slight change to axeld's fix.

in reply to: ↑ 11   Changed 11 months ago by anxiety

  • status changed from closed to reopened
  • resolution fixed deleted

Replying to axeld:

Fixed in r26886. Test reports welcome :-)

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

  Changed 11 months ago by axeld

  • status changed from reopened to closed
  • resolution set to fixed

Thanks for your patch; I applied it in r26904. 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.

  Changed 11 months ago by borg1980

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

  Changed 11 months ago by umccullough

Working fine here too, thanks!

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

Note: See TracTickets for help on using tickets.