Messages in this thread | | | Date | Mon, 14 Aug 2000 02:10:07 +0200 | From | Guest section DW <> | Subject | Re: devfs / eth micro-problems |
| |
On Sun, Aug 13, 2000 at 04:25:44PM +0100, Alan Cox wrote:
> > ethernet cards had interchanged names. And indeed, > > if I am not mistaken the 2.4.0-test2 change to eth_setup > > causes the familiar ether=0,0,eth1 boot parameter to > > assign the eth1 name to the first detected card. > > I am inclined to consider this a buglet - > > Yes it would be a bug if so. It is meant to precisely emulate the old > behaviour.
Ha, Alan - I see that you wrote to aeb@cwi.nl, but since halfway this afternoon that site seems to be down, and also elsewhere there are problems, but this guest account still works.
"It is meant to precisely emulate" - yes, but it doesn't.
Old situation: For ethernet cards, drivers call init_etherdev(NULL, sz); drivers/net/net_init.c:init_etherdev() then calls init_netdev(NULL, sz, "eth%d", ether_setup); and this allocates space in init_alloc_dev(), and then takes the first unused name in dev_alloc_name(), then calls the setup function. Thus, the name is assigned already when the setup function is called, and the name assigned is independent of boot parameters.
New situation: Before allocating a name, init_netdev calls netdev_boot_setup_check and this does some extremely ugly junk. If the kernel was booted with parameters for eth5 then this routine will assume that the first card seen is called eth5 and assign the name and parameters to this card. Thus, in the new situation the numbering of the cards depends on the boot parameters.
Indeed, a bug.
[Another strange thing is that net/ethernet/eth.c:eth_setup() is precisely identical to net/core/dev.c:netdev_boot_setup(). It is __init, but still..]
Now this stuff by Pekka Riikonen was no doubt meant to fix something, but I don't know what, so I'll wait with sending a patch.
Andries
[PS - I keep a linux-kernel mail archive by copying, each time I want to look at it, the recent stuff from some archive site. Presently the only place I know about that keeps unadulterated mails (no HTML junk added) is ftp://ftp.uwsg.indiana.edu/mail.archive/kernel but unfortunately I see that they threw out everything before July 1st. No doubt someone can point me to a place that has June 2000?]
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |