George Gallen wrote:
> modprobe ne io=0x300 on boot gives:
>
> ne.c:v1.10 9/23/94 Donald Becker ([EMAIL PROTECTED])
> NE*000 ethercard probe at 0x300:<4>eth0: interrupt from stopped card
> failed to detect IRQ line.
> ne.c: No NE*000 card found at i/o = 0x300
> /lib/modules/2.2.6/net/ne.o: init_module: Device or resource busy
>
> Yet ifconfig eth0 gives the correct io address, and IRQ and MAC
> and the card functions perfectly, I verified the IRQ and io with
> cating /proc/ioports and /proc/interrupts which both list the
> NE2000 card
What is happening is that you are in effect trying to load the
module twice. The system already has it loaded when you issue
the modprobe command you added. This can happen since there is
no check_region() when the i/o address is supplied - which was
intentional so that in the old days:
LILO: linux reserve=0x320,0x20 ether=0,0x320,eth0
would allow you to protect an ne2000 card from a SCSI probe that
would otherwise hang the system in the old pre-module days of
kitchen-sink kernels. (Several other ISA drivers also have this
same intentional "feature" still...)
In your case the 2nd loading of the driver causes the card to
generate an IRQ during the probing & the 1st instance of the
driver (which loaded okay) reports the unexpected interrupt in
the "<4>eth0: interrupt..." message. The 2nd attempt at loading
then fails when it can't find (& allocate) the IRQ but the 1st
instance of the driver is still installed and operable.
This small patch will solve the problem, but at the expense of
no longer allowing the driver to probe into allocated/reserved
I/O space - probably a non-issue nowadays.
[It might make sense to also have any I/O space that
was claimed via the "reserve=..." boot argument released once
all the boot-time probes have completed.]
Paul.
--- drivers/net/ne.c~ Mon Apr 5 07:21:00 1999
+++ drivers/net/ne.c Wed Sep 29 03:29:35 1999
@@ -182,7 +182,7 @@
int base_addr = dev ? dev->base_addr : 0;
/* First check any supplied i/o locations. User knows best. <cough> */
- if (base_addr > 0x1ff) /* Check a single specified location. */
+ if (base_addr > 0x1ff && check_region(base_addr, NE_IO_EXTENT) == 0)
return ne_probe1(dev, base_addr);
else if (base_addr != 0) /* Don't probe at all. */
return ENXIO;
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]