Commit 775b2356 authored by Stephen Hemminger's avatar Stephen Hemminger

[NET]: Add probe_old_netdevs() hook.

This set of patches is a mixture of Al's work to device initialization,
and some of my own to complete it for all the ether, tr, sbni, and loopback
devices.

The first patch adds the hook for converting old driver initialization
code over to dynamic allocation.

This part extracted from Al viro's set of net driver changes for ethertap.
parent 1a66af8c
...@@ -382,6 +382,12 @@ static int __init ethif_probe(struct net_device *dev) ...@@ -382,6 +382,12 @@ static int __init ethif_probe(struct net_device *dev)
return -ENODEV; return -ENODEV;
} }
/* Statically configured drivers -- order matters here. */
void probe_old_netdevs(void)
{
}
#ifdef CONFIG_SDLA #ifdef CONFIG_SDLA
extern int sdla_init(struct net_device *); extern int sdla_init(struct net_device *);
static struct net_device sdla0_dev = { static struct net_device sdla0_dev = {
......
...@@ -498,6 +498,7 @@ extern struct net_device loopback_dev; /* The loopback */ ...@@ -498,6 +498,7 @@ extern struct net_device loopback_dev; /* The loopback */
extern struct net_device *dev_base; /* All devices */ extern struct net_device *dev_base; /* All devices */
extern rwlock_t dev_base_lock; /* Device list lock */ extern rwlock_t dev_base_lock; /* Device list lock */
extern void probe_old_netdevs(void);
extern int netdev_boot_setup_add(char *name, struct ifmap *map); extern int netdev_boot_setup_add(char *name, struct ifmap *map);
extern int netdev_boot_setup_check(struct net_device *dev); extern int netdev_boot_setup_check(struct net_device *dev);
extern struct net_device *dev_getbyhwaddr(unsigned short type, char *hwaddr); extern struct net_device *dev_getbyhwaddr(unsigned short type, char *hwaddr);
......
...@@ -3098,6 +3098,8 @@ static int __init net_dev_init(void) ...@@ -3098,6 +3098,8 @@ static int __init net_dev_init(void)
dev_boot_phase = 0; dev_boot_phase = 0;
probe_old_netdevs();
open_softirq(NET_TX_SOFTIRQ, net_tx_action, NULL); open_softirq(NET_TX_SOFTIRQ, net_tx_action, NULL);
open_softirq(NET_RX_SOFTIRQ, net_rx_action, NULL); open_softirq(NET_RX_SOFTIRQ, net_rx_action, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment