PDA

View Full Version : more realtek 8139 NIC problems



nmather
08-18-2003, 07:45 PM
Hi,

I must first point out that this problem has been raised before, but I've searched the forums and applied every fix I came across--all to no avail. Help!

I've having endless difficulties getting my Realtek 8139 Ethernet card to work with knoppix 3.2 25/07/03 (and Gentoo, and Red Hat...) on my P4 1.8 laptop. It works fine with Windows XP, but I really really would much prefer to use GNU/Linux (I am quite smitten with knoppix ).

The problem is like so: though the ethercard is recognised by knoppix and the 8139too driver is installed, I still can't connect to the internet. Any attempt to connect and eth0 times out. I can't ping anything other than localhost.

After looking at various posts on these boards I've tried booting with noacpi, noscsi, nopcmcia, but it doesn't seem to effect anything. I tried booting in failsafe, which turned everying off (including DHCP!), and I tried booting in expert and answering 'n' to everything, but nothing will make it work.

lsmod shows that both 8139too and mii are installed.

I've done:


ifconfig eth0 up
mii-tool -r

and then:


netcardconfig

but I just get:


Sending DHCP broadcast from device eth0
Operation failed.
Failed.
Hit return to exit.

And in dmesg:


eth0: Setting 100mbps full-duplex based on auto-negotiated partner ability 41e1.
NETDEV WATCHDOG: eth0: transmit timed out
eth0: Tx queue start entry 4 dirty entry 0.
eth0: Tx descriptor 0 is 00002000. (queue head)
eth0: Tx descriptor 1 is 00002000.
eth0: Tx descriptor 2 is 00002000.
eth0: Tx descriptor 3 is 00002000.
eth0: Setting 100mbps full-duplex based on auto-negotiated partner ability 41e1.

ifconfig eth0 gives me:


eth0 Link encap:Ethernet HWaddr 00:40:CA:BC:09:96
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:9 Base address:0x5000

In /etc/network/interfaces I changed the lines:


auto lo eth0
iface lo inet loopback

to


auto eth0
iface eth0 inet dhcp

and ran /etc/init.d/networking restart but all I got was more failure:


Reconfiguring network interfaces... Operation failed.
done.

(aside: what is lo?)

I looked in /etc/network/ifstate where it appears to always say:


eth0=eth0

whatever state it is in.

I've run lspci -vvv:


00:08.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
Subsystem: FIRST INTERNATIONAL Computer Inc: Unknown device 2420
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64 (8000ns min, 16000ns max)
Interrupt: pin A routed to IRQ 9
Region 0: I/O ports at 2000 [size=256]
Region 1: Memory at e0002000 (32-bit, non-prefetchable) [size=256]
Capabilities: [50] 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-

I looked in dmesg and these are the parts that seem pertinent to the realtek card (from the boot process output):


8139too Fast Ethernet driver 0.9.26
PCI: Enabling device 00:08.0 (0000 -> 0003)
PCI: Found IRQ 9 for device 00:08.0
PCI: Sharing IRQ 9 with 00:0c.0
PCI: Sharing IRQ 9 with 00:0d.0

eth0: RealTek RTL8139 Fast Ethernet at 0xcf4c5000, 00:40:ca:bc:09:96, IRQ 9
eth0: Identified 8139 chip type 'RTL-8139C'

NETDEV WATCHDOG: eth0: transmit timed out

The two other devices sharing IRQ 9 are:


00:0d.0 FireWire (IEEE 1394): Lucent Microelectronics FW323 (rev 05) (prog-if 10 [OHCI])
00:0c.0 CardBus bridge: O2 Micro, Inc. OZ6912 Cardbus Controller


-----

Please, does anyone have any idea as to what else I can try? Sorry for such a long posting, but as you can see I've tried to attempt everything already mentioned on the forums, but nothing seems to work!

Thanks in advance,
Neil

jvoorhes
08-18-2003, 11:47 PM
I'm thrilled that I can help as I am definitely a newbie--had the exact same problem with realtek 8139 on Mandrake, then with knoppix--the secret is to disable apic in the bios. Check out this link for details:

http://www.linuxquestions.org/questions/archive/18/2003/03/4/52327

nmather
08-19-2003, 12:14 PM
Thanks very much for your reply,

But I forgot to mention that! I'd already tried turning off APIC in the BIOS, but as far as I can see my BIOS doesn't handle that... no mention of PCI, plug'n'play or APIC anywhere. My laptop is running phoenixBIOS, version 4.0 I think.

In the link you provided, should altering the BIOS fail it also gives the advice:


...you could also add 'noapic' to the 'append =' line in /etc/lilo.conf.... This will make the changes to your bootloader. Then when you re-boot, your hardware will be configured as though the apic was turned off.

Running the Knoppix disc, there's no LILO or GRUB, but I figure the same effect can be achieved by booting Knoppix with the noapic option. (Can anyone confirm that?) If so, I've already tried that, and infuriatingly that doesn't work either. I can't figure out why, when it seems to work for everyone else.

The link also mentions:


