A basic problem is that whenever a networking device starts up, it tries to be "eth0". This includes the docking station card, the 3COM PCMCIA card and the WaveLAN card. This "works" for the two PCMCIA cards: if one is inserted, it's "eth0" and the second to be inserted in "eth1". It doesn't "work" for the docking station card, which won't work unless it's the only existing device at boot time. So I'm OK if I have no PCMCIA cards installed and I boot docked, and then I insert a PCMCIA card. I'm also OK if I'm not docked. Sigh.
So: how to assign device names to network devices, so I can make sense of it all?
Note: maybe I can use the "devine" tool from Packet Factory to do ARPs to devine the net I'm connected to.
On the laptop, there are 5 networking scenarios that the laptop
needs to gracefully handle. See my grub
page for a list.
At startup, the /etc/rc.d/network is
is responsible for doing ifconfig on each interface,
and perhaps for doing DHCP on each interface. The startup scripts
depend on parameters in the /etc/rc.config file
to control what interfaces get started and how. This scheme
handles whether I'm docked or undocked nicely, with a warning
message during boot if I'm undocked, but no DHCP attempt or boot
failure messages.
To discover if the laptop is docked or not, run an lspci command and scan the output for a line containing "3c905".
Perhaps, to avoid conflicts and confusion about the network interface names, I could make it so:
/etc/modules.conf. Set
alias eth0 3c59x
alias eth1 iforgetwhatwenthere
But I don't have this working! If undocked, eth0 is the PCMCIA Card!
To fix this, you have to use the right driver for the Ethernet interface. By default, Fedora Core 3 will use the e100 driver, and we need to use the recent version of the eepro100 driver. The eepro100 driver is shipped with FC3, it's just not loaded at boot time. I can fix it manually by doing this after booting:
(as root)
(the following deletes the eth0 device)
killall dhclient
ifconfig eth0 down
rmmod e100
(the following creates eth0)
modprobe eepro100
dhclient eth0
Some details about the eepro100 driver can be found at
http://www.scyld.com/driver_updates.html. BTW, I found some
very pertinent information at
http://www.tux.org/hypermail/linux-eepro100/2003-Oct/.
Scyld describes driver module compiling and loading at http://www.scyld.com/modules.html
How to get the laptop to automatically use eepro100 instead of e100 at boot time? I tried editing /etc/modules.conf and changing the line that says
alias eth0 e100
to
alias eth0 eepro100
then
depmod
This didn't work, even after I discovered that the system reads
modprobe.conf, not modules.conf. I got it to where an "lsmod"
showed both e100 and eepro100 on the same line, but I couldn't get
rid of the e100, so I put
rmmod e100
in /etc/rc.local. Yuk, but it works.
So I went to the
scyld site and got the most recent versions of
eepro100.c, kern_compat.h,
pci-scan.c and pci-scan.h. I
put them into the directory that contained the stuff that came
from EmperorLinux, to take advantage of the Makefile that came
from EmperorLinux. I ran make, which compiled
them and installed the new module in
/lib/modules/2.4.19-emp_2419p5a829i/kernel/drivers/net/eepro100_scyld.o.
Then I did
rmmod eepro100_scyld
insmod eepro100_scyld
dmesg
This showed
eepro100.c:v1.25 8/27/2002 Donald Becker mailto:becker@scyld.com
http://www.scyld.com/network/eepro100.html
eth0: Intel Pro/100 VE (type 1031) at 0xf893f000, 08:00:46:5E:66:94, IRQ 9.
Board assembly 000000-000, Physical connectors present: RJ45
Primary interface chip i82555 PHY #1.
** The configuration EEPROM enables Sleep Mode.
** This will cause PCI bus errors!
** Update the configuration EEPROM with the eepro100-diag program.
General self-test: passed.
Serial sub-system self-test: passed.
Internal registers self-test: passed.
ROM checksum self-test: passed (0x04f4518b).
So I got and compiled eepro100-diag, and overwrote the existing
version in /usr/sbin/eepro100-diag. But when I
ran it, it said
eepro100-diag.c:v2.11 8/27/2002 Donald Becker (mailto:becker@scyld.com)
http://www.scyld.com/diag/index.html
Index #1: Found a Intel Pro/100 VE (type 1031) adapter at 0x4000.
* A recognized chip has been found, but it does not appear to exist in
* I/O space. Use the '-f' flag to see the register values anyway.
Use '-a' or '-aa' to show device registers,
'-e' to show EEPROM contents, -ee for parsed contents,
or '-m' or '-mm' to show MII management registers.
So I called EmperorLinux.
Dear EmperorLinux Customers,
This message is to let you know that the internal 10/100 ethernet chip in your system may have the sleep bit set, and how you can disable the sleep bit.
Several customers have indicated that their ethernet connections "go to sleep" under certain network layouts (esp. with low-end Cisco hubs). This happens under high load and no load. This is because the sleep bit on the eepro100 is set on the Sony laptop motherboards. If you are not having this problem, you can ignore this e-mail.
If "ifdown eth0; ifup eth0 fixes the network, this is almost certainly the sleep bit in action.
To turn off the sleep bit, run this as root (with the interface up ("ifup eth0")):
eepro100-diag -f -ee -G 0 -w -w
will remove the sleep bit. This should be a permanent fix.
This should work with either the "eepro100" or "eepro100_scyld" kernel modules.
We hope you have found this email beneficial. If have any problems with these instructions please don't hesitate to email support@emperorlinux.com.
We will continue to keep you updated whenever any new features become available on your system.
-- Lincoln