📄 space.c
字号:
#endif#ifdef CONFIG_APNE /* A1200 PCMCIA NE2000 */ {apne_probe, 0},#endif#ifdef CONFIG_ATARI_BIONET /* Atari Bionet Ethernet board */ {bionet_probe, 0},#endif#ifdef CONFIG_ATARI_PAMSNET /* Atari PAMsNet Ethernet board */ {pamsnet_probe, 0},#endif#ifdef CONFIG_HPLANCE /* HP300 internal Ethernet */ {hplance_probe, 0},#endif {NULL, 0},};struct devprobe ppc_probes[] __initdata = {#ifdef CONFIG_MACE {mace_probe, 0},#endif#ifdef CONFIG_BMAC {bmac_probe, 0},#endif {NULL, 0},};struct devprobe sgi_probes[] __initdata = {#ifdef CONFIG_SGISEEQ {sgiseeq_probe, 0},#endif {NULL, 0},};struct devprobe mips_probes[] __initdata = {#ifdef CONFIG_MIPS_JAZZ_SONIC {sonic_probe, 0},#endif {NULL, 0},};struct devprobe arm_probes[] __initdata = {#ifdef CONFIG_ARM_ETHERH {etherh_probe , 0},#endif#ifdef CONFIG_ARM_ETHER3 {ether3_probe , 0},#endif#ifdef CONFIG_ARM_ETHER1 {ether1_probe , 0},#endif#ifdef CONFIG_ARM_AM79C961A {am79c961_probe, 0},#endif {NULL, 0},};/* * Unified ethernet device probe, segmented per architecture and * per bus interface. */__initfunc(static int ethif_probe(struct device *dev)){ unsigned long base_addr = dev->base_addr; /* * Backwards compatibility - historically an I/O base of 1 was * used to indicate not to probe for this ethN interface */ if (base_addr == 1) return 1; /* ENXIO */ /* * The arch specific probes are 1st so that any on-board ethernet * will be probed before other ISA/EISA/MCA/PCI bus cards. */ if (probe_list(dev, arm_probes) == 0) return 0; if (probe_list(dev, m68k_probes) == 0) return 0; if (probe_list(dev, mips_probes) == 0) return 0; if (probe_list(dev, ppc_probes) == 0) return 0; if (probe_list(dev, sgi_probes) == 0) return 0; if (probe_list(dev, sparc_probes) == 0) return 0; if (probe_list(dev, pci_probes) == 0) return 0; if (probe_list(dev, eisa_probes) == 0) return 0; if (probe_list(dev, mca_probes) == 0) return 0; /* * Backwards compatibility - an I/O of 0xffe0 was used to indicate * that we shouldn't do a bunch of potentially risky ISA probes * for ethN (N>1). Since the widespread use of modules, *nobody* * compiles a kernel with all the ISA drivers built in anymore, * and so we should delete this check in linux 2.3 - Paul G. */ if (base_addr != 0xffe0 && probe_list(dev, isa_probes) == 0) return 0; if (probe_list(dev, parport_probes) == 0) return 0; return -ENODEV;}#ifdef CONFIG_FDDI__initfunc(static int fddiif_probe(struct device *dev)){ unsigned long base_addr = dev->base_addr; if (base_addr == 1) return 1; /* ENXIO */ if (1#ifdef CONFIG_DEFXX && dfx_probe(dev)#endif#ifdef CONFIG_APFDDI && apfddi_init(dev)#endif && 1 ) { return 1; /* -ENODEV or -EAGAIN would be more accurate. */ } return 0;}#endif#ifdef CONFIG_HIPPIstatic int hippi_probe(struct device *dev){ /* * Damn this is ugly. * * Why the heck would we want to determine this from the base * address? Stupid PC'ism .... grrrrr. */ if (dev->base_addr == -1) return 1; if (1#ifdef CONFIG_ROADRUNNER && rr_hippi_probe(dev)#endif && 1 ) { return 1; /* -ENODEV or -EAGAIN would be more accurate. */ } return 0;}#endif#ifdef CONFIG_ETHERTAP static struct device tap0_dev = { "tap0", 0, 0, 0, 0, NETLINK_TAPBASE, 0, 0, 0, 0, NEXT_DEV, ethertap_probe, };# undef NEXT_DEV# define NEXT_DEV (&tap0_dev)#endif#ifdef CONFIG_SDLA extern int sdla_init(struct device *); static struct device sdla0_dev = { "sdla0", 0, 0, 0, 0, 0, 0, 0, 0, 0, NEXT_DEV, sdla_init, };# undef NEXT_DEV# define NEXT_DEV (&sdla0_dev)#endif#if defined(CONFIG_LTPC) extern int ltpc_probe(struct device *); static struct device dev_ltpc = { "lt0\0 ", 0, 0, 0, 0, 0x0, 0, 0, 0, 0, NEXT_DEV, ltpc_probe };# undef NEXT_DEV# define NEXT_DEV (&dev_ltpc)#endif /* LTPC */#if defined(CONFIG_COPS) extern int cops_probe(struct device *); static struct device cops2_dev = { "lt2", 0, 0, 0, 0, 0x0, 0, 0, 0, 0, NEXT_DEV, cops_probe }; static struct device cops1_dev = { "lt1", 0, 0, 0, 0, 0x0, 0, 0, 0, 0, &cops2_dev, cops_probe }; static struct device cops0_dev = { "lt0", 0, 0, 0, 0, 0x0, 0, 0, 0, 0, &cops1_dev, cops_probe };# undef NEXT_DEV# define NEXT_DEV (&cops0_dev)#endif /* COPS */#if defined(CONFIG_IPDDP) extern int ipddp_init(struct device *dev); static struct device dev_ipddp = { "ipddp0\0 ", 0, 0, 0, 0, 0x0, 0, 0, 0, 0, NEXT_DEV, ipddp_init };# undef NEXT_DEV# define NEXT_DEV (&dev_ipddp)#endif /* CONFIG_IPDDP *//* The first device defaults to I/O base '0', which means autoprobe. */#ifndef ETH0_ADDR# define ETH0_ADDR 0#endif#ifndef ETH0_IRQ# define ETH0_IRQ 0#endif/* "eth0" defaults to autoprobe (== 0), other use a base of 0xffe0 (== -0x20), which means "don't do ISA probes". Distributions don't ship kernels with all ISA drivers compiled in anymore, so its probably no longer an issue. */#define ETH_NOPROBE_ADDR 0xffe0static struct device eth7_dev = { "eth7", 0,0,0,0,ETH_NOPROBE_ADDR /* I/O base*/, 0,0,0,0, NEXT_DEV, ethif_probe };static struct device eth6_dev = { "eth6", 0,0,0,0,ETH_NOPROBE_ADDR /* I/O base*/, 0,0,0,0, ð7_dev, ethif_probe };static struct device eth5_dev = { "eth5", 0,0,0,0,ETH_NOPROBE_ADDR /* I/O base*/, 0,0,0,0, ð6_dev, ethif_probe };static struct device eth4_dev = { "eth4", 0,0,0,0,ETH_NOPROBE_ADDR /* I/O base*/, 0,0,0,0, ð5_dev, ethif_probe };static struct device eth3_dev = { "eth3", 0,0,0,0,ETH_NOPROBE_ADDR /* I/O base*/, 0,0,0,0, ð4_dev, ethif_probe };static struct device eth2_dev = { "eth2", 0,0,0,0,ETH_NOPROBE_ADDR /* I/O base*/, 0,0,0,0, ð3_dev, ethif_probe };static struct device eth1_dev = { "eth1", 0,0,0,0,ETH_NOPROBE_ADDR /* I/O base*/, 0,0,0,0, ð2_dev, ethif_probe };static struct device eth0_dev = { "eth0", 0, 0, 0, 0, ETH0_ADDR, ETH0_IRQ, 0, 0, 0, ð1_dev, ethif_probe };# undef NEXT_DEV# define NEXT_DEV (ð0_dev)#if defined(SLIP) || defined(CONFIG_SLIP) /* To be exact, this node just hooks the initialization routines to the device structures. */extern int slip_init_ctrl_dev(struct device *);static struct device slip_bootstrap = { "slip_proto", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NEXT_DEV, slip_init_ctrl_dev, };#undef NEXT_DEV#define NEXT_DEV (&slip_bootstrap)#endif /* SLIP */#if defined(X25_ASY) || defined(CONFIG_X25_ASY) /* To be exact, this node just hooks the initialization routines to the device structures. */extern int x25_asy_init_ctrl_dev(struct device *);static struct device x25_asy_bootstrap = { "x25_proto", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NEXT_DEV, x25_asy_init_ctrl_dev, };#undef NEXT_DEV#define NEXT_DEV (&x25_asy_bootstrap)#endif /* X25_ASY */ #if defined(CONFIG_MKISS) /* To be exact, this node just hooks the initialization routines to the device structures. */extern int mkiss_init_ctrl_dev(struct device *);static struct device mkiss_bootstrap = { "mkiss_proto", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NEXT_DEV, mkiss_init_ctrl_dev, };#undef NEXT_DEV#define NEXT_DEV (&mkiss_bootstrap)#endif /* MKISS */ #if defined(CONFIG_STRIP)extern int strip_init_ctrl_dev(struct device *);static struct device strip_bootstrap = { "strip_proto", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NEXT_DEV, strip_init_ctrl_dev, };#undef NEXT_DEV#define NEXT_DEV (&strip_bootstrap)#endif /* STRIP */#if defined(CONFIG_PPP)extern int ppp_init(struct device *);static struct device ppp_bootstrap = { "ppp_proto", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NEXT_DEV, ppp_init, };#undef NEXT_DEV#define NEXT_DEV (&ppp_bootstrap)#endif /* PPP */#ifdef CONFIG_DUMMY extern int dummy_init(struct device *dev); static struct device dummy_dev = { "dummy", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NEXT_DEV, dummy_init, };# undef NEXT_DEV# define NEXT_DEV (&dummy_dev)#endif#ifdef CONFIG_EQUALIZERextern int eql_init(struct device *dev);struct device eql_dev = { "eql", /* Master device for IP traffic load balancing */ 0x0, 0x0, 0x0, 0x0, /* recv end/start; mem end/start */ 0, /* base I/O address */ 0, /* IRQ */ 0, 0, 0, /* flags */ NEXT_DEV, /* next device */ eql_init /* set up the rest */};# undef NEXT_DEV# define NEXT_DEV (&eql_dev)#endif#ifdef CONFIG_TR/* Token-ring device probe */extern int ibmtr_probe(struct device *);static inttrif_probe(struct device *dev){ if (1#ifdef CONFIG_IBMTR && ibmtr_probe(dev)#endif#ifdef CONFIG_SKTR && sktr_probe(dev)#endif#ifdef CONFIG_SMCTR && smctr_probe(dev)#endif && 1 ) { return 1; /* -ENODEV or -EAGAIN would be more accurate. */ } return 0;}static struct device tr7_dev = { "tr7",0,0,0,0,0,0,0,0,0, NEXT_DEV, trif_probe };static struct device tr6_dev = { "tr6",0,0,0,0,0,0,0,0,0, &tr7_dev, trif_probe };static struct device tr5_dev = { "tr5",0,0,0,0,0,0,0,0,0, &tr6_dev, trif_probe };static struct device tr4_dev = { "tr4",0,0,0,0,0,0,0,0,0, &tr5_dev, trif_probe };static struct device tr3_dev = { "tr3",0,0,0,0,0,0,0,0,0, &tr4_dev, trif_probe };static struct device tr2_dev = { "tr2",0,0,0,0,0,0,0,0,0, &tr3_dev, trif_probe };static struct device tr1_dev = { "tr1",0,0,0,0,0,0,0,0,0, &tr2_dev, trif_probe };static struct device tr0_dev = { "tr0",0,0,0,0,0,0,0,0,0, &tr1_dev, trif_probe };# undef NEXT_DEV# define NEXT_DEV (&tr0_dev)#endif #ifdef CONFIG_FDDI static struct device fddi7_dev = {"fddi7", 0, 0, 0, 0, 0, 0, 0, 0, 0, NEXT_DEV, fddiif_probe}; static struct device fddi6_dev = {"fddi6", 0, 0, 0, 0, 0, 0, 0, 0, 0, &fddi7_dev, fddiif_probe}; static struct device fddi5_dev = {"fddi5", 0, 0, 0, 0, 0, 0, 0, 0, 0, &fddi6_dev, fddiif_probe}; static struct device fddi4_dev = {"fddi4", 0, 0, 0, 0, 0, 0, 0, 0, 0, &fddi5_dev, fddiif_probe}; static struct device fddi3_dev = {"fddi3", 0, 0, 0, 0, 0, 0, 0, 0, 0, &fddi4_dev, fddiif_probe}; static struct device fddi2_dev = {"fddi2", 0, 0, 0, 0, 0, 0, 0, 0, 0, &fddi3_dev, fddiif_probe}; static struct device fddi1_dev = {"fddi1", 0, 0, 0, 0, 0, 0, 0, 0, 0, &fddi2_dev, fddiif_probe}; static struct device fddi0_dev = {"fddi0", 0, 0, 0, 0, 0, 0, 0, 0, 0, &fddi1_dev, fddiif_probe};#undef NEXT_DEV#define NEXT_DEV (&fddi0_dev)#endif #ifdef CONFIG_HIPPI static struct device hip3_dev = {"hip3", 0, 0, 0, 0, 0, 0, 0, 0, 0, NEXT_DEV, hippi_probe}; static struct device hip2_dev = {"hip2", 0, 0, 0, 0, 0, 0, 0, 0, 0, &hip3_dev, hippi_probe}; static struct device hip1_dev = {"hip1", 0, 0, 0, 0, 0, 0, 0, 0, 0, &hip2_dev, hippi_probe}; static struct device hip0_dev = {"hip0", 0, 0, 0, 0, 0, 0, 0, 0, 0, &hip1_dev, hippi_probe};#undef NEXT_DEV#define NEXT_DEV (&hip0_dev)#endif #ifdef CONFIG_APBIF extern int bif_init(struct device *dev); static struct device bif_dev = { "bif", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NEXT_DEV, bif_init };# undef NEXT_DEV# define NEXT_DEV (&bif_dev)#endif extern int loopback_init(struct device *dev);struct device loopback_dev = { "lo", /* Software Loopback interface */ 0x0, /* recv memory end */ 0x0, /* recv memory start */ 0x0, /* memory end */ 0x0, /* memory start */ 0, /* base I/O address */ 0, /* IRQ */ 0, 0, 0, /* flags */ NEXT_DEV, /* next device */ loopback_init /* loopback_init should set up the rest */};struct device *dev_base = &loopback_dev;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -