亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ne2k-pci.c

?? GNU Mach 微內核源代碼, 基于美國卡內基美隆大學的 Mach 研究項目
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* ne2k-pci.c: A NE2000 clone on PCI bus driver for Linux. *//*	A Linux device driver for PCI NE2000 clones.	Authorship and other copyrights:	1992-1998 by Donald Becker, NE2000 core and various modifications.	1995-1998 by Paul Gortmaker, core modifications and PCI support.	Copyright 1993 assigned to the United States Government as represented	by the Director, National Security Agency.	This software may be used and distributed according to the terms	of the GNU Public License, incorporated herein by reference.	The author may be reached as becker@CESDIS.gsfc.nasa.gov, or C/O	Center of Excellence in Space Data and Information Sciences	Code 930.5, Goddard Space Flight Center, Greenbelt MD 20771	People are making PCI ne2000 clones! Oh the horror, the horror...	Issues remaining:	No full-duplex support.*//* Our copyright info must remain in the binary. */static const char *version ="ne2k-pci.c:v0.99L 2/7/98 D. Becker/P. Gortmaker http://cesdis.gsfc.nasa.gov/linux/drivers/ne2k-pci.html\n";#ifdef MODVERSIONS#include <linux/modversions.h>#endif#include <linux/module.h>#include <linux/kernel.h>#include <linux/sched.h>#include <linux/errno.h>#include <linux/pci.h>#include <linux/bios32.h>#include <asm/system.h>#include <asm/io.h>#include <asm/irq.h>#include <linux/netdevice.h>#include <linux/etherdevice.h>#include "8390.h"/* Set statically or when loading the driver module. */static int debug = 1;/* Some defines that people can play with if so inclined. *//* Do #define LOAD_8390_BY_KERNELD to automatically load 8390 support. */#ifdef LOAD_8390_BY_KERNELD#include <linux/kerneld.h>#endif/* Use 32 bit data-movement operations instead of 16 bit. */#define USE_LONGIO/* Do we implement the read before write bugfix ? *//* #define NE_RW_BUGFIX *//* Do we have a non std. amount of memory? (in units of 256 byte pages) *//* #define PACKETBUF_MEMSIZE	0x40 */static struct {	unsigned short vendor, dev_id;	char *name;}pci_clone_list[] = {	{0x10ec, 0x8029, "RealTek RTL-8029"},	{0x1050, 0x0940, "Winbond 89C940"},	{0x11f6, 0x1401, "Compex RL2000"},	{0x8e2e, 0x3000, "KTI ET32P2"},	{0x4a14, 0x5000, "NetVin NV5000SC"},	{0x1106, 0x0926, "Via 82C926"},	{0,}};/* ---- No user-serviceable parts below ---- */#define NE_BASE	 (dev->base_addr)#define NE_CMD	 	0x00#define NE_DATAPORT	0x10	/* NatSemi-defined port window offset. */#define NE_RESET	0x1f	/* Issue a read to reset, a write to clear. */#define NE_IO_EXTENT	0x20#define NESM_START_PG	0x40	/* First page of TX buffer */#define NESM_STOP_PG	0x80	/* Last page +1 of RX ring */int ne2k_pci_probe(struct device *dev);static struct device *ne2k_pci_probe1(struct device *dev, int ioaddr, int irq);static int ne_open(struct device *dev);static int ne_close(struct device *dev);static void ne_reset_8390(struct device *dev);static void ne_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr,			  int ring_page);static void ne_block_input(struct device *dev, int count,			  struct sk_buff *skb, int ring_offset);static void ne_block_output(struct device *dev, const int count,		const unsigned char *buf, const int start_page);/* No room in the standard 8390 structure for extra info we need. */struct ne2k_pci_card {	struct ne2k_pci_card *next;	struct device *dev;	unsigned char pci_bus, pci_device_fn;};/* A list of all installed devices, for removing the driver module. */static struct ne2k_pci_card *ne2k_card_list = NULL;#ifdef LOAD_8390_BY_KERNELDstatic int (*Lethdev_init)(struct device *dev);static void (*LNS8390_init)(struct device *dev, int startp);static int (*Lei_open)(struct device *dev);static int (*Lei_close)(struct device *dev);static void (*Lei_interrupt)(int irq, void *dev_id, struct pt_regs *regs);#else#define Lethdev_init ethdev_init#define LNS8390_init NS8390_init#define Lei_open ei_open#define Lei_close ei_close#define Lei_interrupt ei_interrupt#endif#ifdef MODULEintinit_module(void){	/* We must emit version information. */	if (debug)		printk(KERN_INFO "%s", version);	return ne2k_pci_probe(0);}voidcleanup_module(void){	struct device *dev;	struct ne2k_pci_card *this_card;	/* No need to check MOD_IN_USE, as sys_delete_module() checks. */	while (ne2k_card_list) {		dev = ne2k_card_list->dev;		unregister_netdev(dev);		release_region(dev->base_addr, NE_IO_EXTENT);		kfree(dev);		this_card = ne2k_card_list;		ne2k_card_list = ne2k_card_list->next;		kfree(this_card);	}#ifdef LOAD_8390_BY_KERNELD	release_module("8390", 0);#endif}#endif  /* MODULE *//*  NEx000-clone boards have a Station Address (SA) PROM (SAPROM) in the packet  buffer memory space.  By-the-spec NE2000 clones have 0x57,0x57 in bytes  0x0e,0x0f of the SAPROM, while other supposed NE2000 clones must be  detected by their SA prefix.  Reading the SAPROM from a word-wide card with the 8390 set in byte-wide  mode results in doubled values, which can be detected and compensated for.  The probe is also responsible for initializing the card and filling  in the 'dev' and 'ei_status' structures.*/#ifdef HAVE_DEVLISTstruct netdev_entry netcard_drv ={"ne2k_pci", ne2k_pci_probe1, NE_IO_EXTENT, 0};#endifint ne2k_pci_probe(struct device *dev){	static int pci_index = 0;	/* Static, for multiple calls. */	int cards_found = 0;	int i;	if ( ! pcibios_present())		return -ENODEV;	for (;pci_index < 0xff; pci_index++) {		unsigned char pci_bus, pci_device_fn;		u8 pci_irq_line;		u16 pci_command, new_command, vendor, device;		u32 pci_ioaddr;		if (pcibios_find_class (PCI_CLASS_NETWORK_ETHERNET << 8, pci_index,								&pci_bus, &pci_device_fn)			!= PCIBIOS_SUCCESSFUL)			break;		pcibios_read_config_word(pci_bus, pci_device_fn,								 PCI_VENDOR_ID, &vendor);		pcibios_read_config_word(pci_bus, pci_device_fn,								 PCI_DEVICE_ID, &device);		/* Note: some vendor IDs (RealTek) have non-NE2k cards as well. */		for (i = 0; pci_clone_list[i].vendor != 0; i++)			if (pci_clone_list[i].vendor == vendor				&& pci_clone_list[i].dev_id == device)				break;		if (pci_clone_list[i].vendor == 0)			continue;#ifndef MODULE		{			static unsigned version_printed = 0;			if (version_printed++ == 0)				printk(KERN_INFO "%s", version);		}#endif		pcibios_read_config_dword(pci_bus, pci_device_fn,								  PCI_BASE_ADDRESS_0, &pci_ioaddr);		pcibios_read_config_byte(pci_bus, pci_device_fn,								 PCI_INTERRUPT_LINE, &pci_irq_line);		pcibios_read_config_word(pci_bus, pci_device_fn,								 PCI_COMMAND, &pci_command);		/* Remove I/O space marker in bit 0. */		pci_ioaddr &= PCI_BASE_ADDRESS_IO_MASK;		/* Avoid already found cards from previous calls */		if (check_region(pci_ioaddr, NE_IO_EXTENT))			continue;		/* Activate the card: fix for brain-damaged Win98 BIOSes. */		new_command = pci_command | PCI_COMMAND_IO;		if (pci_command != new_command) {			printk(KERN_INFO "  The PCI BIOS has not enabled this"				   " NE2k clone!  Updating PCI command %4.4x->%4.4x.\n",				   pci_command, new_command);			pcibios_write_config_word(pci_bus, pci_device_fn,									  PCI_COMMAND, new_command);		}		if (pci_irq_line <= 0 || pci_irq_line >= NR_IRQS)			printk(KERN_WARNING " WARNING: The PCI BIOS assigned this PCI NE2k"				   " card to IRQ %d, which is unlikely to work!.\n"				   KERN_WARNING " You should use the PCI BIOS setup to assign"				   " a valid IRQ line.\n", pci_irq_line);		printk("ne2k-pci.c: PCI NE2000 clone '%s' at I/O %#x, IRQ %d.\n",			   pci_clone_list[i].name, pci_ioaddr, pci_irq_line);		dev = ne2k_pci_probe1(dev, pci_ioaddr, pci_irq_line);		if (dev == 0) {			/* Should not happen. */			printk(KERN_ERR "ne2k-pci: Probe of PCI card at %#x failed.\n",				   pci_ioaddr);			continue;		} else {			struct ne2k_pci_card *ne2k_card =				kmalloc(sizeof(struct ne2k_pci_card), GFP_KERNEL);			ne2k_card->next = ne2k_card_list;			ne2k_card_list = ne2k_card;			ne2k_card->dev = dev;			ne2k_card->pci_bus = pci_bus;			ne2k_card->pci_device_fn = pci_device_fn;		}		dev = 0;		cards_found++;	}	return cards_found ? 0 : -ENODEV;}static struct device *ne2k_pci_probe1(struct device *dev, int ioaddr, int irq){	int i;	unsigned char SA_prom[32];	const char *name = NULL;	int start_page, stop_page;	int reg0 = inb(ioaddr);	if (reg0 == 0xFF)		return 0;	/* Do a preliminary verification that we have a 8390. */	{		int regd;		outb(E8390_NODMA+E8390_PAGE1+E8390_STOP, ioaddr + E8390_CMD);		regd = inb(ioaddr + 0x0d);		outb(0xff, ioaddr + 0x0d);		outb(E8390_NODMA+E8390_PAGE0, ioaddr + E8390_CMD);		inb(ioaddr + EN0_COUNTER0); /* Clear the counter by reading. */		if (inb(ioaddr + EN0_COUNTER0) != 0) {			outb(reg0, ioaddr);			outb(regd, ioaddr + 0x0d);	/* Restore the old values. */			return 0;		}	}	dev = init_etherdev(dev, 0);	/* Reset card. Who knows what dain-bramaged state it was left in. */	{		unsigned long reset_start_time = jiffies;		outb(inb(ioaddr + NE_RESET), ioaddr + NE_RESET);		/* This looks like a horrible timing loop, but it should never take		   more than a few cycles.		*/		while ((inb(ioaddr + EN0_ISR) & ENISR_RESET) == 0)			/* Limit wait: '2' avoids jiffy roll-over. */			if (jiffies - reset_start_time > 2) {				printk("ne2k-pci: Card failure (no reset ack).\n");				return 0;			}				outb(0xff, ioaddr + EN0_ISR);		/* Ack all intr. */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲少妇30p| 成人精品视频.| 日韩一区二区免费高清| 日韩综合在线视频| 欧美一区二区三区在| 麻豆成人久久精品二区三区小说| 欧美一区二区视频网站| 极品瑜伽女神91| 欧美国产精品一区二区| 97久久精品人人做人人爽| 亚洲国产另类av| 日韩精品一区二| 国产成人啪免费观看软件 | 男女性色大片免费观看一区二区| 欧美美女一区二区| 久久99久国产精品黄毛片色诱| ww久久中文字幕| 色偷偷成人一区二区三区91| 午夜欧美大尺度福利影院在线看| 精品福利在线导航| 成人91在线观看| 视频在线观看国产精品| 337p日本欧洲亚洲大胆色噜噜| 粉嫩一区二区三区在线看| 曰韩精品一区二区| 精品免费一区二区三区| 99久久99久久精品免费观看 | 韩日欧美一区二区三区| 亚洲人亚洲人成电影网站色| 欧美美女视频在线观看| 从欧美一区二区三区| 午夜久久久久久久久| 久久久精品国产免大香伊| 91麻豆123| 国产综合色视频| 午夜精品一区在线观看| 国产精品国产三级国产专播品爱网| 欧美三级韩国三级日本三斤| 国产乱人伦偷精品视频不卡| 午夜私人影院久久久久| 国产精品欧美综合在线| 日韩一级欧美一级| 在线视频观看一区| 成人黄色av电影| 精品一区二区三区在线播放视频| 亚洲精品视频在线| 国产三区在线成人av| 欧美一区二区视频在线观看2022| 色av成人天堂桃色av| 国产成人亚洲精品青草天美| 美脚の诱脚舐め脚责91| 亚洲一二三四在线观看| 亚洲欧洲av另类| 久久久久国产成人精品亚洲午夜 | 精品一区二区三区久久| 亚洲最新在线观看| 亚洲欧洲三级电影| 国产人伦精品一区二区| 欧美mv日韩mv国产网站app| 欧美日韩mp4| 91极品美女在线| 色婷婷综合久久久久中文一区二区 | 奇米色一区二区| 亚洲国产精品久久久男人的天堂| 国产精品久久久久桃色tv| 久久先锋影音av鲁色资源网| 欧美一区二区三区免费视频| 欧美日韩国产精选| 欧美精选午夜久久久乱码6080| 欧美电影免费提供在线观看| 日韩国产精品大片| 亚洲福利视频一区二区| 有码一区二区三区| 亚洲欧美区自拍先锋| 亚洲日本成人在线观看| 亚洲天堂成人在线观看| 亚洲美女在线一区| 一区二区视频在线| 亚洲一区二区三区免费视频| 亚洲国产精品久久久久秋霞影院 | 亚洲三级久久久| 亚洲欧美日韩国产手机在线 | 久久精品72免费观看| 亚洲成人动漫在线观看| 亚洲一区成人在线| 日韩精品国产精品| 免费在线观看成人| 精品一区二区在线观看| 国产成人一级电影| 99re亚洲国产精品| 欧美在线观看视频在线| 欧美日韩三级一区| 日韩亚洲欧美中文三级| 久久久电影一区二区三区| 中文字幕乱码亚洲精品一区| 中文字幕在线观看一区二区| 一个色在线综合| 日韩av一二三| 高清国产一区二区| 一本大道久久a久久综合| 欧美视频一区二区三区在线观看 | 久久精品亚洲精品国产欧美| 中文字幕乱码亚洲精品一区| 亚洲免费观看高清完整版在线观看| 悠悠色在线精品| 日韩av电影天堂| 丁香天五香天堂综合| 欧美在线一区二区三区| 日韩三级在线观看| 国产精品色哟哟网站| 亚洲永久精品大片| 国产在线播精品第三| 91在线视频官网| 日韩免费看的电影| 国产精品成人在线观看| 亚洲午夜在线电影| 国产精品一区二区三区四区| 色悠悠亚洲一区二区| 日韩精品一区国产麻豆| 国产精品萝li| 美女网站一区二区| 色综合色狠狠综合色| 欧美大度的电影原声| 亚洲男人的天堂在线观看| 美脚の诱脚舐め脚责91 | 国产精品欧美久久久久无广告 | 色婷婷精品久久二区二区蜜臂av| 51精品久久久久久久蜜臀| 久久精品亚洲乱码伦伦中文| 亚洲一区二区三区视频在线播放 | 99久久er热在这里只有精品15 | 午夜av一区二区| 不卡一区二区三区四区| 91精品国产91久久久久久一区二区 | 国产一区二区日韩精品| 日本精品免费观看高清观看| 久久久不卡网国产精品一区| 亚洲午夜羞羞片| 99久久久国产精品免费蜜臀| 精品国产人成亚洲区| 亚洲高清免费一级二级三级| 91玉足脚交白嫩脚丫在线播放| 精品国产乱码久久久久久蜜臀 | 亚洲欧美一区二区三区久本道91| 美腿丝袜在线亚洲一区| 欧洲亚洲国产日韩| 最新日韩在线视频| 国产经典欧美精品| 精品国产伦一区二区三区观看方式| 一区二区三区在线观看视频| 成人黄色电影在线 | 91精品国产综合久久久蜜臀图片| 国产精品久久精品日日| 国产精品夜夜嗨| 精品91自产拍在线观看一区| 日本不卡一区二区| 欧美日韩国产在线播放网站| 亚洲欧美日韩一区| 91在线一区二区三区| 综合婷婷亚洲小说| 99精品视频在线播放观看| 亚洲国产精品av| 国产.精品.日韩.另类.中文.在线.播放| 欧美大片拔萝卜| 国产综合久久久久久久久久久久| 日韩欧美一区二区不卡| 蜜臀精品久久久久久蜜臀| 欧美日韩国产美| 偷拍一区二区三区四区| 欧美伦理电影网| 美女www一区二区| 精品国产一区二区亚洲人成毛片| 美女一区二区在线观看| 久久婷婷综合激情| 精品一区二区在线播放| 国产欧美一区二区精品秋霞影院 | 亚洲成av人综合在线观看| 欧美日韩在线亚洲一区蜜芽| 天涯成人国产亚洲精品一区av| 欧美久久久久免费| 麻豆成人91精品二区三区| 2021国产精品久久精品| 国产成人综合在线观看| 国产精品短视频| 欧洲av一区二区嗯嗯嗯啊| 亚洲成av人片在线观看无码| 91精品国产麻豆| 国产麻豆视频精品| 国产精品国产三级国产aⅴ原创| 94-欧美-setu| 日韩中文欧美在线| 久久久久久久性| 99热精品国产| 亚洲18色成人| 精品国产成人在线影院| 99视频有精品| 日韩影院免费视频| 国产欧美日韩麻豆91| 91成人在线免费观看| 久久国产三级精品|