trouble with "eth1"

This is a discussion on trouble with "eth1" within the Linux Networking forums, part of the Linux Forums category; hai, recently i have installed a new NIC with chipset "RTL8139D". i have seen modules named "8139cp....


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-14-2006
arnuld
 
Posts: n/a
Default trouble with "eth1"

hai,

recently i have installed a new NIC with chipset "RTL8139D". i have
seen modules named "8139cp.ko" & "8139too.ko" in my
"/lib/modules/2.6.8-2-386/kernel/drivers/net" directory of Debian
Sarge. "TLDP ethernet how to" told me RTL8139 is supported. but this is
what i have:

-----------------------------------------------------------------------------------------------------------
debian:/home/hurd# ifconfig -a

eth0 Link encap:Ethernet HWaddr 00:13:D4:C4:BA:F3
inet addr:192.168.1.2 Bcast:192.168.1.255
Mask:255.255.255.0
inet6 addr: fe80::213:d4ff:fec4:baf3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:420 errors:0 dropped:0 overruns:0 frame:0
TX packets:430 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:326657 (319.0 KiB) TX bytes:54292 (53.0 KiB)
Interrupt:201 Base address:0xa800

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:17559 errors:0 dropped:0 overruns:0 frame:0
TX packets:17559 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2910200 (2.7 MiB) TX bytes:2910200 (2.7 MiB)

sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 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:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

debian:/home/hurd#
--------------------------------------------------------------------------------------------------------------

On-Board ethernet is working fine but i wanted to connect my ADSL modem
to "eth1". where is my "eth1" card? how can i install it?

"arnuld"

Reply With Quote
  #2 (permalink)  
Old 09-14-2006
Pascal Hambourg
 
Posts: n/a
Default Re: trouble with "eth1"

Hello,

arnuld a écrit :
>
> recently i have installed a new NIC with chipset "RTL8139D". i have
> seen modules named "8139cp.ko" & "8139too.ko" in my
> "/lib/modules/2.6.8-2-386/kernel/drivers/net" directory of Debian
> Sarge. "TLDP ethernet how to" told me RTL8139 is supported. but this is
> what i have:
>
> debian:/home/hurd# ifconfig -a

[no eth1]
>
> where is my "eth1" card? how can i install it?


First, check that the RTL8139 adapter is detected at PCI level with
lspci, /proc/ioports or /proc/iomem. Then try to load the module :

# modprobe 8139too

If it works correctly, an interface eth1 should be created for the NIC.
In order to load the module at boot time, if you don't use hotplug (I
guess you don't, else hotplug should have detected the NIC and loaded
the module automagically), add a line containing "8139too" into the file
/etc/modules.
Reply With Quote
  #3 (permalink)  
Old 09-15-2006
arnuld
 
Posts: n/a
Default Re: trouble with "eth1"

Pascal Hambourg wrote:

> > debian:/home/hurd# ifconfig -a

> [no eth1]



> First, check that the RTL8139 adapter is detected at PCI level with
> lspci, /proc/ioports or /proc/iomem. Then try to load the module :


this is the output of "lspci":

debian:/home/hurd# lspci

0000:00:00.0 Host bridge: VIA Technologies, Inc.: Unknown device 0204
0000:00:00.1 Host bridge: VIA Technologies, Inc.: Unknown device 1204
0000:00:00.2 Host bridge: VIA Technologies, Inc.: Unknown device 2204
0000:00:00.3 Host bridge: VIA Technologies, Inc.: Unknown device 3204
0000:00:00.4 Host bridge: VIA Technologies, Inc.: Unknown device 4204
0000:00:00.7 Host bridge: VIA Technologies, Inc.: Unknown device 7204
0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI bridge
[K8T800 South]
0000:00:0b.0 Ethernet controller: Unknown device 1904:2031 (rev 01)
0000:00:0f.0 IDE interface: VIA Technologies, Inc. VIA VT6420 SATA RAID
Controller (rev 80)
0000:00:0f.1 IDE interface: VIA Technologies, Inc.
VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
0000:00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB
1.1 Controller (rev 81)
0000:00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB
1.1 Controller (rev 81)
0000:00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB
1.1 Controller (rev 81)
0000:00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB
1.1 Controller (rev 81)
0000:00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)
0000:00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge
[K8T800 South]
0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc.
VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
0000:00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102
[Rhine-II] (rev 78)
0000:00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 NorthBridge
0000:00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 NorthBridge
0000:00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 NorthBridge
0000:00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 NorthBridge
0000:01:00.0 VGA compatible controller: VIA Technologies, Inc.: Unknown
device 3108 (rev 01)

debian:/home/hurd#


> # modprobe 8139too


it doesnt do anything. cursor simply goes to next line & if then i try
"ifconfig -a" output remains the same as i gave earlier, i mean no
"eth1". i tried both "8139cp" & "8139too".

> If it works correctly, an interface eth1 should be created for the NIC.
> In order to load the module at boot time, if you don't use hotplug (I
> guess you don't, else hotplug should have detected the NIC and loaded
> the module automagically), add a line containing "8139too" into the file
> /etc/modules.


Reply With Quote
  #4 (permalink)  
Old 09-15-2006
Pascal Hambourg
 
Posts: n/a
Default Re: trouble with "eth1"

arnuld a écrit :
>
>>First, check that the RTL8139 adapter is detected at PCI level with
>>lspci, /proc/ioports or /proc/iomem. Then try to load the module :

>
> this is the output of "lspci":
>
> debian:/home/hurd# lspci

[...]
> 0000:00:0b.0 Ethernet controller: Unknown device 1904:2031 (rev 01)

[...]
>># modprobe 8139too

>
> it doesnt do anything.


It looks like your ethernet card does not have the standard PCI ID for a
RTL8139, which is 10EC:8139, nor any known non standard PCI ID. So
neither lspci nor the kernel module identify it. You can try to add this
PCI ID in the kernel source and recompile the module.

In drivers/net/8139too.c, within the rtl8139_pci_tbl definition, you
need to add the following line :

{0x1904, 0x2031, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
Reply With Quote
  #5 (permalink)  
Old 09-15-2006
arnuld
 
Posts: n/a
Default Re: trouble with "eth1"

Pascal Hambourg wrote:
> > 0000:00:0b.0 Ethernet controller: Unknown device 1904:2031 (rev 01)

>
> It looks like your ethernet card does not have the standard PCI ID for a
> RTL8139, which is 10EC:8139, nor any known non standard PCI ID. So
> neither lspci nor the kernel module identify it. You can try to add this
> PCI ID in the kernel source and recompile the module.
>
> In drivers/net/8139too.c, within the rtl8139_pci_tbl definition, you
> need to add the following line :
>
> {0x1904, 0x2031, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },


i am pretty weak at technical aspects but do you want to say that i
need to "recompile the kernel" ?

2nd, my distro Debian Sarge does not have any kernel-source (earlier i
sued "Fedora Core" , it has the source & keeps it in one of the
directories directories by default)

"arnuld"

Reply With Quote
  #6 (permalink)  
Old 09-15-2006
Pascal Hambourg
 
Posts: n/a
Default Re: trouble with "eth1"

arnuld a écrit :
>
> i am pretty weak at technical aspects but do you want to say that i
> need to "recompile the kernel" ?


Yes, or at least recompile the module 8139too.ko.
As an alternate (and somehow ugly) method, you could replace an existing
PCI ID (preferably not the standard one 10ec:8139, you will find the
list in 8139too.c) with the PCI ID of your card in the module binary
file with a hexadecimal editor. Make a copy of the original 8139too.ko
before you try this.

> 2nd, my distro Debian Sarge does not have any kernel-source


Debian provides packaged kernel sources. In sarge the package for the
2.6 kernel source is kernel-source-2.6.8. I assume your current binary
kernel is a 2.6.8 from Debian.
See http://packages.debian.org/stable/de...l-source-2.6.8
The package installs a tarball kernel-source-2.6.8.tar.bz2 containing
the source files.

If you are not comfortable with building kernels, you may try the
alternate method with an hex editor.
Reply With Quote
  #7 (permalink)  
Old 09-15-2006
arnuld
 
Posts: n/a
Default Re: trouble with "eth1"

Pascal Hambourg wrote:

> Yes, or at least recompile the module 8139too.ko.
> As an alternate (and somehow ugly) method, you could replace an existing
> PCI ID (preferably not the standard one 10ec:8139, you will find the
> list in 8139too.c) with the PCI ID of your card in the module binary
> file with a hexadecimal editor. Make a copy of the original 8139too.ko
> before you try this.


i dont have "8139too.c" on my sytsem, all i have are ".ko" files in my
"/lib/modules/2.6.8-2-386/kernel/drivers/net/" directory. where i can
find ".c" files?

> Debian provides packaged kernel sources. In sarge the package for the
> 2.6 kernel source is kernel-source-2.6.8. I assume your current binary
> kernel is a 2.6.8 from Debian.
> See http://packages.debian.org/stable/de...l-source-2.6.8
> The package installs a tarball kernel-source-2.6.8.tar.bz2 containing
> the source files.


ok, i have 2.6.8-2 kernel, the link you provided points to 2.6.8-4,
anyway i will find the kernel-source myself, not a big issue.

> If you are not comfortable with building kernels, you may try the
> alternate method with an hex editor.


i am not comfortable becuase 10-11 months ago i recompiled the kernel
of Fedora Core & my system became tooooo slow to respond & it took 8.5
hours to recompile the kernel. that is why i fear BUT your "Hex edit"
method looks as intuitive as recompiling the kernel.

thanks for your precious time.

"arnuld"

Reply With Quote
  #8 (permalink)  
Old 09-15-2006
Philipp Pagel
 
Posts: n/a
Default Re: trouble with "eth1"

arnuld <arnuld3@gmail.com> wrote:
> Pascal Hambourg wrote:
> i dont have "8139too.c" on my sytsem, all i have are ".ko" files in my
> "/lib/modules/2.6.8-2-386/kernel/drivers/net/" directory. where i can
> find ".c" files?


after installing the kernel-source you will find a tarball in /usr/src.
After unpacking create a symlink:

ln -s kernel-source-2.6.whatever linux

The file is in linux/drivers/net/

Also note that on a Debian system it is best to use make-kpkg to
actually build the kernel. That way you get a self compiled debian
package which you can install with the usual tools.

So you want to do something like this:

# edit the file
cd /usr/src/linux/
# if desired run make menuconfig to customize things - don't for now
make-kpkg --revision custom.1 kernel_image
make-kpkg --revision custom.1 modules_image

If nothing breaks, you will now have your new kernel:

/usr/src/kernel-image-2.6.8_custom.1_i386.deb

and possibly some other debs for additional modules.

install:

dpkg -i kernel-image-2.6.8_custom.1_i386.deb
dpkg -i *-modules-2.6.8+custom.1_i386.deb

or whatever your exact names are.

> i am not comfortable becuase 10-11 months ago i recompiled the kernel
> of Fedora Core & my system became tooooo slow to respond & it took 8.5
> hours to recompile the kernel.


Wow! What kind of hardware was that? Even my old P3-800 notebook is
substantially faster than that...

cu
Philipp

--
Dr. Philipp Pagel Tel. +49-8161-71 2131
Dept. of Genome Oriented Bioinformatics Fax. +49-8161-71 2186
Technical University of Munich
http://mips.gsf.de/staff/pagel
Reply With Quote
  #9 (permalink)  
Old 09-15-2006
arnuld
 
Posts: n/a
Default Re: trouble with "eth1"

Pascal Hambourg wrote:

> Yes, or at least recompile the module 8139too.ko.
> As an alternate (and somehow ugly) method, you could replace an existing
> PCI ID (preferably not the standard one 10ec:8139, you will find the
> list in 8139too.c) with the PCI ID of your card in the module binary
> file with a hexadecimal editor. Make a copy of the original 8139too.ko
> before you try this.


i put a copy of "8139too.ko" on my Desktop & opened it in "Khexedit" &
then in "ghex2" & it looked quite weird to me. i never used any
hex-editor before, anyway i tried "Khexedit" documentation but still i
am not able to compare this ".ko" file with the PCI IDs i have in ".c"
file & *where* replace with *what*? can you help with something.

> See http://packages.debian.org/stable/de...l-source-2.6.8
> The package installs a tarball kernel-source-2.6.8.tar.bz2 containing
> the source files.


i downloaded the 34MB kernel-source from this link in ".deb" form.

> If you are not comfortable with building kernels, you may try the
> alternate method with an hex editor.


i prefer it but it is completely alien to me, i cant even understand
the meaning of ".ko" file opened in a hex-editor

"arnuld"

Reply With Quote
  #10 (permalink)  
Old 09-15-2006
Pascal Hambourg
 
Posts: n/a
Default Re: trouble with "eth1"

arnuld a écrit :
>
>>As an alternate (and somehow ugly) method, you could replace an existing
>>PCI ID (preferably not the standard one 10ec:8139, you will find the
>>list in 8139too.c) with the PCI ID of your card in the module binary
>>file with a hexadecimal editor. Make a copy of the original 8139too.ko
>>before you try this.

>
> i put a copy of "8139too.ko" on my Desktop & opened it in "Khexedit" &
> then in "ghex2" & it looked quite weird to me. i never used any
> hex-editor before, anyway i tried "Khexedit" documentation but still i
> am not able to compare this ".ko" file with the PCI IDs i have in ".c"
> file & *where* replace with *what*? can you help with something.


Sure. First, choose the PCI ID to replace in 8139too.c :

static struct pci_device_id rtl8139_pci_tbl[] = {
{0x10ec, 0x8139, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x10ec, 0x8138, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x1113, 0x1211, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x1500, 0x1360, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x4033, 0x1360, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },

Let's say you're going to replace the VID on the last line shown here,
4033:1360, with the PCI ID of your RTL8139 card, 1904:2031. Open the
copy of 8139too.ko in the hex editor and search for an offset in the
file where the hex numbers 4033 and 1360 are close to each other :

0004f90 0000 0000 0000 0000 1113 0000 1211 0000
0004fa0 ffff ffff ffff ffff 0000 0000 0000 0000
0004fb0 0000 0000 1500 0000 1360 0000 ffff ffff
0004fc0 ffff ffff 0000 0000 0000 0000 0000 0000
0004fd0 4033 0000 1360 0000 ffff ffff ffff ffff
^^^^ ^^^^
Here they are. You can also see in the other lines the numbers for the
other PCI IDs : 1113:1211, 1500:1360. The offsets may vary, the sample
above is from Debian kernel 2.6.8-3-686. The two numbers may be
separated on two consecutive lines.

Now overwrite 4033 with 1904, and 1360 with 2031 so it looks like this :

0004fd0 1904 0000 2031 0000 ffff ffff ffff ffff

and save the file.

If your editor is in 8-bit mode instead of 16-bit mode, you will see this :

00004fd0 33 40 00 00 60 13 00 00 ff ff ff ff ff ff ff ff
^^ ^^ ^^ ^^
It looks a little scrambled, because byte order in 16-bit or 32-bit
words is reversed in little endian.
Overwrite 33, 40, 60, 13 with 04, 19, 31, 20 so it looks like this :

00004fd0 04 19 00 00 31 20 00 00 ff ff ff ff ff ff ff ff

and save the file.

Don't forget to keep a copy of the original 8139too.ko file before
copying the modified into the target directory.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:18 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0