Bug 30331 - ethernet module auto-reloading (eepro100) and ifup
ethernet module auto-reloading (eepro100) and ifup
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Michael K. Johnson
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-03-02 12:22 EST by Shane Painter
Modified: 2007-04-18 12:31 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-03-08 14:59:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Shane Painter 2001-03-02 12:22:35 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)


When trying to load e100 instead of eepro100, eepro100 automatially 
inserts into the kernel and brings the ethX up. 

Reproducible: Always
Steps to Reproduce:
1. Configure the network interface. I used the following.

   /etc/sysconfig/network-scripts/iffg-eth0 looks like this.
	DEVICE="eth0"
	IPADDR="192.168.1.1"
	NETMASK="255.255.255.0"
	ONBOOT="yes"
	BOOTPROTO="none"
	IPXNETNUM_802_2=""
	IPXPRIMARY_802_2="no"
	IPXACTIVE_802_2="no"
	IPXNETNUM_802_3=""
	IPXPRIMARY_802_3="no"
	IPXACTIVE_802_3="no"
	IPXNETNUM_ETHERII=""
	IPXPRIMARY_ETHERII="no"
	IPXACTIVE_ETHERII="no"
	IPXNETNUM_SNAP=""
	IPXPRIMARY_SNAP="no"
	IPXACTIVE_SNAP="no"

   /etc/modules.conf looks like this.
	alias scsi_hostadapter aic7xxx
	alias parport_lowlevel parport_pc
	alias usb-controller usb-ohci
	alias eth0 eepro100

2. Restart the network and you get the following.

	[root@opal /root]# /etc/rc.d/init.d/network restart
	eepro100.c:v1.09j-t 9/29/99 Donald Becker 
http://cesdis.gsfc.nasa.gov/linux/drivers/eepro100.html
	eepro100.c: $Revision: 1.36 $ 2000/11/17 Modified by Andrey V. 
Savochkin <saw@saw.sw.com.sg> and others

3. Look at the loaded modules.

	[root@opal /root]# lsmod
	Module                  Size  Used by
	eepro100               17104   1  (autoclean)
	autofs                 11728   1  (autoclean)
	ipchains               36448   0  (unused)
	usb-ohci               17536   0  (unused)
	usbcore                51632   1  [usb-ohci]
	aic7xxx               135600   3
	sd_mod                 11488   3
	scsi_mod               95840   2  [aic7xxx sd_mod]

4. Stop eth0.

	[root@opal /root]# ifconfig eth0 down

5. Look at the loaded modules. eepro100 is no longer in use.

	Module                  Size  Used by
	eepro100               17104   0  (autoclean)
	autofs                 11728   1  (autoclean)
	ipchains               36448   0  (unused)
	usb-ohci               17536   0  (unused)
	usbcore                51632   1  [usb-ohci]
	aic7xxx               135600   3
	sd_mod                 11488   3
	scsi_mod               95840   2  [aic7xxx sd_mod]

6. Remove eepro100 and look at the modules again. eepro100 is now gone.

	[root@opal /root]# rmmod eepro100
	[root@opal /root]# lsmod
	Module                  Size  Used by
	autofs                 11728   1  (autoclean)
	ipchains               36448   0  (unused)
	usb-ohci               17536   0  (unused)
	usbcore                51632   1  [usb-ohci]
	aic7xxx               135600   3
	sd_mod                 11488   3
	scsi_mod               95840   2  [aic7xxx sd_mod]

7. Attempt to insert the e100 module into the kernel.

	[root@opal /root]# insmod e100
	Using /lib/modules/2.4.1-0.1.9smp/kernel/drivers/net/e100.o
	Intel(R) PRO/100 Fast Ethernet Adapter - Loadable driver, ver 1.5.1
	Copyright (c) 2001 Intel Corporation
	hw init failed
	Failed to initialize e100, instance #0
	/lib/modules/2.4.1-0.1.9smp/kernel/drivers/net/e100.o: 
