2 * New style setup code for the network devices
5 #include <linux/config.h>
6 #include <linux/netdevice.h>
7 #include <linux/errno.h>
8 #include <linux/init.h>
9 #include <linux/netlink.h>
11 extern int plip_init(void);
12 extern int mkiss_init_ctrl_dev(void);
13 extern int ppp_init(void);
14 extern int slip_init_ctrl_dev(void);
15 extern int strip_init_ctrl_dev(void);
16 extern int x25_asy_init_ctrl_dev(void);
17 extern int slhc_install(void);
19 extern int bpq_init(void);
20 extern int dmascc_init(void);
21 extern int scc_init(void);
22 extern int yam_init(void);
24 extern int acenic_probe(void);
25 extern int awc4500_pci_probe(void);
26 extern int awc4500_isa_probe(void);
27 extern int awc4500_pnp_probe(void);
28 extern int awc4500_365_probe(void);
29 extern int arcnet_init(void);
30 extern int bigmac_probe(void);
31 extern int bmac_probe(void);
32 extern int cpm_enet_init(void);
33 extern int oaknet_init(void);
34 extern int dlci_setup(void);
35 extern int dgrs_probe(void);
36 extern int dmfe_reg_board(void);
37 extern int eepro100_probe(void);
38 extern int epic100_probe(void);
39 extern int happy_meal_probe(void);
40 extern int lapbeth_init(void);
41 extern int mace_probe(void);
42 extern int myri_sbus_probe(void);
43 extern int ncr885e_probe(void);
44 extern int ne2k_pci_probe(void);
45 extern int pcnet32_probe(void);
46 extern int qec_probe(void);
47 extern int rcpci_probe(void);
48 extern int rr_hippi_probe(void);
49 extern int rtl8139_probe(void);
50 extern int sdla_setup(void);
51 extern int sdla_c_setup(void);
52 extern int sis900_probe(void);
53 extern int skge_probe(void);
54 extern int sparc_lance_probe(void);
55 extern int starfire_probe(void);
56 extern int tc59x_probe(void);
57 extern int tulip_probe(void);
58 extern int via_rhine_probe(void);
59 extern int yellowfin_probe(void);
61 /* Pad device name to IFNAMSIZ=16. F.e. __PAD6 is tring of 9 zeros. */
62 #define __PAD6 "\0\0\0\0\0\0\0\0\0"
63 #define __PAD5 __PAD6 "\0"
64 #define __PAD4 __PAD5 "\0"
65 #define __PAD3 __PAD4 "\0"
66 #define __PAD2 __PAD3 "\0"
70 * Devices in this list must do new style probing. That is they must
71 * allocate their own device objects and do their own bus scans.
77 int status
; /* non-zero if autoprobe has failed */
80 struct net_probe pci_probes
[] __initdata
= {
85 #if defined(CONFIG_SCC)
88 #if defined(CONFIG_DMASCC)
91 #if defined(CONFIG_BPQETHER)
94 #if defined(CONFIG_DLCI)
97 #if defined(CONFIG_SDLA)
100 #if defined(CONFIG_LAPBETHER)
103 #if defined(CONFIG_PLIP)
106 #if defined(CONFIG_ARCNET)
109 #if defined(CONFIG_8xx)
113 * SLHC if present needs attaching so other people see it
114 * even if not opened.
118 #if (defined(CONFIG_SLIP) && defined(CONFIG_SLIP_COMPRESSED)) \
119 || defined(CONFIG_PPP) \
120 || (defined(CONFIG_ISDN) && defined(CONFIG_ISDN_PPP))
127 #ifdef CONFIG_ROADRUNNER
139 #ifdef CONFIG_HAPPYMEAL
140 {happy_meal_probe
, 0},
142 #ifdef CONFIG_SUNLANCE
143 {sparc_lance_probe
, 0},
148 #ifdef CONFIG_SUNBMAC
151 #ifdef CONFIG_MYRI_SBUS
152 {myri_sbus_probe
, 0},
165 #ifdef CONFIG_NCR885E
170 * IBM "Oak" Evaluation board
188 #ifdef CONFIG_NE2K_PCI
191 #ifdef CONFIG_PCNET32
194 #ifdef CONFIG_EEXPRESS_PRO100 /* Intel EtherExpress Pro/100 */
197 #ifdef CONFIG_DEC_ELCP
200 #ifdef CONFIG_EPIC100
203 #ifdef CONFIG_RTL8139
214 #ifdef CONFIG_YELLOWFIN
215 {yellowfin_probe
, 0},
220 #ifdef CONFIG_SK98LIN
223 #ifdef CONFIG_VIA_RHINE
224 {via_rhine_probe
, 0},
226 #ifdef CONFIG_ADAPTEC_STARFIRE
235 #ifdef CONFIG_AIRONET4500_NONCS
237 #ifdef CONFIG_AIRONET4500_PCI
238 {awc4500_pci_probe
,0},
241 #ifdef CONFIG_AIRONET4500_PNP
242 {awc4500_pnp_probe
,0},
247 * Amateur Radio Drivers
252 #endif /* CONFIG_YAM */
260 * Run the updated device probes. These do not need a device passed
264 static void __init
network_probe(void)
266 struct net_probe
*p
= pci_probes
;
268 while (p
->probe
!= NULL
)
270 p
->status
= p
->probe();
277 * Initialise the line discipline drivers
280 static void __init
network_ldisc_init(void)
282 #if defined(CONFIG_SLIP)
283 slip_init_ctrl_dev();
285 #if defined(CONFIG_X25_ASY)
286 x25_asy_init_ctrl_dev();
288 #if defined(CONFIG_MKISS)
289 mkiss_init_ctrl_dev();
291 #if defined(CONFIG_STRIP)
292 strip_init_ctrl_dev();
294 #if defined(CONFIG_PPP)
300 static void __init
appletalk_device_init(void)
302 #if defined(CONFIG_IPDDP)
303 extern int ipddp_init(struct net_device
*dev
);
304 static struct net_device dev_ipddp
= {
308 0, 0, 0, NULL
, ipddp_init
311 dev_ipddp
.init(&dev_ipddp
);
312 #endif /* CONFIG_IPDDP */
317 * The loopback device is global so it can be directly referenced
318 * by the network code.
321 extern int loopback_init(struct net_device
*dev
);
322 struct net_device loopback_dev
=
324 "lo" __PAD2
, /* Software Loopback interface */
325 0x0, /* recv memory end */
326 0x0, /* recv memory start */
327 0x0, /* memory end */
328 0x0, /* memory start */
329 0, /* base I/O address */
332 NULL
, /* next device */
333 loopback_init
/* loopback_init should set up the rest */
336 static void special_device_init(void)
340 extern int dummy_init(struct net_device
*dev
);
341 static struct net_device dummy_dev
= {
342 "dummy" __PAD5
, 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NULL
, dummy_init
,
344 register_netdev(&dummy_dev
);
347 #ifdef CONFIG_EQUALIZER
349 extern int eql_init(struct net_device
*dev
);
350 static struct net_device eql_dev
=
352 "eql" __PAD3
, /* Master device for IP traffic load balancing */
353 0x0, 0x0, 0x0, 0x0, /* recv end/start; mem end/start */
354 0, /* base I/O address */
357 NULL
, /* next device */
358 eql_init
/* set up the rest */
360 register_netdev(&eql_dev
);
365 extern int bif_init(struct net_device
*dev
);
366 static struct net_device bif_dev
=
368 "bif" __PAD3
, 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NULL
, bif_init
370 register_netdev(&bif_dev
);
373 #ifdef CONFIG_NET_SB1000
375 extern int sb1000_probe(struct net_device
*dev
);
376 static struct net_device sb1000_dev
=
378 "cm0", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NULL
, sb1000_probe
380 register_netdev(&sb1000_dev
);
383 register_netdev(&loopback_dev
);
387 * Initialise network devices
390 void __init
net_device_init(void)
392 /* Devices supporting the new probing API */
394 /* Line disciplines */
395 network_ldisc_init();
397 appletalk_device_init();
398 /* Special devices */
399 special_device_init();
400 /* That kicks off the legacy init functions */