2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
6 * Holds initial configuration information for devices.
8 * Version: @(#)Space.c 1.0.7 08/12/93
10 * Authors: Ross Biro, <bir7@leland.Stanford.Edu>
11 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
12 * Donald J. Becker, <becker@super.org>
15 * Arnaldo Carvalho de Melo <acme@conectiva.com.br> - 09/1999
16 * - fix sbni: s/device/net_device/
17 * Paul Gortmaker (06/98):
18 * - sort probes in a sane way, make sure all (safe) probes
19 * get run once & failed autoprobes don't autoprobe again.
22 * Phase out placeholder dev entries put in the linked list
23 * here in favour of drivers using init_etherdev(NULL, ...)
24 * combined with a single find_all_devs() function (for 2.3)
26 * This program is free software; you can redistribute it and/or
27 * modify it under the terms of the GNU General Public License
28 * as published by the Free Software Foundation; either version
29 * 2 of the License, or (at your option) any later version.
31 #include <linux/config.h>
32 #include <linux/netdevice.h>
33 #include <linux/errno.h>
34 #include <linux/init.h>
35 #include <linux/netlink.h>
40 /* A unified ethernet device probe. This is the easiest way to have every
41 ethernet adaptor have the name "eth[0123...]".
44 extern int ne2_probe(struct net_device
*dev
);
45 extern int tulip_probe(struct net_device
*dev
);
46 extern int hp100_probe(struct net_device
*dev
);
47 extern int ultra_probe(struct net_device
*dev
);
48 extern int ultra32_probe(struct net_device
*dev
);
49 extern int ultramca_probe(struct net_device
*dev
);
50 extern int wd_probe(struct net_device
*dev
);
51 extern int el2_probe(struct net_device
*dev
);
52 extern int ne2k_pci_probe(struct net_device
*dev
);
53 extern int ne_probe(struct net_device
*dev
);
54 extern int hp_probe(struct net_device
*dev
);
55 extern int hp_plus_probe(struct net_device
*dev
);
56 extern int znet_probe(struct net_device
*);
57 extern int express_probe(struct net_device
*);
58 extern int eepro_probe(struct net_device
*);
59 extern int eepro100_probe(struct net_device
*);
60 extern int el3_probe(struct net_device
*);
61 extern int at1500_probe(struct net_device
*);
62 extern int pcnet32_probe(struct net_device
*);
63 extern int at1700_probe(struct net_device
*);
64 extern int fmv18x_probe(struct net_device
*);
65 extern int eth16i_probe(struct net_device
*);
66 extern int depca_probe(struct net_device
*);
67 extern int i82596_probe(struct net_device
*);
68 extern int ewrk3_probe(struct net_device
*);
69 extern int de4x5_probe(struct net_device
*);
70 extern int el1_probe(struct net_device
*);
71 extern int wavelan_probe(struct net_device
*);
72 extern int arlan_probe(struct net_device
*);
73 extern int el16_probe(struct net_device
*);
74 extern int elmc_probe(struct net_device
*);
75 extern int skmca_probe(struct net_device
*);
76 extern int elplus_probe(struct net_device
*);
77 extern int ac3200_probe(struct net_device
*);
78 extern int es_probe(struct net_device
*);
79 extern int lne390_probe(struct net_device
*);
80 extern int ne3210_probe(struct net_device
*);
81 extern int e2100_probe(struct net_device
*);
82 extern int ni5010_probe(struct net_device
*);
83 extern int ni52_probe(struct net_device
*);
84 extern int ni65_probe(struct net_device
*);
85 extern int sonic_probe(struct net_device
*);
86 extern int SK_init(struct net_device
*);
87 extern int seeq8005_probe(struct net_device
*);
88 extern int tc59x_probe(struct net_device
*);
89 extern int dgrs_probe(struct net_device
*);
90 extern int smc_init( struct net_device
* );
91 extern int sparc_lance_probe(struct net_device
*);
92 extern int happy_meal_probe(struct net_device
*);
93 extern int qec_probe(struct net_device
*);
94 extern int bigmac_probe(struct net_device
*);
95 extern int myri_sbus_probe(struct net_device
*);
96 extern int sgiseeq_probe(struct net_device
*);
97 extern int atarilance_probe(struct net_device
*);
98 extern int sun3lance_probe(struct net_device
*);
99 extern int a2065_probe(struct net_device
*);
100 extern int ariadne_probe(struct net_device
*);
101 extern int ariadne2_probe(struct net_device
*);
102 extern int hydra_probe(struct net_device
*);
103 extern int apne_probe(struct net_device
*);
104 extern int bionet_probe(struct net_device
*);
105 extern int pamsnet_probe(struct net_device
*);
106 extern int tlan_probe(struct net_device
*);
107 extern int mace_probe(struct net_device
*);
108 extern int bmac_probe(struct net_device
*);
109 extern int ncr885e_probe(struct net_device
*);
110 extern int cs89x0_probe(struct net_device
*dev
);
111 extern int ethertap_probe(struct net_device
*dev
);
112 extern int ether1_probe (struct net_device
*dev
);
113 extern int ether3_probe (struct net_device
*dev
);
114 extern int etherh_probe (struct net_device
*dev
);
115 extern int am79c961_probe(struct net_device
*dev
);
116 extern int epic100_probe(struct net_device
*dev
);
117 extern int rtl8139_probe(struct net_device
*dev
);
118 extern int sis900_probe(struct net_device
*dev
);
119 extern int hplance_probe(struct net_device
*dev
);
120 extern int bagetlance_probe(struct net_device
*);
121 extern int dec_lance_probe(struct net_device
*);
122 extern int mvme147lance_probe(struct net_device
*dev
);
123 extern int via_rhine_probe(struct net_device
*dev
);
124 extern int tc515_probe(struct net_device
*dev
);
125 extern int lance_probe(struct net_device
*dev
);
126 extern int starfire_probe(struct net_device
*dev
);
127 extern int rcpci_probe(struct net_device
*);
128 extern int mac_onboard_sonic_probe(struct net_device
*dev
);
129 extern int dmfe_reg_board(struct net_device
*);
131 /* Gigabit Ethernet adapters */
132 extern int yellowfin_probe(struct net_device
*dev
);
133 extern int acenic_probe(struct net_device
*dev
);
135 /* Detachable devices ("pocket adaptors") */
136 extern int atp_init(struct net_device
*);
137 extern int de600_probe(struct net_device
*);
138 extern int de620_probe(struct net_device
*);
141 extern int dfx_probe(struct net_device
*dev
);
142 extern int apfddi_init(struct net_device
*dev
);
145 extern int rr_hippi_probe(struct net_device
*);
147 /* Fibre Channel adapters */
148 extern int iph5526_probe(struct net_device
*dev
);
151 extern int sbni_probe(struct net_device
*);
155 int (*probe
)(struct net_device
*dev
);
156 int status
; /* non-zero if autoprobe has failed */
160 * probe_list walks a list of probe functions and calls each so long
161 * as a non-zero ioaddr is given, or as long as it hasn't already failed
162 * to find a card in the past (as recorded by "status") when asked to
163 * autoprobe (i.e. a probe that fails to find a card when autoprobing
164 * will not be asked to autoprobe again). It exits when a card is found.
166 static int __init
probe_list(struct net_device
*dev
, struct devprobe
*plist
)
168 struct devprobe
*p
= plist
;
169 unsigned long base_addr
= dev
->base_addr
;
171 while (p
->probe
!= NULL
) {
172 if (base_addr
&& p
->probe(dev
) == 0) /* probe given addr */
174 else if (p
->status
== 0) { /* has autoprobe failed yet? */
175 p
->status
= p
->probe(dev
); /* no, try autoprobe */
185 * If your probe touches ISA ports (<0x400) in addition to
186 * looking for PCI cards, then put it in the isa_probes
189 struct devprobe pci_probes
[] __initdata
= {
199 #ifdef CONFIG_NE2K_PCI
202 #ifdef CONFIG_PCNET32
205 #ifdef CONFIG_EEXPRESS_PRO100 /* Intel EtherExpress Pro/100 */
208 #ifdef CONFIG_DEC_ELCP
211 #ifdef CONFIG_DE4X5 /* DEC DE425, DE434, DE435 adapters */
217 #ifdef CONFIG_EPIC100
220 #ifdef CONFIG_RTL8139
231 #ifdef CONFIG_YELLOWFIN
232 {yellowfin_probe
, 0},
237 #ifdef CONFIG_VIA_RHINE
238 {via_rhine_probe
, 0},
240 #ifdef CONFIG_ADAPTEC_STARFIRE
247 * This is a bit of an artificial separation as there are PCI drivers
248 * that also probe for EISA cards (in the PCI group) and there are ISA
249 * drivers that probe for EISA cards (in the ISA group). These are the
250 * EISA only driver probes.
252 struct devprobe eisa_probes
[] __initdata
= {
253 #ifdef CONFIG_ULTRA32
271 struct devprobe sparc_probes
[] __initdata
= {
272 #ifdef CONFIG_HAPPYMEAL
273 {happy_meal_probe
, 0},
275 #ifdef CONFIG_SUNLANCE
276 {sparc_lance_probe
, 0},
281 #ifdef CONFIG_SUNBMAC
284 #ifdef CONFIG_MYRI_SBUS
285 {myri_sbus_probe
, 0},
290 struct devprobe mca_probes
[] __initdata
= {
291 #ifdef CONFIG_ULTRAMCA
294 #ifdef CONFIG_NE2_MCA
297 #ifdef CONFIG_ELMC /* 3c523 */
300 #ifdef CONFIG_SKMC /* SKnet Microchannel */
307 * ISA probes that touch addresses < 0x400 (including those that also
308 * look for EISA/PCI/MCA cards in addition to ISA cards).
310 struct devprobe isa_probes
[] __initdata
= {
311 #ifdef CONFIG_EL3 /* ISA, EISA, MCA 3c5x9 */
314 #ifdef CONFIG_HP100 /* ISA, EISA & PCI */
326 #ifdef CONFIG_EL2 /* 3c503 */
332 #ifdef CONFIG_HPLAN_PLUS
335 #ifdef CONFIG_E2100 /* Cabletron E21xx series. */
338 #ifdef CONFIG_NE2000 /* ISA (use ne2k-pci for PCI cards) */
341 #ifdef CONFIG_LANCE /* ISA/VLB (use pcnet32 for PCI cards) */
344 #ifdef CONFIG_SMC9194
347 #ifdef CONFIG_SEEQ8005
359 #ifdef CONFIG_FMV18X /* Fujitsu FMV-181/182 */
363 {eth16i_probe
, 0}, /* ICL EtherTeam 16i/32 */
365 #ifdef CONFIG_ZNET /* Zenith Z-Note and some IBM Thinkpads. */
368 #ifdef CONFIG_EEXPRESS /* Intel EtherExpress */
371 #ifdef CONFIG_EEXPRESS_PRO /* Intel EtherExpress Pro/10 */
374 #ifdef CONFIG_DEPCA /* DEC DEPCA */
377 #ifdef CONFIG_EWRK3 /* DEC EtherWORKS 3 */
380 #if defined(CONFIG_APRICOT) || defined(CONFIG_MVME16x_NET) || defined(CONFIG_BVME6000_NET) /* Intel I82596 */
383 #ifdef CONFIG_EL1 /* 3c501 */
386 #ifdef CONFIG_WAVELAN /* WaveLAN */
389 #ifdef CONFIG_ARLAN /* Aironet */
392 #ifdef CONFIG_EL16 /* 3c507 */
395 #ifdef CONFIG_ELPLUS /* 3c505 */
413 struct devprobe parport_probes
[] __initdata
= {
414 #ifdef CONFIG_DE600 /* D-Link DE-600 adapter */
417 #ifdef CONFIG_DE620 /* D-Link DE-620 adapter */
420 #ifdef CONFIG_ATP /* AT-LAN-TEC (RealTek) pocket adaptor. */
426 struct devprobe m68k_probes
[] __initdata
= {
427 #ifdef CONFIG_ATARILANCE /* Lance-based Atari ethernet boards */
428 {atarilance_probe
, 0},
430 #ifdef CONFIG_SUN3LANCE /* sun3 onboard Lance chip */
431 {sun3lance_probe
, 0},
433 #ifdef CONFIG_A2065 /* Commodore/Ameristar A2065 Ethernet Board */
436 #ifdef CONFIG_ARIADNE /* Village Tronic Ariadne Ethernet Board */
439 #ifdef CONFIG_ARIADNE2 /* Village Tronic Ariadne II Ethernet Board */
442 #ifdef CONFIG_HYDRA /* Hydra Systems Amiganet Ethernet board */
445 #ifdef CONFIG_APNE /* A1200 PCMCIA NE2000 */
448 #ifdef CONFIG_ATARI_BIONET /* Atari Bionet Ethernet board */
451 #ifdef CONFIG_ATARI_PAMSNET /* Atari PAMsNet Ethernet board */
454 #ifdef CONFIG_HPLANCE /* HP300 internal Ethernet */
457 #ifdef CONFIG_MVME147_NET /* MVME147 internal Ethernet */
458 {mvme147lance_probe
, 0},
460 #ifdef CONFIG_MACSONIC /* Mac 68k Quadra builtin Ethernet */
461 {mac_onboard_sonic_probe
, 0},
466 struct devprobe ppc_probes
[] __initdata
= {
473 #ifdef CONFIG_NCR885E
479 struct devprobe sgi_probes
[] __initdata
= {
480 #ifdef CONFIG_SGISEEQ
486 struct devprobe mips_probes
[] __initdata
= {
487 #ifdef CONFIG_MIPS_JAZZ_SONIC
490 #ifdef CONFIG_DECLANCE /* DECstation on-board controller */
491 {dec_lance_probe
, 0}, /* and maybe TURBOchannel option boards */
493 #ifdef CONFIG_BAGETLANCE /* Lance-based Baget ethernet boards */
494 {bagetlance_probe
, 0},
499 struct devprobe arm_probes
[] __initdata
= {
500 #ifdef CONFIG_ARM_ETHERH
503 #ifdef CONFIG_ARM_ETHER3
506 #ifdef CONFIG_ARM_ETHER1
509 #ifdef CONFIG_ARM_AM79C961A
516 * Unified ethernet device probe, segmented per architecture and
519 static int __init
ethif_probe(struct net_device
*dev
)
521 unsigned long base_addr
= dev
->base_addr
;
524 * Backwards compatibility - historically an I/O base of 1 was
525 * used to indicate not to probe for this ethN interface
528 return 1; /* ENXIO */
531 * The arch specific probes are 1st so that any on-board ethernet
532 * will be probed before other ISA/EISA/MCA/PCI bus cards.
534 if (probe_list(dev
, arm_probes
) == 0)
536 if (probe_list(dev
, m68k_probes
) == 0)
538 if (probe_list(dev
, mips_probes
) == 0)
540 if (probe_list(dev
, ppc_probes
) == 0)
542 if (probe_list(dev
, sgi_probes
) == 0)
544 if (probe_list(dev
, sparc_probes
) == 0)
546 if (probe_list(dev
, pci_probes
) == 0)
548 if (probe_list(dev
, eisa_probes
) == 0)
550 if (probe_list(dev
, mca_probes
) == 0)
553 * Backwards compatibility - an I/O of 0xffe0 was used to indicate
554 * that we shouldn't do a bunch of potentially risky ISA probes
555 * for ethN (N>1). Since the widespread use of modules, *nobody*
556 * compiles a kernel with all the ISA drivers built in anymore,
557 * and so we should delete this check in linux 2.3 - Paul G.
559 if (base_addr
!= 0xffe0 && probe_list(dev
, isa_probes
) == 0)
561 if (probe_list(dev
, parport_probes
) == 0)
567 static int __init
fddiif_probe(struct net_device
*dev
)
569 unsigned long base_addr
= dev
->base_addr
;
572 return 1; /* ENXIO */
582 return 1; /* -ENODEV or -EAGAIN would be more accurate. */
589 static int hippi_probe(struct net_device
*dev
)
594 * Why the heck would we want to determine this from the base
595 * address? Stupid PC'ism .... grrrrr.
597 if (dev
->base_addr
== -1)
601 #ifdef CONFIG_ROADRUNNER
602 && rr_hippi_probe(dev
)
605 return 1; /* -ENODEV or -EAGAIN would be more accurate. */
611 /* Pad device name to IFNAMSIZ=16. F.e. __PAD6 is tring of 9 zeros. */
612 #define __PAD6 "\0\0\0\0\0\0\0\0\0"
613 #define __PAD5 __PAD6 "\0"
614 #define __PAD4 __PAD5 "\0"
615 #define __PAD3 __PAD4 "\0"
616 #define __PAD2 __PAD3 "\0"
620 static int fcif_probe(struct net_device
*dev
)
622 if (dev
->base_addr
== -1)
626 #ifdef CONFIG_IPHASE5526
627 && iph5526_probe(dev
)
630 return 1; /* -ENODEV or -EAGAIN would be more accurate. */
634 #endif /* CONFIG_NET_FC */
637 #ifdef CONFIG_ETHERTAP
638 static struct net_device tap0_dev
= { "tap0" __PAD4
, 0, 0, 0, 0, NETLINK_TAPBASE
, 0, 0, 0, 0, NEXT_DEV
, ethertap_probe
, };
640 # define NEXT_DEV (&tap0_dev)
644 extern int sdla_init(struct net_device
*);
645 static struct net_device sdla0_dev
= { "sdla0" __PAD5
, 0, 0, 0, 0, 0, 0, 0, 0, 0, NEXT_DEV
, sdla_init
, };
648 # define NEXT_DEV (&sdla0_dev)
651 #if defined(CONFIG_LTPC)
652 extern int ltpc_probe(struct net_device
*);
653 static struct net_device dev_ltpc
= {
657 0, 0, 0, NEXT_DEV
, ltpc_probe
};
659 # define NEXT_DEV (&dev_ltpc)
662 #if defined(CONFIG_COPS)
663 extern int cops_probe(struct net_device
*);
664 static struct net_device cops2_dev
= { "lt2" __PAD3
, 0, 0, 0, 0, 0x0, 0, 0, 0, 0, NEXT_DEV
, cops_probe
};
665 static struct net_device cops1_dev
= { "lt1" __PAD3
, 0, 0, 0, 0, 0x0, 0, 0, 0, 0, &cops2_dev
, cops_probe
};
666 static struct net_device cops0_dev
= { "lt0" __PAD3
, 0, 0, 0, 0, 0x0, 0, 0, 0, 0, &cops1_dev
, cops_probe
};
668 # define NEXT_DEV (&cops0_dev)
671 #if defined(CONFIG_IPDDP)
672 extern int ipddp_init(struct net_device
*dev
);
673 static struct net_device dev_ipddp
= {
677 0, 0, 0, NEXT_DEV
, ipddp_init
};
679 # define NEXT_DEV (&dev_ipddp)
680 #endif /* CONFIG_IPDDP */
682 /* The first device defaults to I/O base '0', which means autoprobe. */
690 /* "eth0" defaults to autoprobe (== 0), other use a base of 0xffe0 (== -0x20),
691 which means "don't do ISA probes". Distributions don't ship kernels with
692 all ISA drivers compiled in anymore, so its probably no longer an issue. */
694 #define ETH_NOPROBE_ADDR 0xffe0
696 static struct net_device eth7_dev
= {
697 "eth7" __PAD4
, 0,0,0,0,ETH_NOPROBE_ADDR
/* I/O base*/, 0,0,0,0, NEXT_DEV
, ethif_probe
};
698 static struct net_device eth6_dev
= {
699 "eth6" __PAD4
, 0,0,0,0,ETH_NOPROBE_ADDR
/* I/O base*/, 0,0,0,0, ð7_dev
, ethif_probe
};
700 static struct net_device eth5_dev
= {
701 "eth5" __PAD4
, 0,0,0,0,ETH_NOPROBE_ADDR
/* I/O base*/, 0,0,0,0, ð6_dev
, ethif_probe
};
702 static struct net_device eth4_dev
= {
703 "eth4" __PAD4
, 0,0,0,0,ETH_NOPROBE_ADDR
/* I/O base*/, 0,0,0,0, ð5_dev
, ethif_probe
};
704 static struct net_device eth3_dev
= {
705 "eth3" __PAD4
, 0,0,0,0,ETH_NOPROBE_ADDR
/* I/O base*/, 0,0,0,0, ð4_dev
, ethif_probe
};
706 static struct net_device eth2_dev
= {
707 "eth2" __PAD4
, 0,0,0,0,ETH_NOPROBE_ADDR
/* I/O base*/, 0,0,0,0, ð3_dev
, ethif_probe
};
708 static struct net_device eth1_dev
= {
709 "eth1" __PAD4
, 0,0,0,0,ETH_NOPROBE_ADDR
/* I/O base*/, 0,0,0,0, ð2_dev
, ethif_probe
};
711 static struct net_device eth0_dev
= {
712 "eth0" __PAD4
, 0, 0, 0, 0, ETH0_ADDR
, ETH0_IRQ
, 0, 0, 0, ð1_dev
, ethif_probe
};
715 # define NEXT_DEV (ð0_dev)
717 #if defined(SLIP) || defined(CONFIG_SLIP)
718 /* To be exact, this node just hooks the initialization
719 routines to the device structures. */
720 extern int slip_init_ctrl_dev(struct net_device
*);
721 static struct net_device slip_bootstrap
= {
722 "slip_proto", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NEXT_DEV
, slip_init_ctrl_dev
, };
724 #define NEXT_DEV (&slip_bootstrap)
727 #if defined(X25_ASY) || defined(CONFIG_X25_ASY)
728 /* To be exact, this node just hooks the initialization
729 routines to the device structures. */
730 extern int x25_asy_init_ctrl_dev(struct net_device
*);
731 static struct net_device x25_asy_bootstrap
= {
732 "x25_proto", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NEXT_DEV
, x25_asy_init_ctrl_dev
, };
734 #define NEXT_DEV (&x25_asy_bootstrap)
737 #if defined(CONFIG_MKISS)
738 /* To be exact, this node just hooks the initialization
739 routines to the device structures. */
740 extern int mkiss_init_ctrl_dev(struct net_device
*);
741 static struct net_device mkiss_bootstrap
= {
742 "mkiss_proto", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NEXT_DEV
, mkiss_init_ctrl_dev
, };
744 #define NEXT_DEV (&mkiss_bootstrap)
747 #if defined(CONFIG_YAM)
748 extern int yam_init(struct net_device
*);
749 static struct net_device yam_bootstrap
= {
750 "yam", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NEXT_DEV
, yam_init
, };
752 #define NEXT_DEV (&yam_bootstrap)
753 #endif /* CONFIG_YAM */
755 #if defined(CONFIG_STRIP)
756 extern int strip_init_ctrl_dev(struct net_device
*);
757 static struct net_device strip_bootstrap
= {
758 "strip_proto", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NEXT_DEV
, strip_init_ctrl_dev
, };
760 #define NEXT_DEV (&strip_bootstrap)
763 #if defined(CONFIG_PPP)
764 extern int ppp_init(struct net_device
*);
765 static struct net_device ppp_bootstrap
= {
766 "ppp_proto", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NEXT_DEV
, ppp_init
, };
768 #define NEXT_DEV (&ppp_bootstrap)
772 extern int dummy_init(struct net_device
*dev
);
773 static struct net_device dummy_dev
= {
774 "dummy" __PAD5
, 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NEXT_DEV
, dummy_init
, };
776 # define NEXT_DEV (&dummy_dev)
779 #ifdef CONFIG_EQUALIZER
780 extern int eql_init(struct net_device
*dev
);
781 struct net_device eql_dev
= {
782 "eql" __PAD3
, /* Master device for IP traffic load
784 0x0, 0x0, 0x0, 0x0, /* recv end/start; mem end/start */
785 0, /* base I/O address */
788 NEXT_DEV
, /* next device */
789 eql_init
/* set up the rest */
792 # define NEXT_DEV (&eql_dev)
796 /* Token-ring device probe */
797 extern int ibmtr_probe(struct net_device
*);
798 extern int olympic_probe(struct net_device
*);
799 extern int sktr_probe(struct net_device
*);
802 trif_probe(struct net_device
*dev
)
809 && olympic_probe(dev
)
818 return 1; /* -ENODEV or -EAGAIN would be more accurate. */
822 static struct net_device tr7_dev
= {
823 "tr7" __PAD3
,0,0,0,0,0,0,0,0,0, NEXT_DEV
, trif_probe
};
824 static struct net_device tr6_dev
= {
825 "tr6" __PAD3
,0,0,0,0,0,0,0,0,0, &tr7_dev
, trif_probe
};
826 static struct net_device tr5_dev
= {
827 "tr5" __PAD3
,0,0,0,0,0,0,0,0,0, &tr6_dev
, trif_probe
};
828 static struct net_device tr4_dev
= {
829 "tr4" __PAD3
,0,0,0,0,0,0,0,0,0, &tr5_dev
, trif_probe
};
830 static struct net_device tr3_dev
= {
831 "tr3" __PAD3
,0,0,0,0,0,0,0,0,0, &tr4_dev
, trif_probe
};
832 static struct net_device tr2_dev
= {
833 "tr2" __PAD3
,0,0,0,0,0,0,0,0,0, &tr3_dev
, trif_probe
};
834 static struct net_device tr1_dev
= {
835 "tr1" __PAD3
,0,0,0,0,0,0,0,0,0, &tr2_dev
, trif_probe
};
836 static struct net_device tr0_dev
= {
837 "tr0" __PAD3
,0,0,0,0,0,0,0,0,0, &tr1_dev
, trif_probe
};
839 # define NEXT_DEV (&tr0_dev)
844 static struct net_device fddi7_dev
=
845 {"fddi7" __PAD5
, 0, 0, 0, 0, 0, 0, 0, 0, 0, NEXT_DEV
, fddiif_probe
};
846 static struct net_device fddi6_dev
=
847 {"fddi6" __PAD5
, 0, 0, 0, 0, 0, 0, 0, 0, 0, &fddi7_dev
, fddiif_probe
};
848 static struct net_device fddi5_dev
=
849 {"fddi5" __PAD5
, 0, 0, 0, 0, 0, 0, 0, 0, 0, &fddi6_dev
, fddiif_probe
};
850 static struct net_device fddi4_dev
=
851 {"fddi4" __PAD5
, 0, 0, 0, 0, 0, 0, 0, 0, 0, &fddi5_dev
, fddiif_probe
};
852 static struct net_device fddi3_dev
=
853 {"fddi3" __PAD5
, 0, 0, 0, 0, 0, 0, 0, 0, 0, &fddi4_dev
, fddiif_probe
};
854 static struct net_device fddi2_dev
=
855 {"fddi2" __PAD5
, 0, 0, 0, 0, 0, 0, 0, 0, 0, &fddi3_dev
, fddiif_probe
};
856 static struct net_device fddi1_dev
=
857 {"fddi1" __PAD5
, 0, 0, 0, 0, 0, 0, 0, 0, 0, &fddi2_dev
, fddiif_probe
};
858 static struct net_device fddi0_dev
=
859 {"fddi0" __PAD5
, 0, 0, 0, 0, 0, 0, 0, 0, 0, &fddi1_dev
, fddiif_probe
};
861 #define NEXT_DEV (&fddi0_dev)
865 static struct net_device hip3_dev
=
866 {"hip3" __PAD4
, 0, 0, 0, 0, 0, 0, 0, 0, 0, NEXT_DEV
, hippi_probe
};
867 static struct net_device hip2_dev
=
868 {"hip2" __PAD4
, 0, 0, 0, 0, 0, 0, 0, 0, 0, &hip3_dev
, hippi_probe
};
869 static struct net_device hip1_dev
=
870 {"hip1" __PAD4
, 0, 0, 0, 0, 0, 0, 0, 0, 0, &hip2_dev
, hippi_probe
};
871 static struct net_device hip0_dev
=
872 {"hip0" __PAD4
, 0, 0, 0, 0, 0, 0, 0, 0, 0, &hip1_dev
, hippi_probe
};
875 #define NEXT_DEV (&hip0_dev)
879 extern int bif_init(struct net_device
*dev
);
880 static struct net_device bif_dev
= {
881 "bif" __PAD3
, 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NEXT_DEV
, bif_init
};
883 # define NEXT_DEV (&bif_dev)
888 static struct net_device fc1_dev
= {
889 "fc1", 0, 0, 0, 0, 0, 0, 0, 0, 0, NEXT_DEV
, fcif_probe
};
890 static struct net_device fc0_dev
= {
891 "fc0", 0, 0, 0, 0, 0, 0, 0, 0, 0, &fc1_dev
, fcif_probe
};
893 # define NEXT_DEV (&fc0_dev)
898 static struct net_device sbni7_dev
=
899 {"sbni7", 0, 0, 0, 0, 0, 0, 0, 0, 0, NEXT_DEV
, sbni_probe
};
900 static struct net_device sbni6_dev
=
901 {"sbni6", 0, 0, 0, 0, 0, 0, 0, 0, 0, &sbni7_dev
, sbni_probe
};
902 static struct net_device sbni5_dev
=
903 {"sbni5", 0, 0, 0, 0, 0, 0, 0, 0, 0, &sbni6_dev
, sbni_probe
};
904 static struct net_device sbni4_dev
=
905 {"sbni4", 0, 0, 0, 0, 0, 0, 0, 0, 0, &sbni5_dev
, sbni_probe
};
906 static struct net_device sbni3_dev
=
907 {"sbni3", 0, 0, 0, 0, 0, 0, 0, 0, 0, &sbni4_dev
, sbni_probe
};
908 static struct net_device sbni2_dev
=
909 {"sbni2", 0, 0, 0, 0, 0, 0, 0, 0, 0, &sbni3_dev
, sbni_probe
};
910 static struct net_device sbni1_dev
=
911 {"sbni1", 0, 0, 0, 0, 0, 0, 0, 0, 0, &sbni2_dev
, sbni_probe
};
912 static struct net_device sbni0_dev
=
913 {"sbni0", 0, 0, 0, 0, 0, 0, 0, 0, 0, &sbni1_dev
, sbni_probe
};
916 #define NEXT_DEV (&sbni0_dev)
920 #ifdef CONFIG_NET_SB1000
921 extern int sb1000_probe(struct net_device
*dev
);
922 static struct net_device sb1000_dev
= {
923 "cm0", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NEXT_DEV
, sb1000_probe
};
925 # define NEXT_DEV (&sb1000_dev)
928 extern int loopback_init(struct net_device
*dev
);
929 struct net_device loopback_dev
= {
930 "lo" __PAD2
, /* Software Loopback interface */
931 0x0, /* recv memory end */
932 0x0, /* recv memory start */
933 0x0, /* memory end */
934 0x0, /* memory start */
935 0, /* base I/O address */
938 NEXT_DEV
, /* next device */
939 loopback_init
/* loopback_init should set up the rest */
942 struct net_device
*dev_base
= &loopback_dev
;
943 rwlock_t dev_base_lock
= RW_LOCK_UNLOCKED
;