init_module: No such device
	Hint: insmod errors can be caused by incorrect module parameters, 
including invalid IO or IRQ parameters
	[root@opal /root]# eepro100.c:v1.09j-t 9/29/99 Donald Becker 
http://cesdis.gsfc.nasa.gov/linux/drivers/eepro100.html
	eepro100.c: $Revision: 1.36 $ 2000/11/17 Modified by Andrey V. 
Savochkin <saw@saw.sw.com.sg> and others

8. Note that e100 fails to load and that eepro100 reinserts itself.

9. Look at the loaded modules one more time. eepro100 is back and the 
interface is up again.

	[root@opal /root]# lsmod
	Module                  Size  Used by
	eepro100               17104   1  (autoclean)
	autofs                 11728   1  (autoclean)
	ipchains               36448   0  (unused)
	usb-ohci               17536   0  (unused)
	usbcore                51632   1  [usb-ohci]
	aic7xxx               135600   3
	sd_mod                 11488   3
	scsi_mod               95840   2  [aic7xxx sd_mod]


..
Comment 1 Bill Nottingham 2001-03-02 12:30:19 EST
Hotplug is fun, isn't it?
Comment 2 Trond Eivind Glomsrxd 2001-03-02 12:34:37 EST
Does switching in /etc/conf.modules help?
Comment 3 Shane Painter 2001-03-02 14:13:29 EST
If memory serves me, the answer is yes. On another box I had changed 
modules.conf to reflect e100, and proceeded to load/unload modules without any 
problems.
Comment 4 Bill Nottingham 2001-03-02 14:34:42 EST
what hotplug package do you have installed?
Comment 5 Shane Painter 2001-03-02 14:38:29 EST
Default Wolverine install.
Comment 6 Trond Eivind Glomsrxd 2001-03-02 17:21:32 EST
Could you try the new hotplug RPMs at http://people.redhat.com/teg/ ?
Comment 7 Shane Painter 2001-03-05 14:25:53 EST
I had Thomas (who originally noticed this) download and install the 
latest .src.rpm. This did not seem to make any change in the behavior. What 
next?
Comment 8 Bill Nottingham 2001-03-07 16:42:15 EST
The problem is this:

e100 calls init_etherdev().

It then tries to initialize the hardware. This fails, because you've
already loaded eepro100, which supports power managment and therefore
shut the card down on exit, and the e100 driver doesn't know to turn
the power back on (Intel has confirmed this.) e100 then calls unregister_netdev().

However, the registration event is still there. So hotplug sees that
eth1 has been registered, and tries to bring it up. When the script
is run, there is no eth1 device, so running 'ifup eth1' loads the
module aliased to it, namely eepro100. Wheee.

Jeff Garzik recently posted a patch to l-k to change how network drivers
can allocate devices. This patch (assuming all the drivers, including e100,
were modified to use it) could help alleviate the problem, I think, in
that the registration wouldn't actually be called until the card is ready
to use.

Comment 9 Trond Eivind Glomsrxd 2001-03-08 14:20:15 EST
Kernel problem, then - reassigning.
Comment 10 Trond Eivind Glomsrxd 2001-03-08 14:23:26 EST
Moving to private...
Comment 11 Trond Eivind Glomsrxd 2001-03-08 14:24:08 EST
This still happens on today's tree with 2.4.2-0.1.22, BTW.
Comment 12 Arjan van de Ven 2001-03-08 14:55:31 EST
Does the eepro100 module work ?
Comment 13 Bill Nottingham 2001-03-08 14:59:06 EST
It works fine; it's just that the race is triggered by the fact the e100
driver tries to initialize and fails.
Comment 14 Arjan van de Ven 2001-03-21 05:06:38 EST
Fixed by new driver from Intel

Note You need to log in before you can comment on or make changes to this bug.