Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 148090 - Realtek 8168/8111 Support
Summary: Realtek 8168/8111 Support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: InstallCD (show other bugs)
Hardware: x86 Other
: High normal (vote)
Assignee: Gentoo Release Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-18 10:07 UTC by Ivan Silva
Modified: 2007-05-09 20:28 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
2.6.18 patch (patch,17.35 KB, patch)
2006-09-24 20:21 UTC, Daniel Drake (RETIRED)
Details | Diff
lspci -v output - Asus A6T (amd64) (lspci-v,8.53 KB, text/plain)
2006-09-25 15:07 UTC, Sebastian Stammler
Details
r8169-8168_2.6.18.patch - stolen from 2.6.18-rc6-mm1 patch (r8169-8168_2.6.18.patch,35.48 KB, patch)
2006-09-25 15:39 UTC, Sebastian Stammler
Details | Diff
patch -p1 --dry-run --verbose Outputs (patching.out,5.38 KB, text/plain)
2006-09-25 16:18 UTC, Sebastian Stammler
Details
new patch (patch,17.75 KB, patch)
2006-09-25 18:30 UTC, Daniel Drake (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Silva 2006-09-18 10:07:01 UTC
The minimal installation cd doesnt support the Realtek 8168/8111 net card, so i couldnt use this cd to install gentoo
Comment 1 Daniel Drake (RETIRED) gentoo-dev 2006-09-18 10:29:23 UTC
Do you now have a working Gentoo installation on this hardware which you could test some kernel patches on?
Comment 2 Sebastian Stammler 2006-09-20 20:00:44 UTC
i had the same problem. i solved it with building the r1000 module after copying the sources to an usb stick and building the module from the livecd(with the gcc from a stage archiv). but there is also a patchset for 2.6.17 kernels so the built-in r8169 driver works for 8168 cards...(btw 2.6.18 should already have this support without the need to patch) nevertheless you have to copy the sources to an usb stick or something else, so you can build modules from the livecd environment.  of course, the sources must be of the same kernel version as the kernel the livecd runs! for further imformation see http://bugs.gentoo.org/show_bug.cgi?id=129216#c11
i recommend to patch your 2.6.17 kernel after setting up your gentoo or use 2.6.18. r1000 will become obsolete soon.
Comment 3 Daniel Drake (RETIRED) gentoo-dev 2006-09-20 20:23:18 UTC
Sebastian, do you now have a working Gentoo installation on this hardware which you could test some kernel patches on? Or even just plain 2.6.18 if you think that would work?

(I've been looking to support this hardware for a fairly long time, but I have yet to find someone actually willing to test stuff. Please help!)
Comment 4 Sebastian Stammler 2006-09-24 19:40:35 UTC
Hi Daniel,
Yes I've got a running gentoo installation on my hardware. And I always love to help! Up to now I used the r1000 drivers from my ebuild mentioned above. Then I added the patches mentioned in the link above to suspend2-sources-2.6.17-r6 ( I had to edit the patches to fit it to the sources after the gentoo patches...). Unfortunately it didn't work! In this minutes I'm configuring my new suspend2-2.6.18. I extracted the r8169.c patch from the 2.6.18-rc6-mm1 patch and I will see in a few minutes if this will work for my 8168 card.
Just say how I may help.
Comment 5 Daniel Drake (RETIRED) gentoo-dev 2006-09-24 20:06:30 UTC
OK. Please attach "lspci -v" output to start. Also, you mentioned that you think 2.6.18 works out-of-the-box - please confirm/deny this.
Comment 6 Daniel Drake (RETIRED) gentoo-dev 2006-09-24 20:21:38 UTC
Created attachment 97993 [details, diff]
2.6.18 patch

I'm fairly sure 2.6.18 doesn't support your hardware. Please try this patch.
Comment 7 Sebastian Stammler 2006-09-25 15:03:40 UTC
Hi Daniel,
no, I said, I try it with the 2.6.18-rc6-mm1 patch applied on the r8169.c file from suspend2-sources-2.6.18. Unfortunately, I couldn't finish my 2.6.18 build process yet because of errors in the ebuild :( -> http://bugs.gentoo.org/show_bug.cgi?id=148549
But I'll have finished in some minutes.

The patch you submitted does not work because it's the last patch in a patching chain...look at http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.17-rc6/r8169/ this is the same patch against 2.6.17 like yours against 2.6.18(isn't it?)(btw this was mentioned in the link in my first post.) your patch was number 00005 ;) nevertheless the patch from this link doesn't work! I can apply it, no problem(well i had to edit them so they fit to the gentoo patch set) in compiling and even in loading the module and run ifconfig, but I can't make network actions, like with the r1000 module.

And 2.6.18 doesn't support my 8168 card unpatched, a "grep 8168 r8169.c" shows that ;) with the 2.6.18-rc6-mm1 patch applied on the r8169.c file, i have 8168 in the pci table, grep shows something. When I can finally compile the patched 2.6.18 kernel(my sync is finished soon :) ), we will know more.
Comment 8 Sebastian Stammler 2006-09-25 15:07:50 UTC
Created attachment 98069 [details]
lspci -v output - Asus A6T (amd64)
Comment 9 Sebastian Stammler 2006-09-25 15:39:41 UTC
Created attachment 98076 [details, diff]
r8169-8168_2.6.18.patch - stolen from 2.6.18-rc6-mm1 patch

Wohoo! I just build my new 2.6.18 kernel with this patch stolen from http://www.kernel.org/diff/diffview.cgi?file=%2Fpub%2Flinux%2Fkernel%2Fpeople%2Fakpm%2Fpatches%2F2.6%2F2.6.18-rc6%2F2.6.18-rc6-mm1%2F2.6.18-rc6-mm1.bz2;z=1693
and neworking works great!
Daniel, do you want me to give the patches from http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.18-rc5/r8169/ a try?
Comment 10 Daniel Drake (RETIRED) gentoo-dev 2006-09-25 15:49:29 UTC
Actually no, I know that the older patches were broken. The patch I attached here was taken straight from 2.6.19 and fixed to apply against 2.6.18 by myself, so there isn't a clear reason why it doesn't work. I guess the next step is to test 2.6.18-git4 or newer.

Also, I'm not prepared to apply the changes directly from -mm as it includes too many unrelated changes in the driver. We'll take the changes that are needed and ideally no more...
Comment 11 Sebastian Stammler 2006-09-25 16:18:44 UTC
Created attachment 98078 [details]
patch -p1 --dry-run --verbose Outputs

This are the Outputs, hope they help you. I applied both patches against clean gentoo/suspend2-2.6.18 sources.
Feel free to send other patches that I should test(e.g. the git4 patch you mentioned). Or, if you want, my r8169.c file so you can see the diffs between your r8169.c file and mine.
Comment 12 Daniel Drake (RETIRED) gentoo-dev 2006-09-25 18:30:01 UTC
Created attachment 98087 [details, diff]
new patch

Oh, so you didn't even get the patch I posted to apply without rejects? What you wrote in comment #7 suggested otherwise...

I appear to have uploaded the wrong file. Here's one that applies cleanly to 2.6.18.
Comment 13 Sebastian Stammler 2006-09-26 04:46:00 UTC
I can confirm that the patch you submitted works! r8169.c compiles, insmod works, and the module does his job! No errors in dmesg.
In #7 I wrongly assumed that your patch is from a chain...this should have implied that it doesn't patch without rejects ^^ sorry for the unclear words.
Comment 14 Daniel Drake (RETIRED) gentoo-dev 2006-09-26 09:00:25 UTC
Thanks for testing.

releng: This will be fixed as of gentoo-sources-2.6.18-r1
Comment 15 Daniel Drake (RETIRED) gentoo-dev 2006-10-15 16:38:07 UTC
2.6.18-r1 is now in portage
Comment 16 Chris Gianelloni (RETIRED) gentoo-dev 2007-05-09 20:28:13 UTC
We're using 2.6.19 as a base, so this is FIXED now that 2007.0 is out.