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

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

?? i2o_pci.c

?? 一個2.4.21版本的嵌入式linux內核
?? 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一区二区三区免费野_久草精品视频
日韩不卡免费视频| 亚洲视频综合在线| 久久99国产精品久久99果冻传媒| 欧美性极品少妇| 视频一区免费在线观看| 欧美精品视频www在线观看| 日韩av电影免费观看高清完整版在线观看| 欧美电影在线免费观看| 精品午夜一区二区三区在线观看| 26uuu欧美日本| 成人av资源在线| 亚洲v精品v日韩v欧美v专区| 日韩精品一区国产麻豆| 国产精品2024| 亚洲午夜久久久| 欧美大片在线观看一区二区| 国产成人av电影免费在线观看| 国产精品国产a级| 欧美日韩精品一区二区三区蜜桃 | 国产精品卡一卡二卡三| 91在线视频播放| 天堂精品中文字幕在线| 久久久久久一二三区| 99在线精品视频| 美腿丝袜亚洲色图| 亚洲色图丝袜美腿| 欧美成人精品二区三区99精品| proumb性欧美在线观看| 五月婷婷激情综合| 国产精品不卡视频| 欧美一区二区视频在线观看| 波多野结衣亚洲| 麻豆一区二区三| 亚洲最快最全在线视频| 久久精品免费在线观看| 欧美日韩久久久一区| jvid福利写真一区二区三区| 免费在线观看精品| 亚洲精品国产一区二区三区四区在线| 欧美成人免费网站| 欧美日韩一区在线| av网站一区二区三区| 韩国成人精品a∨在线观看| 亚洲一区二区在线观看视频| 国产亚洲精品久| 欧美一级日韩不卡播放免费| 91色porny| 成人av综合在线| 国内精品第一页| 丝袜美腿亚洲一区| 亚洲精品中文字幕乱码三区| 久久久www免费人成精品| 欧美丰满美乳xxx高潮www| 一本一本久久a久久精品综合麻豆| 精品亚洲porn| 久久精品国产精品亚洲精品| 日韩精品1区2区3区| 一区二区成人在线观看| 中文字幕一区二区三区乱码在线 | 欧美日韩精品一区二区三区四区 | 亚洲欧美区自拍先锋| 国产视频在线观看一区二区三区| 欧美一区二区三区四区久久| 欧美午夜一区二区| 色婷婷综合在线| 91亚洲资源网| 91九色最新地址| 91丨porny丨国产| 93久久精品日日躁夜夜躁欧美| 成人免费三级在线| jlzzjlzz欧美大全| 成人av资源下载| 99vv1com这只有精品| 成人性视频网站| 国产91精品一区二区麻豆网站| 国产福利91精品一区二区三区| 国产一区二区不卡在线| 九九国产精品视频| 国产麻豆精品久久一二三| 国产一区二区免费在线| 国产成人精品www牛牛影视| 国产成人在线电影| 成人免费毛片aaaaa**| 成人精品鲁一区一区二区| 成人app软件下载大全免费| 成人性生交大片免费看中文| 暴力调教一区二区三区| 99精品久久久久久| 欧美在线制服丝袜| 欧美日韩不卡视频| 日韩一区二区在线观看视频播放| 精品国产区一区| 国产精品久久久久久久蜜臀| 亚洲裸体在线观看| 丝袜亚洲另类欧美| 精品一区二区三区免费| 国产精品996| 欧美在线视频你懂得| 欧美一级理论片| 中文文精品字幕一区二区| 亚洲丝袜另类动漫二区| 亚洲chinese男男1069| 老鸭窝一区二区久久精品| 国产成人午夜片在线观看高清观看| 99视频在线观看一区三区| 欧美亚洲动漫精品| 2021久久国产精品不只是精品| 国产精品第四页| 偷拍与自拍一区| 国产成人av影院| 欧美日韩国产123区| 久久婷婷国产综合国色天香| 亚洲精品国产精品乱码不99 | 亚洲欧美日韩中文播放| 天天射综合影视| 播五月开心婷婷综合| 欧美日韩亚洲另类| 国产三级精品视频| 亚洲成人免费影院| 国产成人免费视频网站 | 欧美一区在线视频| 国产精品色哟哟| 蜜臀av性久久久久蜜臀aⅴ四虎 | 国产无人区一区二区三区| 一级特黄大欧美久久久| 国内精品久久久久影院薰衣草| 91麻豆国产精品久久| 精品国产乱码久久久久久1区2区 | 在线一区二区视频| 国产午夜久久久久| 丝袜亚洲另类欧美综合| 91在线你懂得| 久久久久国产精品厨房| 天天av天天翘天天综合网| 成年人午夜久久久| 欧美精品一区二区久久婷婷| 亚洲成av人片在线| 99精品久久只有精品| www久久精品| 免费成人在线网站| 欧美在线影院一区二区| 综合色天天鬼久久鬼色| 国产传媒一区在线| 欧美精品一区在线观看| 五月激情综合色| 欧美日韩亚洲不卡| 一区二区三区久久久| 成人av在线网站| 欧美韩日一区二区三区| 国产在线不卡一区| 精品国产免费人成在线观看| 日韩二区三区在线观看| 欧美性猛交一区二区三区精品| 国产精品美女久久久久高潮| 国产精品资源在线看| 日韩视频一区二区三区| 婷婷综合另类小说色区| 欧美日韩免费在线视频| 夜夜精品浪潮av一区二区三区 | 99re在线视频这里只有精品| 久久美女高清视频| 国产精品99久久不卡二区| 久久久久99精品一区| 国产精品羞羞答答xxdd| 欧美大片在线观看一区二区| 美女视频网站黄色亚洲| 精品嫩草影院久久| 激情欧美一区二区三区在线观看| 欧美电视剧在线观看完整版| 黄页网站大全一区二区| 久久影院午夜论| 国产精品18久久久久久久网站| 久久精品亚洲乱码伦伦中文| 国产高清不卡二三区| 欧美高清一级片在线观看| 成人av电影免费在线播放| 中文字幕中文字幕在线一区| 99久久免费精品高清特色大片| 综合色天天鬼久久鬼色| 91国产成人在线| 午夜精品久久久久久久久久久 | 欧美激情一区二区三区蜜桃视频| 风流少妇一区二区| 中文字幕日韩一区二区| 色偷偷久久一区二区三区| 午夜av区久久| 欧美精品一区二区三区在线| 成人h精品动漫一区二区三区| 亚洲精品国久久99热| 91精品蜜臀在线一区尤物| 久久99日本精品| 国产精品麻豆网站| 欧美亚洲日本国产| 久久99精品久久久久久久久久久久| 亚洲国产岛国毛片在线| 色妞www精品视频| 奇米精品一区二区三区四区| 国产欧美日韩精品一区| 色妞www精品视频| 久久99精品国产91久久来源|