APIC sort of gets round the problem of only have 16 hardware IRQs, and allows more. The problem is Linux seems to only understand 16 IRQs, so when APIC is on, and some devices are assigned IRQs higher, it freaks - like it didn't pick up my network card

....I think this might be the problem though, since when my computer is booting (before lilo), it says the network interface has irq of 11, yet with ifconfig linux thinks its irq is 17

Which might suggest why APIC is the problem, but on my computer, the card is assigned IRQ 9 at startup, and still has IRQ 9 afterwards:


[dmesg]
8139too Fast Ethernet driver 0.9.26
PCI: Enabling device 00:08.0 (0000 -> 0003)
PCI: Found IRQ 9 for device 00:08.0
PCI: Sharing IRQ 9 with 00:0c.0
PCI: Sharing IRQ 9 with 00:0d.0

[ifconfig]
eth0 Link encap:Ethernet HWaddr 00:40:CA:BC:09:96
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:9 Base address:0x5000

I can't figure it out... I'm clutching at straws now, but maybe it's because the ethercard is sharing IRQ 9 with two other devices:


00:0d.0 FireWire (IEEE 1394): Lucent Microelectronics FW323 (rev 05) (prog-if 10 [OHCI])
00:0c.0 CardBus bridge: O2 Micro, Inc. OZ6912 Cardbus Controller

in which case I'll see if I can manually reassign it to a different IRQ. I can't see why this would be a problem though, because as far as I know neither the FireWire or CardBus should be in use, so I can't see why there'd be a conflict there.

Ho hum...

catfish
08-20-2003, 05:11 PM
Booting with knoppix noapic should be enough to disable the apic handling. I believe you do have an interrupt problem problem but its caused by more than one device using IRQ 9 rather than any apic handling. Even tho the other devices may not be active, there's still the possiblity that one of them will generate an interrupt that doesn't get handled properly and prevents any futher IRQ9 interrupts from ever getting attention.

If all these devices work okay when running windows you should check their IRQ assignment in windows.

Can you disable the other devices (in the BIOS?) and see if the NIC suddenly starts to work?

Good luck... :-)

nmather
08-20-2003, 06:32 PM
Unfortunately I can't disable the other devices--the version of phoenixBIOS I have seems to be annoyingly simple. I considered attempting flashing the bios to upgrade to a version that can do the things I want, but this is definitely a last resort! I don't want to blow the computer.

I want to either disable those two devices (FireWire and CardBus) at boot, or change the IRQs around manually in Knoppix after things have loaded up--unfortunately I don't know how to do either! Some forum searching is in order...

RockMumbles
08-21-2003, 12:21 AM
you may want to try to start with:

knoppix pci=biosirq

~rock

nmather
08-21-2003, 02:28 PM
No joy I'm afraid: I tried knoppix pci=biosirq but I got exactly the same IRQ assignments.

Strangely, my laptop with Linux only seems to assign IRQs 5 and 9.


[ lspci -v ]

00:00.0 Host bridge: Silicon Integrated Systems [SiS] 650 Host (rev 01)
Flags: bus master, medium devsel, latency 32
Memory at d0000000 (32-bit, non-prefetchable) [size=256M]
Capabilities: [c0] AGP version 2.0

00:01.0 PCI bridge: Silicon Integrated Systems [SiS] SiS 530 Virtual PCI-to-PCI bridge (AGP) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 99
Bus: primary=00, secondary=01, subordinate=01, sec-latency=68
I/O behind bridge: 00009000-00009fff
Memory behind bridge: e0100000-e01fffff
Prefetchable memory behind bridge: e8000000-efffffff

00:02.0 ISA bridge: Silicon Integrated Systems [SiS] 85C503/5513
Flags: bus master, medium devsel, latency 0

00:02.2 USB Controller: Silicon Integrated Systems [SiS] SiS7001 USB Controller (rev 07) (prog-if 10 [OHCI])
Subsystem: Silicon Integrated Systems [SiS] SiS7001 USB Controller
Flags: bus master, medium devsel, latency 64, IRQ 5
Memory at e0000000 (32-bit, non-prefetchable) [size=4K]

00:02.3 USB Controller: Silicon Integrated Systems [SiS] SiS7001 USB Controller (rev 07) (prog-if 10 [OHCI])
Subsystem: Silicon Integrated Systems [SiS] SiS7001 USB Controller
Flags: bus master, medium devsel, latency 64, IRQ 5
Memory at e0001000 (32-bit, non-prefetchable) [size=4K]

00:02.5 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE] (rev d0) (prog-if 80 [Master])
Subsystem: Silicon Integrated Systems [SiS] SiS5513 EIDE Controller (A,B step)
Flags: bus master, fast devsel, latency 64
I/O ports at 1020 [size=16]

00:02.6 Modem: Silicon Integrated Systems [SiS] Intel 537 [56k Winmodem] (rev a0) (prog-if 00 [Generic])
Subsystem: FIRST INTERNATIONAL Computer Inc: Unknown device 2470
Flags: medium devsel, IRQ 5
I/O ports at 1400 [size=256]
I/O ports at 1080 [size=128]
Capabilities: [48] Power Management version 2

00:02.7 Multimedia audio controller: Silicon Integrated Systems [SiS] SiS7012 PCI Audio Accelerator (rev a0)
Subsystem: FIRST INTERNATIONAL Computer Inc: Unknown device 2440
Flags: bus master, medium devsel, latency 173, IRQ 5
I/O ports at 1c00 [size=256]
I/O ports at 1800 [size=128]
Capabilities: [48] Power Management version 2

00:08.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
Subsystem: FIRST INTERNATIONAL Computer Inc: Unknown device 2420
Flags: bus master, medium devsel, latency 64, IRQ 9
I/O ports at 2000 [size=256]
Memory at e0002000 (32-bit, non-prefetchable) [size=256]
Capabilities: [50] Power Management version 2

00:0c.0 CardBus bridge: O2 Micro, Inc. OZ6912 Cardbus Controller
Subsystem: FIRST INTERNATIONAL Computer Inc: Unknown device 2550
Flags: bus master, stepping, slow devsel, latency 168, IRQ 9
Memory at 10000000 (32-bit, non-prefetchable) [size=4K]
Bus: primary=00, secondary=02, subordinate=05, sec-latency=176
Memory window 0: 10400000-107ff000 (prefetchable)
Memory window 1: 10800000-10bff000
I/O window 0: 00004000-000040ff
I/O window 1: 00004400-000044ff
16-bit legacy interface ports at 0001

00:0d.0 FireWire (IEEE 1394): Lucent Microelectronics FW323 (rev 05) (prog-if 10 [OHCI])
Subsystem: FIRST INTERNATIONAL Computer Inc: Unknown device 1881
Flags: medium devsel, IRQ 9
Memory at e0003000 (32-bit, non-prefetchable) [disabled] [size=4K]
Capabilities: [44] Power Management version 2

01:00.0 VGA compatible controller: Silicon Integrated Systems [SiS] SiS650/651/M650/740 PCI/AGP VGA Display Adapter (prog-if 00 [VGA])
Subsystem: FIRST INTERNATIONAL Computer Inc: Unknown device 2430
Flags: 66Mhz, medium devsel, IRQ 5
BIST result: 00
Memory at e8000000 (32-bit, prefetchable) [size=128M]
Memory at e0100000 (32-bit, non-prefetchable) [size=128K]
I/O ports at 9000 [size=128]
Capabilities: [40] Power Management version 1
Capabilities: [50] AGP version 2.0


Perculiar.

nmather
08-21-2003, 02:37 PM
Hmm, I looked in Windows as suggested by catfish, and it seems XP (or maybe it's just my BIOS) likes to use 5 and 9 as well:


(PCI) 5 Avance AC'97
(PCI) 5 Lucent Technologies Soft Modem AMR
(PCI) 5 SiS 650
(PCI) 5 SiS 7001 PCI to USB Open Host Controller
(PCI) 5 SiS 7001 PCI to USB Open Host Controller
(PCI) 9 O2Micro OZ6912 CardBus Controller
(PCI) 9 OHCI Compliant IEEE 1394 Host Controller

BUT! With one significant difference:


(PCI) 10 Realtek RTL8139 Family PCI Fast Ethernet NIC

That could well be the problem. I need to change the card from IRQ 9 to IRQ 10--any ideas?

nmather
08-21-2003, 04:22 PM
I can't find a way to manually change the IRQ of a device... I came across setpci, but it appears that this doesn't quite do the trick.

Flashing the BIOS still remains an option, but I really don't want to do that, so after looking at the Realtek mailing lists over at http://www.scyld.com/mailman/listinfo/realtek, I've decided that enabling ACPI (not APIC!) might be the way forward.

Unfortunately (for me), adding the patch from http://acpi.sourceforge.net/ involves patching the kernel and reinstalling it, neither of which I know how to do as of yet. But, only one way to learn!

I think ACPI (Advanced Configuration and Power Interface) might sort things out as it allows for Plug'n'Play management (amongst other things) to be handled by the OS rather than the BIOS, and I believe my BIOS to be pretty crappy. ACPI is definitely used in WinXP, which might account for the ethercard being assigned IRQ 10 even after the BIOS plonks everything in 5 and 9.

Anyway, as I say I'll try this and see if it works. I hope these posts might be of use to others some time in the future.

nmather
08-23-2003, 02:57 PM
YES!!

I finally got the ethercard to work--I patched the kernel to use APCI, and lo and behold here I am on IRQ 10 browsing the internet!

So in the end it wasn't a problem with the Realtek card at all, it was because of the inadequacies of the phoenixBIOS.

After all this I'm actually glad it didn't work straight off, because in the course of fixing it I've taught myself numerous things about GNU/Linux. I now know a thing or two about IRQs and patching/rebuilding the kernel I probably would never have known if it had worked out of the box.

Finally, I'm totally GNU/Linux based.... ah, sweet success.

oscar
08-23-2003, 07:13 PM
you are a semi-guru now :)

cheers!