lunes, 4 de mayo de 2009

Encore RTL8139D not working, solved

Today I bought two Encore ENL832-TX-RENT ethernet cards with the RTL8139D chipset in it. I now that this cheap cards tend to work out-of-the-box... but that wasn't my case:

root@luna:/home/lisandro# ifconfig eth1 up 192.168.1.5
eth1: ERROR while getting interface flags: No existe el dispositivo
SIOCSIFADDR: No existe el dispositivo
eth1: ERROR while getting interface flags: No existe el dispositivo

This card was the second ethernet card in my box. But it wasn't working. So, the first step was to run lspci, and I got:

03:05.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

I learnt (actually, refreshed) that the card is be supported by the 8139cp or the 8139too kernel modules. Running dmesg | grep eth I coould learn that my card was supported by the 8139too modules, and that it was configured as eth1.

Next step: rmmod 8139too ; modprobe -v 8139too. Voilà, it worked. But now my card was listed as eth3 :S

I asked in #lugfi, and the solution came from Traveler: check /etc/udev/rules.d/70-persistent-net.rules. In fact, there was the problem: the firewire port of my motherboard was "remembered" by udev as eth1. I changed the definition of the firewire port to eth2, removed the definitions of the rest of the cards (except eth0), rebooted, and everything went smooth :-)