Messages in this thread | | | From | Paul Gortmaker <> | Subject | Re: 1.99.14 & duplicate NE2000 | Date | Sun, 9 Jun 1996 14:26:30 +1000 (EST) |
| |
- From: Herbert Rosmanith (herp@wildsau.idv.uni-linz.ac.at) Sat, 8 Jun 1996 20:56:53 +0200 (MET DST)
> insmod /lib/modules/1.99.14./net/ne.o io=0x340 > this is of course not correct. 0x340 is already being used by eth0.
Yes, you can force the ne module on top of an already in-kernel driver. And you can re-load the module on top of the other module as well to get you an eth3, eth4 and so on. It isn't limited to the ne driver. It isn't even limited to ethernet drivers either. Oh, and it isn't even limited to modules, meaning you can do the same type of insane things at boot as well. (Bet you didn't know you could do this... :-)
----------------------- foobar# cat /proc/cmdline BOOT_IMAGE=test ro root=802 ether=9,0x240,eth0 ether=7,0x240,eth1 ether=5,0x240, eth2 foobar# dmesg|grep WD8 eth0: WD80x3 at 0x240, 00 00 C0 4E DC 52 WD8003, IRQ 9, shared memory at 0xe800 0-0xe9fff. eth1: WD80x3 at 0x240, 00 00 C0 4E DC 52 WD8003, IRQ 7, shared memory at 0xe800 0-0xe9fff. eth2: WD80x3 at 0x240, 00 00 C0 4E DC 52 WD8003, IRQ 5, shared memory at 0xe800 0-0xe9fff. foobar# -----------------------
No, this is *NOT* a bug. It is a feature. The "reserve=" boot keyword, which blocks i/o space autoprobes for the specified region relies on this feature, and won't work without it. Consider the following:
linux reserve=0x300,0x20 ether=0,0x300,eth0
which Joe Average uses to stop some driver probe from hanging when touching his ethercard at 0x300.
The "reserve=" doesn't do any magic. It just puts a dummy entry (a placeholder) into the ioport table, which will block all auto-probes that do a check_region(0x300,0x?). When the ether probe comes up, it sees that it has a specific i/o given to it, and skips the check_region() call (this is called "trusting the operator to do sane things") -- By skipping the check, it doesn't get blocked by the dummy ioport table entry, and instead overwrites the reserve ioport entry with its own ioport entry.
And no, you can't put a check_region() in the init_module() either, as the user may boot with reserve=0x300,0x20 and then later want to insmod a driver at 0x300, which would be blocked if you did that.
Paul.
| |