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

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

?? i2o_pci.c

?? 這個linux源代碼是很全面的~基本完整了~使用c編譯的~由于時間問題我沒有親自測試~但就算用來做參考資料也是非常好的
?? C
字號:
/* *	Find I2O capable controllers on the PCI bus, and register/install *	them with the I2O layer * *	(C) Copyright 1999   Red Hat Software *	 *	Written by Alan Cox, Building Number Three Ltd * 	Modified by Deepak Saxena <deepak@plexity.net> * 	Modified by Boji T Kannanthanam <boji.t.kannanthanam@intel.com> * *	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. * *	TODO: *		Support polled I2O PCI controllers.  *		2.4 hotplug support *		Finish verifying 64bit/bigendian clean */#include <linux/config.h>#include <linux/module.h>#include <linux/kernel.h>#include <linux/pci.h>#include <linux/i2o.h>#include <linux/errno.h>#include <linux/init.h>#include <linux/slab.h>#include <asm/io.h>#ifdef CONFIG_MTRR#include <asm/mtrr.h>#endif // CONFIG_MTRRstatic int dpt = 0;extern void i2o_sys_init(void);/** *	i2o_pci_dispose		-	Free bus specific resources *	@c: I2O controller * *	Disable interrupts and then free interrupt, I/O and mtrr resources  *	used by this controller. Called by the I2O core on unload. */ static void i2o_pci_dispose(struct i2o_controller *c){	I2O_IRQ_WRITE32(c,0xFFFFFFFF);	if(c->bus.pci.irq > 0)		free_irq(c->bus.pci.irq, c);	iounmap(((u8 *)c->post_port)-0x40);#ifdef CONFIG_MTRR	if(c->bus.pci.mtrr_reg0 > 0)		mtrr_del(c->bus.pci.mtrr_reg0, 0, 0);	if(c->bus.pci.mtrr_reg1 > 0)		mtrr_del(c->bus.pci.mtrr_reg1, 0, 0);#endif}/** *	i2o_pci_bind		-	Bind controller and devices *	@c: i2o controller *	@dev: i2o device * *	Bind a device driver to a controller. In the case of PCI all we need to do *	is module housekeeping. */ static int i2o_pci_bind(struct i2o_controller *c, struct i2o_device *dev){	MOD_INC_USE_COUNT;	return 0;}/** *	i2o_pci_unbind		-	Bind controller and devices *	@c: i2o controller *	@dev: i2o device * *	Unbind a device driver from a controller. In the case of PCI all we need to do *	is module housekeeping. */ static int i2o_pci_unbind(struct i2o_controller *c, struct i2o_device *dev){	MOD_DEC_USE_COUNT;	return 0;}/** *	i2o_pci_enable		-	Enable controller *	@c: controller * *	Called by the I2O core code in order to enable bus specific *	resources for this controller. In our case that means unmasking the  *	interrupt line. */static void i2o_pci_enable(struct i2o_controller *c){	I2O_IRQ_WRITE32(c, 0);	c->enabled = 1;}/** *	i2o_pci_disable		-	Enable controller *	@c: controller * *	Called by the I2O core code in order to enable bus specific *	resources for this controller. In our case that means masking the  *	interrupt line. */static void i2o_pci_disable(struct i2o_controller *c){	I2O_IRQ_WRITE32(c, 0xFFFFFFFF);	c->enabled = 0;}/** *	i2o_pci_interrupt	-	Bus specific interrupt handler *	@irq: interrupt line *	@dev_id: cookie * *	Handle an interrupt from a PCI based I2O controller. This turns out *	to be rather simple. We keep the controller pointer in the cookie. */ static void i2o_pci_interrupt(int irq, void *dev_id, struct pt_regs *r){	struct i2o_controller *c = dev_id;	i2o_run_queue(c);}	/** *	i2o_pci_install		-	Install a PCI i2o controller *	@dev: PCI device of the I2O controller * *	Install a PCI (or in theory AGP) i2o controller. Devices are *	initialized, configured and registered with the i2o core subsystem. Be *	very careful with ordering. There may be pending interrupts. * *	To Do: Add support for polled controllers */int __init i2o_pci_install(struct pci_dev *dev){	struct i2o_controller *c=kmalloc(sizeof(struct i2o_controller),						GFP_KERNEL);	unsigned long mem;	u32 memptr = 0;	u32 size;		int i;	if(c==NULL)	{		printk(KERN_ERR "i2o: Insufficient memory to add controller.\n");		return -ENOMEM;	}	memset(c, 0, sizeof(*c));	for(i=0; i<6; i++)	{		/* Skip I/O spaces */		if(!(pci_resource_flags(dev, i) & IORESOURCE_IO))		{			memptr = pci_resource_start(dev, i);			break;		}	}		if(i==6)	{		printk(KERN_ERR "i2o: I2O controller has no memory regions defined.\n");		kfree(c);		return -EINVAL;	}		size = dev->resource[i].end-dev->resource[i].start+1;		/* Map the I2O controller */		printk(KERN_INFO "i2o: PCI I2O controller at 0x%08X size=%d\n", memptr, size);	mem = (unsigned long)ioremap(memptr, size);	if(mem==0)	{		printk(KERN_ERR "i2o: Unable to map controller.\n");		kfree(c);		return -EINVAL;	}	c->bus.pci.irq = -1;	c->bus.pci.dpt = 0;	c->bus.pci.short_req = 0;	c->pdev = dev;	c->irq_mask = mem+0x34;	c->post_port = mem+0x40;	c->reply_port = mem+0x44;	c->mem_phys = memptr;	c->mem_offset = mem;	c->destructor = i2o_pci_dispose;		c->bind = i2o_pci_bind;	c->unbind = i2o_pci_unbind;	c->bus_enable = i2o_pci_enable;	c->bus_disable = i2o_pci_disable;		c->type = I2O_TYPE_PCI;	/*	 *	Cards that fall apart if you hit them with large I/O	 *	loads...	 */	 	if(dev->vendor == PCI_VENDOR_ID_NCR && dev->device == 0x0630)	{		c->bus.pci.short_req = 1;		printk(KERN_INFO "I2O: Symbios FC920 workarounds activated.\n");	}	if(dev->subsystem_vendor == PCI_VENDOR_ID_PROMISE)	{		c->bus.pci.promise = 1;		printk(KERN_INFO "I2O: Promise workarounds activated.\n");	}	/*	 *	Cards that go bananas if you quiesce them before you reset	 *	them	 */	 	if(dev->vendor == PCI_VENDOR_ID_DPT)		c->bus.pci.dpt=1;		/* 	 * Enable Write Combining MTRR for IOP's memory region	 */#ifdef CONFIG_MTRR	c->bus.pci.mtrr_reg0 =		mtrr_add(c->mem_phys, size, MTRR_TYPE_WRCOMB, 1);	/*	 * If it is an INTEL i960 I/O processor then set the first 64K to	 * Uncacheable since the region contains the Messaging unit which	 * shouldn't be cached.	 */	c->bus.pci.mtrr_reg1 = -1;	if(dev->vendor == PCI_VENDOR_ID_INTEL || dev->vendor == PCI_VENDOR_ID_DPT)	{		printk(KERN_INFO "I2O: MTRR workaround for Intel i960 processor\n"); 		c->bus.pci.mtrr_reg1 =	mtrr_add(c->mem_phys, 65536, MTRR_TYPE_UNCACHABLE, 1);		if(c->bus.pci.mtrr_reg1< 0)		{			printk(KERN_INFO "i2o_pci: Error in setting MTRR_TYPE_UNCACHABLE\n");			mtrr_del(c->bus.pci.mtrr_reg0, c->mem_phys, size);			c->bus.pci.mtrr_reg0 = -1;		}	}#endif	I2O_IRQ_WRITE32(c,0xFFFFFFFF);	i = i2o_install_controller(c);		if(i<0)	{		printk(KERN_ERR "i2o: Unable to install controller.\n");		kfree(c);		iounmap((void *)mem);		return i;	}	c->bus.pci.irq = dev->irq;	if(c->bus.pci.irq)	{		i=request_irq(dev->irq, i2o_pci_interrupt, SA_SHIRQ,			c->name, c);		if(i<0)		{			printk(KERN_ERR "%s: unable to allocate interrupt %d.\n",				c->name, dev->irq);			c->bus.pci.irq = -1;			i2o_delete_controller(c);			iounmap((void *)mem);			return -EBUSY;		}	}	printk(KERN_INFO "%s: Installed at IRQ%d\n", c->name, dev->irq);	I2O_IRQ_WRITE32(c,0x0);	c->enabled = 1;	return 0;	}/** *	i2o_pci_scan	-	Scan the pci bus for controllers *	 *	Scan the PCI devices on the system looking for any device which is a  *	memory of the Intelligent, I2O class. We attempt to set up each such device *	and register it with the core. * *	Returns the number of controllers registered */ int __init i2o_pci_scan(void){	struct pci_dev *dev;	int count=0;		printk(KERN_INFO "i2o: Checking for PCI I2O controllers...\n");	pci_for_each_dev(dev)		{		if((dev->class>>8)!=PCI_CLASS_INTELLIGENT_I2O)			continue;		if(dev->vendor == PCI_VENDOR_ID_DPT && !dpt)		{			if(dev->device == 0xA501 || dev->device == 0xA511)			{				printk(KERN_INFO "i2o: Skipping Adaptec/DPT I2O raid with preferred native driver.\n");				continue;			}		}		if((dev->class&0xFF)>1)		{			printk(KERN_INFO "i2o: I2O Controller found but does not support I2O 1.5 (skipping).\n");			continue;		}		if (pci_enable_device(dev))			continue;		printk(KERN_INFO "i2o: I2O controller on bus %d at %d.\n",			dev->bus->number, dev->devfn);		if(pci_set_dma_mask(dev, 0xffffffff))		{			printk(KERN_WARNING "I2O controller on bus %d at %d : No suitable DMA available\n", dev->bus->number, dev->devfn);		 	continue;		}		pci_set_master(dev);		if(i2o_pci_install(dev)==0)			count++;	}	if(count)		printk(KERN_INFO "i2o: %d I2O controller%s found and installed.\n", count,			count==1?"":"s");	return count?count:-ENODEV;}/** *	i2o_pci_core_attach	-	PCI initialisation for I2O * *	Find any I2O controllers and if present initialise them and bring up *	the I2O subsystem. * *	Returns 0 on success or an error code */ static int i2o_pci_core_attach(void){	printk(KERN_INFO "Linux I2O PCI support (c) 1999 Red Hat Software.\n");	if(i2o_pci_scan()>0)	{		i2o_sys_init();		return 0;	}	return -ENODEV;}/** *	i2o_pci_core_detach	-	PCI unload for I2O * *	Free up any resources not released when the controllers themselves were *	shutdown and unbound from the bus and drivers */ static void i2o_pci_core_detach(void){}MODULE_AUTHOR("Red Hat Software");MODULE_DESCRIPTION("I2O PCI Interface");MODULE_LICENSE("GPL");MODULE_PARM(dpt, "i");MODULE_PARM_DESC(dpt, "Set this if you want to drive DPT cards normally handled by dpt_i2o");module_init(i2o_pci_core_attach);module_exit(i2o_pci_core_detach); 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久亚洲综合| xnxx国产精品| 国产精品情趣视频| 爽爽淫人综合网网站| www.一区二区| 久久影院视频免费| 日韩主播视频在线| 色婷婷综合五月| 国产偷v国产偷v亚洲高清| 日韩高清不卡一区| 色菇凉天天综合网| 中文字幕色av一区二区三区| 黑人精品欧美一区二区蜜桃 | 亚洲三级视频在线观看| 久久99精品久久久久久动态图| 在线日韩一区二区| 亚洲欧美一区二区三区孕妇| 国产精品91一区二区| 日韩精品一区在线观看| 偷拍自拍另类欧美| 欧美色倩网站大全免费| 亚洲精品亚洲人成人网在线播放| 国产成人一级电影| 久久久久亚洲蜜桃| 加勒比av一区二区| 欧美成人aa大片| 六月丁香婷婷久久| 日韩美女一区二区三区四区| 午夜视频一区在线观看| 欧美日韩在线播放一区| 一区二区三区欧美视频| 91女神在线视频| 亚洲视频每日更新| 99re这里只有精品视频首页| 中日韩免费视频中文字幕| 国产精品亚洲午夜一区二区三区 | 欧美精品777| 亚洲国产综合91精品麻豆| 欧美在线|欧美| 亚洲影院久久精品| 欧美日韩国产高清一区二区三区| 亚洲成年人影院| 69堂精品视频| 免费观看成人av| 日韩欧美国产不卡| 国产麻豆日韩欧美久久| 国产日产欧美一区二区视频| 国产不卡视频在线播放| 国产精品久久久久久亚洲伦 | 久久av资源网| 精品粉嫩aⅴ一区二区三区四区| 美女诱惑一区二区| 久久―日本道色综合久久| 国产精品影视在线观看| 欧美韩国一区二区| 91在线视频网址| 亚洲一区免费观看| 51精品秘密在线观看| 欧美aaa在线| 国产视频一区在线播放| www.亚洲色图.com| 成人免费高清在线| 亚洲色图另类专区| 极品少妇xxxx偷拍精品少妇| 日韩电影在线免费观看| 成人国产一区二区三区精品| 国产精品青草综合久久久久99| 99久久国产综合精品色伊| 亚洲愉拍自拍另类高清精品| 91精品国产福利| 国产在线精品一区二区不卡了| 欧美经典一区二区| 一本一道波多野结衣一区二区| 亚洲成人av中文| 337p日本欧洲亚洲大胆精品| 成人黄色大片在线观看| 亚洲欧美电影一区二区| 欧美日韩国产精品成人| 国产美女一区二区三区| 亚洲欧洲制服丝袜| 日韩精品中午字幕| 大胆亚洲人体视频| 亚洲成在人线在线播放| 精品国产一区久久| 色婷婷一区二区| 久久国产精品一区二区| 国产精品久久免费看| 欧美精品丝袜久久久中文字幕| 国产精品亚洲人在线观看| 亚洲精品成人少妇| 精品91自产拍在线观看一区| 97久久精品人人爽人人爽蜜臀| 日韩av中文在线观看| 国产精品福利电影一区二区三区四区| 欧美日本在线播放| 成人自拍视频在线观看| 午夜精品福利一区二区蜜股av| 久久无码av三级| 精品视频1区2区| 懂色av中文字幕一区二区三区 | 日韩免费看的电影| 不卡一区中文字幕| 麻豆久久久久久久| 一区二区三区国产精华| 久久你懂得1024| 欧美久久婷婷综合色| 成人精品免费视频| 青娱乐精品视频在线| 亚洲激情图片小说视频| 久久久三级国产网站| 精品视频1区2区| 99久久99久久免费精品蜜臀| 精品在线免费视频| 亚洲午夜国产一区99re久久| 国产日韩精品一区二区浪潮av| 337p亚洲精品色噜噜| 91视频在线观看免费| 国产高清精品在线| 美腿丝袜亚洲色图| 亚洲r级在线视频| 国产精品久久精品日日| 精品88久久久久88久久久| 欧美人狂配大交3d怪物一区| 91麻豆6部合集magnet| 国产一区激情在线| 麻豆专区一区二区三区四区五区| 一级日本不卡的影视| 中文字幕在线不卡视频| 国产亚洲一区二区三区四区| 欧美一区二区精品久久911| 色婷婷av久久久久久久| 成人久久18免费网站麻豆| 久久97超碰色| 奇米精品一区二区三区四区| 亚洲国产视频在线| 一区二区在线观看免费 | 欧美日韩在线播放三区四区| 99久精品国产| av一二三不卡影片| 岛国av在线一区| 国产成人精品www牛牛影视| 久久99国产精品免费网站| 免费观看成人av| 蜜桃视频在线一区| 日韩av电影一区| 石原莉奈一区二区三区在线观看| 亚洲一区欧美一区| 一区二区成人在线视频| 亚洲日本va午夜在线影院| 成人免费视频在线观看| 一区二区中文视频| 国产精品国产三级国产aⅴ无密码| 欧美精品一区二区在线播放| 欧美大白屁股肥臀xxxxxx| 日韩欧美国产三级| 精品国产乱码久久久久久久久| 欧美成人a∨高清免费观看| 欧美大片一区二区三区| 欧美成人a视频| 久久这里只有精品视频网| 久久久精品国产免费观看同学| 精品粉嫩aⅴ一区二区三区四区| 精品毛片乱码1区2区3区| 精品精品欲导航| 久久久久国产成人精品亚洲午夜| 亚洲精品一区二区三区四区高清| 精品国产乱码久久久久久浪潮 | 91精品国产综合久久小美女| 欧美理论电影在线| 欧美一区二区三区四区高清| 欧美一区二区三区的| 精品少妇一区二区三区视频免付费 | 在线免费视频一区二区| 欧美亚洲高清一区二区三区不卡| 在线免费一区三区| 91精品国产一区二区三区蜜臀| 日韩一区和二区| 久久久精品日韩欧美| 国产精品网站在线| 亚洲免费观看在线观看| 午夜精品福利在线| 国模娜娜一区二区三区| 成人丝袜18视频在线观看| 色婷婷久久久亚洲一区二区三区 | 成人黄色777网| 欧洲精品视频在线观看| 91精品国产入口| 久久久美女毛片| 亚洲精品视频一区| 日韩有码一区二区三区| 国产一区欧美日韩| 色婷婷综合久色| 日韩欧美一二区| 国产精品久久久一本精品 | 国产精品久久久久久福利一牛影视| 亚洲另类中文字| 免费观看30秒视频久久| 成人性视频网站| 欧美日韩午夜在线| 久久久亚洲欧洲日产国码αv|