Bug 30331 - ethernet module auto-reloading (eepro100) and ifup
Summary: ethernet module auto-reloading (eepro100) and ifup
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Michael K. Johnson
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-03-02 17:22 UTC by Shane Painter
Modified: 2007-04-18 16:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-03-08 19:59:10 UTC
Embargoed:


Attachments (Terms of Use)

Description Shane Painter 2001-03-02 17:22:35 UTC
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.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.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 17:30:19 UTC
Hotplug is fun, isn't it?

Comment 2 Trond Eivind Glomsrxd 2001-03-02 17:34:37 UTC
Does switching in /etc/conf.modules help?

Comment 3 Shane Painter 2001-03-02 19:13:29 UTC
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 19:34:42 UTC
what hotplug package do you have installed?

Comment 5 Shane Painter 2001-03-02 19:38:29 UTC
Default Wolverine install.

Comment 6 Trond Eivind Glomsrxd 2001-03-02 22:21:32 UTC
Could you try the new hotplug RPMs at http://people.redhat.com/teg/ ?

Comment 7 Shane Painter 2001-03-05 19:25:53 UTC
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 21:42:15 UTC
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 19:20:15 UTC
Kernel problem, then - reassigning.

Comment 10 Trond Eivind Glomsrxd 2001-03-08 19:23:26 UTC
Moving to private...

Comment 11 Trond Eivind Glomsrxd 2001-03-08 19:24:08 UTC
This still happens on today's tree with 2.4.2-0.1.22, BTW.

Comment 12 Arjan van de Ven 2001-03-08 19:55:31 UTC
Does the eepro100 module work ?

Comment 13 Bill Nottingham 2001-03-08 19:59:06 UTC
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 10:06:38 UTC
Fixed by new driver from Intel


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