Hi Bruce,
you wrote:
> Anyway, enough waffling. In Space.c there is a chunk of code (starting at
> line 542) that statically creates a linked list of ethernet devices. The
> device name for all of them is "eth%d". I haven't traced what happens with
> modules, but with a monolithic kernel these names are compared to parameters
> passed on the kernel command line (e.g. ether=12,0x240,eth0 for my ISA
> NE2000 card) to pass the correct cards the correct info. However it doesn't
Where do you get the idea from that it is compared to the entry of the
list one by one. Did you saw the following comment in ./net/core/dev.c
and the implementation of the function?
/**
* netdev_boot_setup_check - check boot time settings
* @dev: the netdevice
*
* Check boot time settings for the device. If device's name is a
* mask (eg. eth%d) and settings are found then this will allocate
* name for the device. The found settings are set for the device
* to be used later in the device probing. Returns 0 if no
settings
* found, 1 if they are.
*/
> make sense to me that you should specify ether=...eth%d for any ethernet
> card (if nothing else, you have no way to distinguish between them). I
You should not name give the parameter ether=...eth%d but ether=...eth0
as usual. The name then will be copied into the device structure taken
from the static list.
> changed the "eth%d"'s in Space.c to eth0, eth1, ... and recompiled, and
> after that it picked up the network card and nothing else has died, so I'm
> guessing that that was the right thing to do.
If you make this change it should not work whenever the card does really
need a parameter since following lines in netdev_boot_setup_check will
throw it out thinking the interface is allready created:
if (__dev_get_by_name(s[i].name)) {
if (!mask)
return 0;
continue;
}
So probably you gave wrong parameters or they did not get parsed
correctly. With your change those wrong parameters got not passed and
the defaults applied.
Michael
|