⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 space.c

📁 Linux系统CS网卡驱动
💻 C
📖 第 1 页 / 共 2 页
字号:
/* * INET		An implementation of the TCP/IP protocol suite for the LINUX *		operating system.  INET is implemented using the  BSD Socket *		interface as the means of communication with the user level. * *		Holds initial configuration information for devices. * * Version:	@(#)Space.c	1.0.7	08/12/93 * * Authors:	Ross Biro, <bir7@leland.Stanford.Edu> *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> *		Donald J. Becker, <becker@super.org> * * Changelog: *		Paul Gortmaker (06/98):  *		 - sort probes in a sane way, make sure all (safe) probes *		   get run once & failed autoprobes don't autoprobe again. * *	FIXME: *		Phase out placeholder dev entries put in the linked list *		here in favour of drivers using init_etherdev(NULL, ...) *		combined with a single find_all_devs() function (for 2.3) * *		This program is free software; you can redistribute it and/or *		modify it under the terms of the GNU General Public License *		as published by the Free Software Foundation; either version *		2 of the License, or (at your option) any later version. */#include <linux/config.h>#include <linux/netdevice.h>#include <linux/errno.h>#include <linux/init.h>#include <linux/netlink.h>#define	NEXT_DEV	NULL/* A unified ethernet device probe.  This is the easiest way to have every   ethernet adaptor have the name "eth[0123...]".   */extern int ne2_probe(struct device *dev);extern int tulip_probe(struct device *dev);extern int hp100_probe(struct device *dev);extern int ultra_probe(struct device *dev);extern int ultra32_probe(struct device *dev);extern int ultramca_probe(struct device *dev);extern int wd_probe(struct device *dev);extern int el2_probe(struct device *dev);extern int ne2k_pci_probe(struct device *dev);extern int ne_probe(struct device *dev);extern int hp_probe(struct device *dev);extern int hp_plus_probe(struct device *dev);extern int znet_probe(struct device *);extern int express_probe(struct device *);extern int eepro_probe(struct device *);extern int eepro100_probe(struct device *);extern int el3_probe(struct device *);extern int at1500_probe(struct device *);extern int pcnet32_probe(struct device *);extern int at1700_probe(struct device *);extern int fmv18x_probe(struct device *);extern int eth16i_probe(struct device *);extern int depca_probe(struct device *);extern int i82596_probe(struct device *);extern int ewrk3_probe(struct device *);extern int de4x5_probe(struct device *);extern int el1_probe(struct device *);extern int wavelan_probe(struct device *);extern int el16_probe(struct device *);extern int elmc_probe(struct device *);extern int elplus_probe(struct device *);extern int ac3200_probe(struct device *);extern int es_probe(struct device *);extern int lne390_probe(struct device *);extern int ne3210_probe(struct device *);extern int e2100_probe(struct device *);extern int ni5010_probe(struct device *);extern int ni52_probe(struct device *);extern int ni65_probe(struct device *);extern int sonic_probe(struct device *);extern int SK_init(struct device *);extern int seeq8005_probe(struct device *);extern int tc59x_probe(struct device *);extern int dgrs_probe(struct device *);extern int smc_init( struct device * );extern int sparc_lance_probe(struct device *);extern int happy_meal_probe(struct device *);extern int qec_probe(struct device *);extern int bigmac_probe(struct device *);extern int myri_sbus_probe(struct device *);extern int sgiseeq_probe(struct device *);extern int atarilance_probe(struct device *);extern int a2065_probe(struct device *);extern int ariadne_probe(struct device *);extern int ariadne2_probe(struct device *);extern int hydra_probe(struct device *);extern int apne_probe(struct device *);extern int bionet_probe(struct device *);extern int pamsnet_probe(struct device *);extern int tlan_probe(struct device *);extern int mace_probe(struct device *);extern int bmac_probe(struct device *);extern int cs89x0_probe(struct device *dev);extern int ethertap_probe(struct device *dev);extern int ether1_probe (struct device *dev);extern int ether3_probe (struct device *dev);extern int etherh_probe (struct device *dev);extern int am79c961_probe(struct device *dev);extern int epic100_probe(struct device *dev);extern int rtl8139_probe(struct device *dev);extern int hplance_probe(struct device *dev);extern int via_rhine_probe(struct device *dev);extern int tc515_probe(struct device *dev);extern int lance_probe(struct device *dev);extern int rcpci_probe(struct device *);/* Gigabit Ethernet adapters */extern int yellowfin_probe(struct device *dev);extern int acenic_probe(struct device *dev);/* Detachable devices ("pocket adaptors") */extern int atp_init(struct device *);extern int de600_probe(struct device *);extern int de620_probe(struct device *);/* FDDI adapters */extern int dfx_probe(struct device *dev);extern int apfddi_init(struct device *dev);/* HIPPI boards */extern int rr_hippi_probe(struct device *);struct devprobe{	int (*probe)(struct device *dev);	int status;	/* non-zero if autoprobe has failed */};/* * probe_list walks a list of probe functions and calls each so long * as a non-zero ioaddr is given, or as long as it hasn't already failed  * to find a card in the past (as recorded by "status") when asked to * autoprobe (i.e. a probe that fails to find a card when autoprobing * will not be asked to autoprobe again).  It exits when a card is found. */__initfunc(static int probe_list(struct device *dev, struct devprobe *plist)){	struct devprobe *p = plist;	unsigned long base_addr = dev->base_addr;	while (p->probe != NULL) {		if (base_addr && p->probe(dev) == 0)	/* probe given addr */			return 0;		else if (p->status == 0) {		/* has autoprobe failed yet? */			p->status = p->probe(dev);	/* no, try autoprobe */			if (p->status == 0)				return 0;		}		p++;	}	return -ENODEV;}/* * If your probe touches ISA ports (<0x400) in addition to * looking for PCI cards, then put it in the isa_probes * list instead. */struct devprobe pci_probes[] __initdata = {#ifdef CONFIG_DGRS	{dgrs_probe, 0},#endif#ifdef CONFIG_RCPCI	{rcpci_probe, 0},#endif#ifdef CONFIG_VORTEX	{tc59x_probe, 0},#endif#ifdef CONFIG_NE2K_PCI	{ne2k_pci_probe, 0},#endif#ifdef CONFIG_PCNET32	{pcnet32_probe, 0},#endif	#ifdef CONFIG_EEXPRESS_PRO100	/* Intel EtherExpress Pro/100 */	{eepro100_probe, 0},#endif#ifdef CONFIG_DEC_ELCP 	{tulip_probe, 0},#endif#ifdef CONFIG_DE4X5             /* DEC DE425, DE434, DE435 adapters */	{de4x5_probe, 0},#endif#ifdef CONFIG_TLAN	{tlan_probe, 0},#endif#ifdef CONFIG_EPIC100	{epic100_probe, 0},#endif#ifdef CONFIG_RTL8139	{rtl8139_probe, 0},#endif#ifdef CONFIG_YELLOWFIN	{yellowfin_probe, 0},#endif#ifdef CONFIG_ACENIC	{acenic_probe, 0},#endif#ifdef CONFIG_VIA_RHINE	{via_rhine_probe, 0},#endif	{NULL, 0},};/* * This is a bit of an artificial separation as there are PCI drivers * that also probe for EISA cards (in the PCI group) and there are ISA * drivers that probe for EISA cards (in the ISA group).  These are the * EISA only driver probes. */struct devprobe eisa_probes[] __initdata = {#ifdef CONFIG_ULTRA32 	{ultra32_probe, 0},	#endif#ifdef CONFIG_AC3200		{ac3200_probe, 0},#endif#ifdef CONFIG_ES3210	{es_probe, 0},#endif#ifdef CONFIG_LNE390	{lne390_probe, 0},#endif#ifdef CONFIG_NE3210	{ne3210_probe, 0},#endif	{NULL, 0},};struct devprobe sparc_probes[] __initdata = {#ifdef CONFIG_HAPPYMEAL	{happy_meal_probe, 0},#endif#ifdef CONFIG_SUNLANCE	{sparc_lance_probe, 0},#endif#ifdef CONFIG_SUNQE	{qec_probe, 0},#endif#ifdef CONFIG_SUNBMAC	{bigmac_probe, 0},#endif#ifdef CONFIG_MYRI_SBUS	{myri_sbus_probe, 0},#endif	{NULL, 0},};struct devprobe mca_probes[] __initdata = {#ifdef CONFIG_ULTRAMCA 	{ultramca_probe, 0},#endif#ifdef CONFIG_NE2_MCA	{ne2_probe, 0},#endif#ifdef CONFIG_ELMC		/* 3c523 */	{elmc_probe, 0},#endif	{NULL, 0},};/* * ISA probes that touch addresses < 0x400 (including those that also * look for EISA/PCI cards in addition to ISA cards). */struct devprobe isa_probes[] __initdata = {#ifdef CONFIG_EL3		/* ISA, EISA (MCA someday) 3c5x9 */	{el3_probe, 0},#endif#ifdef CONFIG_HP100 		/* ISA, EISA & PCI */	{hp100_probe, 0},#endif	#ifdef CONFIG_3C515	{tc515_probe, 0},#endif#ifdef CONFIG_ULTRA 	{ultra_probe, 0},#endif#ifdef CONFIG_WD80x3 	{wd_probe, 0},#endif#ifdef CONFIG_EL2 		/* 3c503 */	{el2_probe, 0},#endif#ifdef CONFIG_HPLAN	{hp_probe, 0},#endif#ifdef CONFIG_HPLAN_PLUS	{hp_plus_probe, 0},#endif#ifdef CONFIG_E2100		/* Cabletron E21xx series. */	{e2100_probe, 0},#endif#ifdef CONFIG_NE2000		/* ISA (use ne2k-pci for PCI cards) */	{ne_probe, 0},#endif#ifdef CONFIG_LANCE		/* ISA/VLB (use pcnet32 for PCI cards) */	{lance_probe, 0},#endif#ifdef CONFIG_SMC9194	{smc_init, 0},#endif#ifdef CONFIG_SEEQ8005 	{seeq8005_probe, 0},#endif#ifdef CONFIG_AT1500	{at1500_probe, 0},#endif#ifdef CONFIG_CS89x0 	{cs89x0_probe, 0},#endif#ifdef CONFIG_AT1700	{at1700_probe, 0},#endif#ifdef CONFIG_FMV18X		/* Fujitsu FMV-181/182 */	{fmv18x_probe, 0},#endif#ifdef CONFIG_ETH16I	{eth16i_probe, 0},	/* ICL EtherTeam 16i/32 */#endif#ifdef CONFIG_ZNET		/* Zenith Z-Note and some IBM Thinkpads. */	{znet_probe, 0},#endif#ifdef CONFIG_EEXPRESS		/* Intel EtherExpress */	{express_probe, 0},#endif#ifdef CONFIG_EEXPRESS_PRO	/* Intel EtherExpress Pro/10 */	{eepro_probe, 0},#endif#ifdef CONFIG_DEPCA		/* DEC DEPCA */	{depca_probe, 0},#endif#ifdef CONFIG_EWRK3             /* DEC EtherWORKS 3 */    	{ewrk3_probe, 0},#endif#if defined(CONFIG_APRICOT) || defined(CONFIG_MVME16x_NET) || defined(CONFIG_BVME6000_NET)	/* Intel I82596 */	{i82596_probe, 0},#endif#ifdef CONFIG_EL1		/* 3c501 */	{el1_probe, 0},#endif#ifdef CONFIG_WAVELAN		/* WaveLAN */	{wavelan_probe, 0},#endif#ifdef CONFIG_EL16		/* 3c507 */	{el16_probe, 0},#endif#ifdef CONFIG_ELPLUS		/* 3c505 */	{elplus_probe, 0},#endif#ifdef CONFIG_SK_G16	{SK_init, 0},#endif#ifdef CONFIG_NI5010	{ni5010_probe, 0},#endif#ifdef CONFIG_NI52	{ni52_probe, 0},#endif#ifdef CONFIG_NI65	{ni65_probe, 0},#endif	{NULL, 0},};struct devprobe parport_probes[] __initdata = {#ifdef CONFIG_DE600		/* D-Link DE-600 adapter */	{de600_probe, 0},#endif#ifdef CONFIG_DE620		/* D-Link DE-620 adapter */	{de620_probe, 0},#endif#ifdef CONFIG_ATP		/* AT-LAN-TEC (RealTek) pocket adaptor. */	{atp_init, 0},#endif	{NULL, 0},};struct devprobe m68k_probes[] __initdata = {#ifdef CONFIG_ATARILANCE	/* Lance-based Atari ethernet boards */	{atarilance_probe, 0},#endif#ifdef CONFIG_A2065		/* Commodore/Ameristar A2065 Ethernet Board */	{a2065_probe, 0},#endif#ifdef CONFIG_ARIADNE		/* Village Tronic Ariadne Ethernet Board */	{ariadne_probe, 0},#endif#ifdef CONFIG_ARIADNE2		/* Village Tronic Ariadne II Ethernet Board */	{ariadne2_probe, 0},#endif#ifdef CONFIG_HYDRA		/* Hydra Systems Amiganet Ethernet board */	{hydra_probe, 0},

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -