# Problem w/gentoo-sources-2.4.20 and RTL8139  FIXED!!!

## guero61

Not sure if this wouldn't go into OTG, but it's about my NIC, so...

Problem is, I've just gotten around to reinstalling Gentoo, got it all installed with the 2.4.19 kernel.  Everything was fat, dumb, and happy.  Then, I enabled the ~x86, upgraded everything, everybody's still happy.  Finally, I chose to install lm_sensors, and it required 2.4.20; didn't see much bad about it, so I gave it a whirl.

Now, 2.4.20 is configred almost identically to 2.4.19 (by the same person for the same machine), and it loads the drivers for the 8139too just fine.  The problem is, I can't get my NIC to communicate with the network anymore.  It won't DHCP, won't ping if I set it up on my own, nothing.  I changed patch cables, checked all physical connections, but no such luck.  I rebooted into the 2.4.19 kernel, and the thing worked like a champ.

?????  What the heck?  Any ideas?Last edited by guero61 on Fri Feb 14, 2003 4:22 am; edited 2 times in total

----------

## bob_monkier

Between 2.4.19 and 2.4.20, I think some of the options for the 8139 modules changed; maybe you need some of the experimental ones?

----------

## guero61

That's a thought; I had some enabled, but disabled them when I was having this trouble.  It's really wierd; it's mac doesn't even show up out on the wire, so under .20, the NIC is essentially dead.

----------

## heijs

Did  you try a static configuration?

----------

## drakonite

Are you sure you compiled the correct driver in? There are two different RTL-8139 drivers. The RTL-8139 PCI driver and the RTL-8139 C+ PCI driver.  I accidentally used the wrong one a while back.

If you are using the RTL-8139 PCI driver (8138too) have you tried enabling support for "uncommon RTL-8139 rev. K",  "older RTL-8129/8130 boards" to see if it helped?

Tried switching the "Use PIO instead of MMIO" option?

(FYI, OTG isn't where this should go... Either here in networking or in the hardware forum would be good places  :Wink: )

----------

## al

If you do a search through these forums you will find  threads as long as your arms concerning problems with the rtl8139 nic,including a thread from my own install probs.

The only way i could get it to work was to install a 2.5 kernel and compile the driver in as a module.

If you do a search of my postings you will find it somewhere giving exact details of how i fixed it.

----------

## ronmon

I have three of these chipsets in three different machines (all running Gentoo). Never had a problem that wasn't my fault :) , double check your kernel / module configuration.

----------

## Unlucky_Alf

Never had a problem with my 8139 nic. Here is my configuration (2.4.20 from kernel.org).

CONFIG_8139TOO=m

# CONFIG_8139TOO_PIO is not set

# CONFIG_8139TOO_TUNE_TWISTER is not set

# CONFIG_8139TOO_8129 is not set

# CONFIG_8139_OLD_RX_RESET is not set

----------

## guero61

I do have the 8139too (D-Link 530-TX+), and I started with the experimental options on the driver.  When it didn't work, I tried disabling those options, to no avail.  

I have no doubt that the vanilla 2.4.20 works, but I was trying to install the latest lm_sensors which also happens to depend on >=gentoo-sources-2.4.20.  Right now, everything is working fine; I'll just have to install my lm_sensors at 2.7.

----------

## guero61

Well, I've still got the problem.  I thought the problem might be that I had appletalk enabled, so I disabled that, but to no avail.  Then, I tested with enabling the extended option (something about k-revision boards), but to no avail.  Next, the extended option with the old-style reset, no go.  Non-extended, with old reset, and finally plain vanilla driver.  No go.  Here's the relevant parts of dmesg:

```

eth0: D-Link DFE-538-TX (RealTek 8139) at 0xe880c000, 00:r0:ba:c1:21:06, IRQ 10

eth0:  Identified 8139 chip type 'RTL-8139C'

eth0: Setting 100mbps full-duplex based on auto-negotiated partner ability 41e1.

...

eth0: Setting 100mbps full-duplex based on auto-negotiated partner ability 41e1.

NETDEV WATCHDOG: eth0: transit timed out

eth0: Tx queue start entry 4 dirty entry 0

eth0:  Tx descriptor 0 is, 000020000. (queue head)

eth0:  Tx descriptor 1 is 000020000.

eth0:  Tx descriptor 2 is 000020000.

eth0:  Tx descriptor 3 is 000020000.

```

This is really frustrating; it happens both in DHCP and with static settings.  Here's a bit more about my network:

1.  Switch/DHCP server/Gateway (D-Link 704P) is at 192.168.0.254.

2.  Netmask is 255.255.255.0

3.  My box has a dedicated mapping of 192.168.0.2

I'm going to go back and recompile some more kernels and see what else I can figure out, but any help would be immensely appreciated; I'd really like to get lm_sensors back online.

----------

## guero61

Back again... had to get some sleep!

I've completely removed all vestiges of any kernel source on my machine, removed the modules for 2.4.20 (Left those for 2.4.19, I'd like to still boot!), and re-emerged gentoo-sources and started from a clean slate.  No fancy networking involved, just compiled 8139too with it's basic options setup as a module, so I could see it loading myself.  When I modprobe the 8139too module, it goes on perfectly, quickly.  Not a problem.  When I try to DHCP my NIC, it times out, never even gets outside the box (I'm running a sniffer on another machine).  If I ifconfig it, I can ping myself, but cannot ping anything else.  

It's not a problem with the NIC, it's not a problem with my kernel config, I'm thinking the patches for gentoo-sources-2.4.20-r1 are in some way interfering with proper NIC communication.

----------

## guero61

Not just gentoo-sources either.  I just got done with wolk-sources, and they also refuse to allow me to DHCP.  So, now I'm trying the vanilla sources.  If they fail, there's something wrong with the 2.4.20 sources for me.  *sigh*

[edit]

*POW*  dhcpcd worked in about 0.1 second.  WHY???  I hate using vanilla-sources, it has none of those really cool things we all love about the patched kernels!  I used the EXACT same settings as the other two 2.4.20's, short a few options unique to those two.  What gives, anyone have _any_ idea?

[/edit]

[edited again]

I recompiled wolk-sources and added the development (2.5.59) kernel, but neither of them would allow me to get outside the box.  I'm now compiling the development kernel with having loaded the vanilla options straight from the vanilla's .config file.  Introduced a couple of errors, but none of them were related and all were optional crap.  Let's see what happens.

----------

## pilla

Do you have CONFIG_1GB enabled in your .config? 

I had some nasty problems with all kernels but vanilla sources when using (by mistake) CONFIG_3GB. Mplayer and prelink wouldn't work with that in my 512 MB memory.

----------

## guero61

Well, I've tried everything...  CONFIG_1GB, mmaped io, multicast (all either suggested here or in prior, unsuccessful posts), an d nothing works.  I've submitted a bug, for what it's worth, but I'm not sure what the developers can fix; it may signal the need for me to get a new NIC.  I hope not, I'm flat broke!

https://bugs.gentoo.org/show_bug.cgi?id=15567

----------

## Sequentious

I'm also running an 8139 with the 8139too driver. I have never had trouble with the card (actually, i have four of them in different machines). I've been using gentoo-sources 2.4.20 as well, but recently switched to lolo-sources.

I dont compile it as a module however, I usually build it into the kernel.

If you want, I could send you my .config to have a look at?

----------

## guero61

As I just added to the bug, I've tried it both as compiled-in and as modules, for both 8139too and 8139c.  I've tried all accompanying options as well, and none work.  

I'm going to remove all vestiges of 2.4.20 sources/modules from my machine and try again, but I've already been down this road before.

----------

## guero61

For the first time, I'm disappointed with Gentoo support.  Normally, someone has a clue as to what's going on, but I guess my problem is so far out there that even the developers say I'm out of my mind.

I don't know why, but this just pisses me off.  1 or 2 people having the issue can be written off as PEBKAC, but dammit, I'm one of several that have had the problem, and I've tried every damned combination there is!   I've even started sifting through the patches to see what the hell could produce this error.  *sigh*   Maybe I just need to take a few weeks off of foruming about Gentoo, cool my jets, and come back when I've solved the damned thing myself.

 :Evil or Very Mad: 

----------

## Sequentious

You dont happen to be running windows XP, do you? Although it probably wouldnt likely happen to realtek cards, i had some issues getting my wireless card working. One day it just stopped working, seemingly out of the blue.

Here's the post I made to my LUG about it.

Basically it was different firmware that was my problem, but it was a cisco wireless pcmcia card, not a realtek pci nic. I'm not even sure if the firmware is updatable on 8139 cards.

Heres another question: Does the gentoo boot cd or knoppix still bring the card up? Or do you have a previous kernel that is still working? (from the sounds of it, you do. just making sure).

You might also want to try a different patchset, such as the lolo-sources, which I'm currently playing around with.

As for knowing what the problem is, i must stand with those who have no idea. As long as you have everything that should be needed (the driver itself, PNP support, etc.), and none of the patches seem to interfere, I can't offer any further advice -- partly due to me also having an 8139.

another place you might want to turn for help is IRC. It's a little more immediate (usually) than a forum. on irc.freenode.net there's the #gentoo room, but you might want to check around in other linux related rooms as well.

again, good luck.

----------

## NrG

Hi there,

Im also running 2.4.20 with realtek nic's.

The thing is i never use the kernel drivers for my network cards.

To get the latest drivers check this website: http://www.scyld.com/network/

And more realtek specific check: http://www.scyld.com/network/rtl8139.html

I always dl the netdrivers from ftp://ftp.scyld.com/pub/network/ and install those drivers. I never had any problems.

To install them do this:

Check the Makefile. 

# By default this Makefile tries to build and install for the running kernel.

# You may override this with command line parameters

#   make KERN_INCLUDE=/lib/modules/2.4.20-12smp/build/include

#   make KERNVER=2.4.20-12smp

afterwards you can copy the *.o files to /lib/modules/*******/misc/ (if that dir doesnt exists create it)

depmod -a

Edit your  /etc/modules.autoload and include the correct module.

Dont forget to remove the drivers from your kernel or you will get problems.

If you are not going to use any kernel 10/100 network driver you can safely deselect  [ ] Ethernet (10 or 100Mbit) in your kernel.

Hope this helps.

----------

## guero61

Sequentious -- 

Yes, I'm running XP, but haven't booted into it in ages; plus, I've got all the updates turned off.  I'm currently running under vanilla-sources-2.4.20 without a hitch; it's just when I use a patched kernel that things go awry.

NrG --

Thanks for the links!  I'll compile my own drivers and see if I can get anything else to work.  Right now, I'm trying one more test -- power management (ACPI and APM) turned completely off, both in kernel and in BIOS.  Didn't work for some people, but I'm grasping at straws now.

----------

## guero61

I disabled ACPI for the PCI slots by adding the kernel parameter "pci=noacpi" to my parameter line.  DHCP works, and all is FDH (fat, dumb, and happy).  I'll post to the threads of those other poor souls and hopefully help them.

----------

## rsd2002

With the assistance of other user posts, I was able to overcome the lack of detection of my board's (Gigabyte 8IHXP, Intel 850e chipset) built-in Realtek 8139 Lan card when installing Gentoo 1.4.  As others have noted, the Realtek 8139 is not detected correctly during the CD-ROM boot.  As another user pointed out, the work around seems to be adding ACPI=off to the gentoo boot options.

For some reason, the on-board Realtek 8139 is detected by Gentoo 1.4 as an 8390, and there is no network connection.

I was able to overcome this by manualy running ismod and installing the 8139too driver.  (I know this is the correct driver because I have Xandros running, which is kernel 2.4.19, and it loads the 8139too module for the Realtek). With the 8139 module loaded, ADSL networking was up and running.

Hope this helps someone during the install process.

----------

## Sylhouette

Well i have the same thing going on with the 8139too  card and it just won't do any networking.

It insert the module correctly, with ifconfig all values are fine but no network traffic at all 

I try this with the gentoo-sources and with the vanilla sources but no go here 

the pci=noacpi option does not work here.

So i go and install an 3com card and try the darn thing when new kernels arrive 

The install went fine i used the 1.2 cd and the 1.4 rc_2 stage 3 

Wich kernel is used on the 1.2 cd ??

----------

## MarkWPiper

guero61:  Are you compiling in APIC support?  It might have something to do with it...

I had almost the same problem with my 8139, with the latest ~x86 kernel.  It would run fine, then I'd get 'request timed out' with some bad queue errors in my dmesg.

I recompiled my kerenel without APIC (but I kept ACPI), and recompiled the 8139 driver as a module rather than into the kernel, and all seems to be working.  (I haven't extensively tested it yet)

For what it's worth, I also had the problem with my SiS 900 LAN built into my ECS K7S5A mobo.  Anyone else seen this?[/b]

----------

## guero61

Indeed, I am.  That may be the culprit.  Oh well, it works now that I added that!

----------

## Primera

Well I'm having the exact problem ya'll are talking about with my 8139.....Dlink 530TX+.  I have recompiled the kernel and removed acpi and apm via genkernel --config.  I'm pretty much at wit's end with this problem.  I'm using kernel 2.4.20-r8 with gentoo-sources.  Any help or advice would be greatly appreciated.

----------

