-
Andrew Morton authored
From: Russell King <rmk+pcmcia@arm.linux.org.uk> This is an *untested* patch (PCMCIA people, please test) to fix initialisation ordering issues in these network device drivers. I don't have the hardware to be able to test these changes, although it passes a modular build without warnings. Andrew - it may be worth sticking these in -mm so they get some visibility via your tree as well. Many of these drivers were calling register_netdev() before they had completed their initialisation. In addition, they were calling register_netdev with the "DEV_CONFIG_PENDING" flag still set, which prevents hotplug scripts from bringing up the interface. Also, we take care to ensure that link->dev is correctly set - this is used to tell the PCMCIA release code if the netdev is currently registered (yes, that's probably racy at present, but lets sort one problem at a time.) I've arranged that all drivers register the netdevice as close as possible to the end of their initialisation, copy the net device's name for cardmgr to pass to it's network scripts, and then print out whatever information the driver wants to. Finally, a note about ibmtr - it seemed to assume that cardmgr wanted "tr0" or "tr1" depending on the base address, and completely ignoring the real device which the netdev layer allocated it. I've assumed that this is wrong (since the netdev name is used in printk messages), and changed it to behave the same as the other drivers.
1eb6501c