[realtek] Problem installing rtl8139 under Redhat 7.2, kernel 2.4.7-10

Perry Moerland perry_moerland@hotmail.com
Fri Jun 28 18:21:01 2002


Hi,

After quite some hours of trying and searching, the moment seems
right to ask for your help!

I'm running RedHat 7.2, Linux kernel version 2.4.7-10 with a Nettox
PCI Ethernet card and a Realtek8139C chip set.
The standard driver that comes with the RedHat distribution (rtl8139too)
works but the network connection is slow ... The same card works fine
and fast under my Windows2000 partition.
I decided to try my luck with the rtl8139 driver and took the most recent
rtl8139.c (v1.18 6/5/2002), pci-scan.c, pci-scan.h, and kern_compat.h

pci-scan.c and rtl8139.c compile after adding
"-I/lib/modules/$(uname -r)/build/include".
insmod pci-scan.o works fine but insmod rtl8139.o gives:
rtl8139.o: init_module: No such device
Hint: insmod errors can be caused by incorrect module parameters,
including invalid IO or IRQ parameters.

Same problem with the previous version of rtl8139.c (v1.17 1/28/2002).

As a second try, I downloaded the source rpm for netdrivers-3.1-1
(1/29/2002)

rpm -ihv --force netdrivers-3.1-1.src.rpm
indeed installs netdrivers.tgz in /usr/src/redhat/SOURCES and
netdrivers.spec in /usr/src/redhat/SPECS.

But doing:
rpm -bb SPECS/netdriver*.spec
gives the same problem as mentioned in a recent posting by Umair Yousufi
namely an error on  `MODULE_LICENSE'. I followed Umair's solution starting
with commenting out MODULE_LICENSE{"GPL"} in the files sitting in
/usr/src/redhat/BUILD/netdrivers-3.1 but in the end when trying to install
the drivers this also ended up with
rtl8139.o: init_module: No such device
after insmod  rtl8139.o, so apparently again no recognized device was found.

Any ideas anybody? I'm quite lost by now and any input to get me going would 
be
great!

Many thanks,

Perry Moerland


Here is some output of the various diagnostics tools, it might give a clue
(and I will be happy to provide additional information if something is
missing):

[root]# cat /proc/pci
Bus  2, device  11, function  0:
    Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139 (rev 16).
      IRQ 9.
      Master Capable.  Latency=32.  Min Gnt=32.Max Lat=64.
      I/O at 0xd000 [0xd0ff].
      Non-prefetchable 32 bit memory at 0xe5000000 [0xe50000ff].

[root]# lspci -v
02:0b.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139 (rev 
10)
	Subsystem: Realtek Semiconductor Co., Ltd. RT8139
	Flags: bus master, medium devsel, latency 32, IRQ 9
	I/O ports at d000 [size=256]
	Memory at e5000000 (32-bit, non-prefetchable) [size=256]
	Capabilities: [50] Power Management version 2

[root]# lspci -nv
02:0b.0 Class 0200: 10ec:8139 (rev 10)
	Subsystem: 10ec:8139
	Flags: bus master, medium devsel, latency 32, IRQ 9
	I/O ports at d000 [size=256]
	Memory at e5000000 (32-bit, non-prefetchable) [size=256]
	Capabilities: [50] Power Management version 2

Does this inconsistency between rev 16 and rev 10 maybe have anything to do
with it?

[root]# ./rtl8139-diag -aaee 0xd000
rtl8139-diag.c:v2.06 3/22/2002 Donald Becker (becker@scyld.com)
http://www.scyld.com/diag/index.html
Index #1: Found a RealTek RTL8139 adapter at 0xd000.
The RealTek chip appears to be active, so some registers will not be read.
To see all register values use the '-f' flag.
RealTek chip registers at 0xd000
0x000: 014f0600 00009ba2 80000000 00000000 0008a042 0008a042 0008a042 
0008a042
0x020: 1e0b2000 1e0b2600 1e0b2c00 1e0b3200 1e0a0000 0d0e0000 44544444 
0000c07f
0x040: 74000600 0e00f78e 1ff3f85c 00000000 000d1000 00000000 0088c118 
00100000
0x060: 1100f00f 01e1782d 00000000 00000000 00000005 000f77c0 b0f243b9 
7a36d743.
  No interrupt sources are pending.
The chip configuration is 0x10 0x0d, MII half-duplex mode.
Decoded EEPROM contents:
   PCI IDs -- Vendor 0x10ec, Device 0x8139.
   PCI Subsystem IDs -- Vendor 0x10ec, Device 0x8139.
   PCI timer settings -- minimum grant 32, maximum latency 64.
  General purpose pins --  direction 0xe1  value 0x13.
  Station Address 00:06:4F:01:A2:9B.
  Configuration register 0/1 -- 0x0d / 0xc2.
EEPROM active region checksum is 08d3.
EEPROM contents (64 words):
0x00:  8129 10ec 8139 10ec 8139 4020 e113 0600
0x08:  014f 9ba2 0d10 f7c2 8801 43b9 b0f2 071a
0x10:  df43 8a36 df43 8a36 43b9 b0f2 1111 1111
0x18:  0000 0000 0000 0000 0000 0000 0000 0000
0x20:  0000 0000 0000 0000 0000 0000 0000 0000
0x28:  0000 0000 0000 0000 0000 0000 0000 0000
0x30:  0000 0000 0000 0000 0000 0000 0000 0000
0x38:  0000 0000 0000 0000 0000 0000 0000 0000

[root]# ./rtl8139-diag -m
rtl8139-diag.c:v2.06 3/22/2002 Donald Becker (becker@scyld.com)
http://www.scyld.com/diag/index.html
Index #1: Found a RealTek RTL8139 adapter at 0xd000.
The RTL8139 does not use a MII transceiver.
It does have internal MII-compatible registers:
   Basic mode control register   0x1100.
   Basic mode status register    0x782d.
   Autonegotiation Advertisement 0x01e1.
   Link Partner Ability register 0x0000.
   Autonegotiation expansion     0x0000.
   Disconnects                   0x0000.
   False carrier sense counter   0x0000.
   NWay test register            0x0005.
   Receive frame error count     0x0000.

[root@amcnip]# dmesg|grep 8139
8139too Fast Ethernet driver 0.9.18a
PCI: Enabling device 02:0b.0 (0004 -> 0007)
PCI: Found IRQ 9 for device 02:0b.0
PCI: Sharing IRQ 9 with 00:1f.4
eth0: RealTek RTL8139 Fast Ethernet at 0xe0988000, 00:06:4f:01:a2:9b, IRQ 9
eth0:  Identified 8139 chip type 'RTL-8139C'
eth0: Setting half-duplex based on auto-negotiated partner ability 0000.

And finally:

[root]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:06:4F:01:A2:9B
          inet addr:145.117.11.40  Bcast:145.117.63.255  Mask:255.255.192.0
          UP BROADCAST NOTRAILERS RUNNING  MTU:1500  Metric:1
          RX packets:237382 errors:242 dropped:0 overruns:0 frame:0
          TX packets:3166 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:30248383 (28.8 Mb)  TX bytes:349563 (341.3 Kb)
          Interrupt:9 Base address:0x8000



_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com