3 * New style setup code for the network devices
6 #include <linux/config.h>
7 #include <linux/netdevice.h>
8 #include <linux/errno.h>
9 #include <linux/init.h>
10 #include <linux/netlink.h>
12 extern int slip_init_ctrl_dev(void);
13 extern int x25_asy_init_ctrl_dev(void);
15 extern int dmascc_init(void);
17 extern int awc4500_pci_probe(void);
18 extern int awc4500_isa_probe(void);
19 extern int awc4500_pnp_probe(void);
20 extern int awc4500_365_probe(void);
21 extern int arcnet_init(void);
22 extern int scc_enet_init(void);
23 extern int fec_enet_init(void);
24 extern int dlci_setup(void);
25 extern int sdla_setup(void);
26 extern int sdla_c_setup(void);
27 extern int comx_init(void);
28 extern int lmc_setup(void);
30 extern int madgemc_probe(void);
31 extern int uml_net_probe(void);
33 /* Pad device name to IFNAMSIZ=16. F.e. __PAD6 is string of 9 zeros. */
34 #define __PAD6 "\0\0\0\0\0\0\0\0\0"
35 #define __PAD5 __PAD6 "\0"
36 #define __PAD4 __PAD5 "\0"
37 #define __PAD3 __PAD4 "\0"
38 #define __PAD2 __PAD3 "\0"
42 * Devices in this list must do new style probing. That is they must
43 * allocate their own device objects and do their own bus scans.
49 int status; /* non-zero if autoprobe has failed */
52 static struct net_probe pci_probes[] __initdata = {
57 #if defined(CONFIG_DMASCC)
60 #if defined(CONFIG_DLCI)
63 #if defined(CONFIG_SDLA)
66 #if defined(CONFIG_ARCNET)
69 #if defined(CONFIG_SCC_ENET)
72 #if defined(CONFIG_FEC_ENET)
75 #if defined(CONFIG_COMX)
79 #if defined(CONFIG_LANMEDIA)
88 #ifdef CONFIG_AIRONET4500_NONCS
90 #ifdef CONFIG_AIRONET4500_PCI
91 {awc4500_pci_probe,0},
94 #ifdef CONFIG_AIRONET4500_PNP
95 {awc4500_pnp_probe,0},
103 #ifdef CONFIG_MADGEMC
106 #ifdef CONFIG_UML_NET
115 * Run the updated device probes. These do not need a device passed
119 static void __init network_probe(void)
121 struct net_probe *p = pci_probes;
123 while (p->probe != NULL)
125 p->status = p->probe();
132 * Initialise the line discipline drivers
135 static void __init network_ldisc_init(void)
137 #if defined(CONFIG_SLIP)
138 slip_init_ctrl_dev();
140 #if defined(CONFIG_X25_ASY)
141 x25_asy_init_ctrl_dev();
146 static void __init special_device_init(void)
148 #ifdef CONFIG_NET_SB1000
150 extern int sb1000_probe(struct net_device *dev);
151 static struct net_device sb1000_dev =
153 "cm0" __PAD3, 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NULL, sb1000_probe
155 register_netdev(&sb1000_dev);
161 * Initialise network devices
164 void __init net_device_init(void)
166 /* Devices supporting the new probing API */
168 /* Line disciplines */
169 network_ldisc_init();
170 /* Special devices */
171 special_device_init();
172 /* That kicks off the legacy init functions */