Messages in this thread Patch in this message |  | | Date | Sun, 27 Aug 2000 17:29:35 -0400 | From | Paul Gortmaker <> | Subject | Re: 3c507 driver problems |
| |
Eric Chang wrote:
[3c507 module ignores irq=N module parameter...]
> Instead, irq is read from the card! This is an > error in either the driver or the documentation.
A bit of both - the driver shouldn't accept the irq=N parameter if it has no intention of using it. (see following patch against 2.2.17-pre20). Then you would have got an error message immediately telling you what is wrong.
> followed the instructions in the reference for > reconfiguring the gate array state machine to > read-write for that register, and loaded the > up to now unused parameter, and it worked. Even > ifconfig eth0 worked! > > Is this fix of any value to the main branch?
The general rule is that EEPROM configuration stuff should be in a user space tool and not in a driver. (e.g. see wdsetup.c and 3c5x9setup.c)
There is interest in your fix but not for the driver. Take an existing config program like that for the 3c509, (saves you rewriting all the getopt() cruft etc etc) cut the guts out of it and glue your code into it, while adding code to change the i/o base and AUI/BNC/UTP port.
Paul.
--- 3c507.c~ Mon Aug 9 05:06:24 1999 +++ 3c507.c Sun Aug 27 17:14:02 2000 @@ -877,16 +877,13 @@ }; static int io = 0x300; -static int irq = 0; MODULE_PARM(io, "i"); -MODULE_PARM(irq, "i"); int init_module(void) { if (io == 0) printk("3c507: You should not use auto-probing with insmod!\n"); dev_3c507.base_addr = io; - dev_3c507.irq = irq; if (register_netdev(&dev_3c507) != 0) { printk("3c507: register_netdev() returned non-zero.\n"); return -EIO;
_________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |