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

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

?? pciehp_ctrl.c

?? Linux Kernel 2.6.9 for OMAP1710
?? C
?? 第 1 頁 / 共 5 頁
字號:
	info = kmalloc(sizeof(struct hotplug_slot_info), GFP_KERNEL);	if (!info)		return -ENOMEM;	/* make_slot_name (&buffer[0], SLOT_NAME_SIZE, slot); */	slot->hpc_ops->get_power_status(slot, &(info->power_status));	slot->hpc_ops->get_attention_status(slot, &(info->attention_status));	slot->hpc_ops->get_latch_status(slot, &(info->latch_status));	slot->hpc_ops->get_adapter_status(slot, &(info->adapter_status));	/* result = pci_hp_change_slot_info(buffer, info); */	result = pci_hp_change_slot_info(slot->hotplug_slot, info);	kfree (info);	return result;}static void interrupt_event_handler(struct controller *ctrl){	int loop = 0;	int change = 1;	struct pci_func *func;	u8 hp_slot;	u8 getstatus;	struct slot *p_slot;	while (change) {		change = 0;		for (loop = 0; loop < 10; loop++) {			if (ctrl->event_queue[loop].event_type != 0) {				hp_slot = ctrl->event_queue[loop].hp_slot;				func = pciehp_slot_find(ctrl->slot_bus, (hp_slot + ctrl->slot_device_offset), 0);				p_slot = pciehp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset);				dbg("hp_slot %d, func %p, p_slot %p\n", hp_slot, func, p_slot);				if (ctrl->event_queue[loop].event_type == INT_BUTTON_CANCEL) {					dbg("button cancel\n");					del_timer(&p_slot->task_event);					switch (p_slot->state) {					case BLINKINGOFF_STATE:						/* Wait for exclusive access to hardware */						down(&ctrl->crit_sect);						p_slot->hpc_ops->green_led_on(p_slot);						/* Wait for the command to complete */						wait_for_ctrl_irq (ctrl);						p_slot->hpc_ops->set_attention_status(p_slot, 0);						/* Wait for the command to complete */						wait_for_ctrl_irq (ctrl);						/* Done with exclusive hardware access */						up(&ctrl->crit_sect);						break;					case BLINKINGON_STATE:						/* Wait for exclusive access to hardware */						down(&ctrl->crit_sect);						p_slot->hpc_ops->green_led_off(p_slot);						/* Wait for the command to complete */						wait_for_ctrl_irq (ctrl);						p_slot->hpc_ops->set_attention_status(p_slot, 0);						/* Wait for the command to complete */						wait_for_ctrl_irq (ctrl);						/* Done with exclusive hardware access */						up(&ctrl->crit_sect);						break;					default:						warn("Not a valid state\n");						return;					}					info(msg_button_cancel, p_slot->number);					p_slot->state = STATIC_STATE;				}				/* ***********Button Pressed (No action on 1st press...) */				else if (ctrl->event_queue[loop].event_type == INT_BUTTON_PRESS) {					dbg("Button pressed\n");					p_slot->hpc_ops->get_power_status(p_slot, &getstatus);					if (getstatus) {						/* slot is on */						dbg("slot is on\n");						p_slot->state = BLINKINGOFF_STATE;						info(msg_button_off, p_slot->number);					} else {						/* slot is off */						dbg("slot is off\n");						p_slot->state = BLINKINGON_STATE;						info(msg_button_on, p_slot->number);					}					/* Wait for exclusive access to hardware */					down(&ctrl->crit_sect);					/* blink green LED and turn off amber */					p_slot->hpc_ops->green_led_blink(p_slot);					/* Wait for the command to complete */					wait_for_ctrl_irq (ctrl);										p_slot->hpc_ops->set_attention_status(p_slot, 0);					/* Wait for the command to complete */					wait_for_ctrl_irq (ctrl);					/* Done with exclusive hardware access */					up(&ctrl->crit_sect);					init_timer(&p_slot->task_event);					p_slot->task_event.expires = jiffies + 5 * HZ;   /* 5 second delay */					p_slot->task_event.function = (void (*)(unsigned long)) pushbutton_helper_thread;					p_slot->task_event.data = (unsigned long) p_slot;					dbg("add_timer p_slot = %p\n", (void *) p_slot);					add_timer(&p_slot->task_event);				}				/***********POWER FAULT********************/				else if (ctrl->event_queue[loop].event_type == INT_POWER_FAULT) {					dbg("power fault\n");					/* Wait for exclusive access to hardware */					down(&ctrl->crit_sect);					p_slot->hpc_ops->set_attention_status(p_slot, 1);					wait_for_ctrl_irq (ctrl);											p_slot->hpc_ops->green_led_off(p_slot);					wait_for_ctrl_irq (ctrl);					/* Done with exclusive hardware access */					up(&ctrl->crit_sect);				} else {					/* refresh notification */					if (p_slot)						update_slot_info(p_slot);				}				ctrl->event_queue[loop].event_type = 0;				change = 1;			}		}		/* End of FOR loop */	}}int pciehp_enable_slot(struct slot *p_slot){	u8 getstatus = 0;	int rc;	struct pci_func *func;	func = pciehp_slot_find(p_slot->bus, p_slot->device, 0);	if (!func) {		dbg("%s: Error! slot NULL\n", __FUNCTION__);		return 1;	}	/* Check to see if (latch closed, card present, power off) */	down(&p_slot->ctrl->crit_sect);	rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);	if (rc || !getstatus) {		info("%s: no adapter on slot(%x)\n", __FUNCTION__, p_slot->number);		up(&p_slot->ctrl->crit_sect);		return 1;	}		rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);	if (rc || getstatus) {		info("%s: latch open on slot(%x)\n", __FUNCTION__, p_slot->number);		up(&p_slot->ctrl->crit_sect);		return 1;	}		rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);	if (rc || getstatus) {		info("%s: already enabled on slot(%x)\n", __FUNCTION__, p_slot->number);		up(&p_slot->ctrl->crit_sect);		return 1;	}	up(&p_slot->ctrl->crit_sect);	slot_remove(func);	func = pciehp_slot_create(p_slot->bus);	if (func == NULL)		return 1;	func->bus = p_slot->bus;	func->device = p_slot->device;	func->function = 0;	func->configured = 0;	func->is_a_board = 1;	/* We have to save the presence info for these slots */	p_slot->hpc_ops->get_adapter_status(p_slot, &(func->presence_save));	p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);	func->switch_save = !getstatus? 0x10:0;	rc = board_added(func, p_slot->ctrl);	if (rc) {		if (is_bridge(func))			bridge_slot_remove(func);		else			slot_remove(func);		/* Setup slot structure with entry for empty slot */		func = pciehp_slot_create(p_slot->bus);		if (func == NULL)			return 1;	/* Out of memory */		func->bus = p_slot->bus;		func->device = p_slot->device;		func->function = 0;		func->configured = 0;		func->is_a_board = 1;		/* We have to save the presence info for these slots */		p_slot->hpc_ops->get_adapter_status(p_slot, &(func->presence_save));		p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);		func->switch_save = !getstatus? 0x10:0;	}	if (p_slot)		update_slot_info(p_slot);	return rc;}int pciehp_disable_slot(struct slot *p_slot){	u8 class_code, header_type, BCR;	u8 index = 0;	u8 getstatus = 0;	u32 rc = 0;	int ret = 0;	unsigned int devfn;	struct pci_bus *pci_bus = p_slot->ctrl->pci_dev->subordinate;	struct pci_func *func;	if (!p_slot->ctrl)		return 1;	/* Check to see if (latch closed, card present, power on) */	down(&p_slot->ctrl->crit_sect);	ret = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);	if (ret || !getstatus) {		info("%s: no adapter on slot(%x)\n", __FUNCTION__, p_slot->number);		up(&p_slot->ctrl->crit_sect);		return 1;	}	ret = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);	if (ret || getstatus) {		info("%s: latch open on slot(%x)\n", __FUNCTION__, p_slot->number);		up(&p_slot->ctrl->crit_sect);		return 1;	}	ret = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);	if (ret || !getstatus) {		info("%s: already disabled slot(%x)\n", __FUNCTION__, p_slot->number);		up(&p_slot->ctrl->crit_sect);		return 1;	}	up(&p_slot->ctrl->crit_sect);	func = pciehp_slot_find(p_slot->bus, p_slot->device, index++);	/* Make sure there are no video controllers here	 * for all func of p_slot	 */	while (func && !rc) {		pci_bus->number = func->bus;		devfn = PCI_DEVFN(func->device, func->function);		/* Check the Class Code */		rc = pci_bus_read_config_byte (pci_bus, devfn, 0x0B, &class_code);		if (rc)			return rc;		if (class_code == PCI_BASE_CLASS_DISPLAY) {			/* Display/Video adapter (not supported) */			rc = REMOVE_NOT_SUPPORTED;		} else {			/* See if it's a bridge */			rc = pci_bus_read_config_byte (pci_bus, devfn, PCI_HEADER_TYPE, &header_type);			if (rc)				return rc;			/* If it's a bridge, check the VGA Enable bit */			if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) {				rc = pci_bus_read_config_byte (pci_bus, devfn, PCI_BRIDGE_CONTROL, &BCR);				if (rc)					return rc;				/* If the VGA Enable bit is set, remove isn't supported */				if (BCR & PCI_BRIDGE_CTL_VGA) {					rc = REMOVE_NOT_SUPPORTED;				}			}		}		func = pciehp_slot_find(p_slot->bus, p_slot->device, index++);	}	func = pciehp_slot_find(p_slot->bus, p_slot->device, 0);	if ((func != NULL) && !rc) {		rc = remove_board(func, p_slot->ctrl);	} else if (!rc)		rc = 1;	if (p_slot)		update_slot_info(p_slot);	return rc;}/** * configure_new_device - Configures the PCI header information of one board. * * @ctrl: pointer to controller structure * @func: pointer to function structure * @behind_bridge: 1 if this is a recursive call, 0 if not * @resources: pointer to set of resource lists * * Returns 0 if success * */static u32 configure_new_device(struct controller * ctrl, struct pci_func * func,	u8 behind_bridge, struct resource_lists * resources, u8 bridge_bus, u8 bridge_dev){	u8 temp_byte, function, max_functions, stop_it;	int rc;	u32 ID;	struct pci_func *new_slot;	struct pci_bus lpci_bus, *pci_bus;	int index;	new_slot = func;	dbg("%s\n", __FUNCTION__);	memcpy(&lpci_bus, ctrl->pci_dev->subordinate, sizeof(lpci_bus));	pci_bus = &lpci_bus;	pci_bus->number = func->bus;	/* Check for Multi-function device */	rc = pci_bus_read_config_byte(pci_bus, PCI_DEVFN(func->device, func->function), 0x0E, &temp_byte);	if (rc) {		dbg("%s: rc = %d\n", __FUNCTION__, rc);		return rc;	}	if (temp_byte & 0x80)	/* Multi-function device */		max_functions = 8;	else		max_functions = 1;	function = 0;	do {		rc = configure_new_function(ctrl, new_slot, behind_bridge,					resources, bridge_bus, bridge_dev);		if (rc) {			dbg("configure_new_function failed: %d\n", rc);			index = 0;			while (new_slot) {				new_slot = pciehp_slot_find(new_slot->bus,						new_slot->device, index++);				if (new_slot)					pciehp_return_board_resources(new_slot,						resources);			}			return rc;		}		function++;		stop_it = 0;		/*  The following loop skips to the next present function		 *  and creates a board structure		 */		while ((function < max_functions) && (!stop_it)) {			pci_bus_read_config_dword(pci_bus, PCI_DEVFN(func->device, function), 0x00, &ID);			if (ID == 0xFFFFFFFF) {	  /* There's nothing there. */				function++;			} else {  /* There's something there */				/* Setup slot structure. */				new_slot = pciehp_slot_create(func->bus);				if (new_slot == NULL) {					/* Out of memory */					return 1;				}				new_slot->bus = func->bus;				new_slot->device = func->device;				new_slot->function = function;				new_slot->is_a_board = 1;				new_slot->status = 0;				stop_it++;			}		}	} while (function < max_functions);	dbg("returning from %s\n", __FUNCTION__);	return 0;}/* * Configuration logic that involves the hotplug data structures and  * their bookkeeping *//** * configure_bridge: fill bridge's registers, either configure or disable it. */static intconfigure_bridge(struct pci_bus *pci_bus, unsigned int devfn,			struct pci_resource *mem_node,			struct pci_resource **hold_mem_node,			int base_addr, int limit_addr){	u16 temp_word;	u32 rc;	if (mem_node) {		memcpy(*hold_mem_node, mem_node, sizeof(struct pci_resource));		mem_node->next = NULL;		/* set Mem base and Limit registers */		RES_CHECK(mem_node->base, 16);		temp_word = (u16)(mem_node->base >> 16);		rc = pci_bus_write_config_word(pci_bus, devfn, base_addr, temp_word);		RES_CHECK(mem_node->base + mem_node->length - 1, 16);		temp_word = (u16)((mem_node->base + mem_node->length - 1) >> 16);		rc = pci_bus_write_config_word(pci_bus, devfn, limit_addr, temp_word);	} else {		temp_word = 0xFFFF;		rc = pci_bus_write_config_word(pci_bus, devfn, base_addr, temp_word);		temp_word = 0x0000;		rc = pci_bus_write_config_word(pci_bus, devfn, limit_addr, temp_word);		kfree(*hold_mem_node);		*hold_mem_node = NULL;	}	return rc;}static intconfigure_new_bridge(struct controller *ctrl, struct pci_func *func,		u8 behind_bridge, struct resource_lists *resources,		struct pci_bus *pci_bus){	int cloop;	u8 temp_byte;	u8 device;	u16 temp_word;	u32 rc;	u32 ID;	unsigned int devfn;	struct pci_resource *mem_node;	struct pci_resource *p_mem_node;	struct pci_resource *io_node;	struct pci_resource *bus_node;	struct pci_resource *hold_mem_node;	struct pci_resource *hold_p_mem_node;	struct pci_resource *hold_IO_node;	struct pci_resource *hold_bus_node;	struct irq_mapping irqs;	struct pci_func *new_slot;	struct resource_lists temp_resources;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩在线播| 免费欧美日韩国产三级电影| 国产一区二区精品久久91| 欧美一区日韩一区| 免费欧美在线视频| 欧美本精品男人aⅴ天堂| 日韩**一区毛片| 日韩一区二区三区电影在线观看| 亚洲国产精品一区二区久久恐怖片 | 粉嫩av一区二区三区在线播放| 精品嫩草影院久久| 国产激情一区二区三区桃花岛亚洲| 精品国产第一区二区三区观看体验 | 欧美在线一区二区三区| 亚洲一区影音先锋| 6080亚洲精品一区二区| 免费国产亚洲视频| 久久精品亚洲麻豆av一区二区 | 韩国v欧美v亚洲v日本v| 国产亚洲一区二区三区四区| 成人激情综合网站| 亚洲精品高清在线观看| 正在播放亚洲一区| 国产一区999| 亚洲视频中文字幕| 欧美片网站yy| 国产99久久久国产精品潘金| 亚洲精品国产视频| 日韩午夜激情免费电影| 成人免费高清在线| 亚洲成a人片在线不卡一二三区| 精品成人免费观看| 色www精品视频在线观看| 日韩电影免费一区| 中文字幕av一区二区三区高| 欧美网站一区二区| 国产呦萝稀缺另类资源| 一个色综合av| 久久精品欧美一区二区三区不卡| 色综合久久久久久久久| 日本不卡1234视频| 亚洲素人一区二区| 精品国精品自拍自在线| 色999日韩国产欧美一区二区| 蓝色福利精品导航| 亚洲狠狠丁香婷婷综合久久久| 欧美一级免费大片| 一本一道波多野结衣一区二区| 久久电影网站中文字幕 | 亚洲精品国产精华液| 日韩精品中文字幕在线不卡尤物| av电影天堂一区二区在线| 免费成人在线播放| 亚洲欧美另类久久久精品| 精品欧美一区二区三区精品久久| 91老师片黄在线观看| 韩国理伦片一区二区三区在线播放| 亚洲精品高清在线| 亚洲国产高清不卡| 精品久久久久一区| 欧美精品日日鲁夜夜添| 91色porny在线视频| 激情av综合网| 日本视频一区二区三区| 亚洲综合视频在线观看| 中文字幕一区免费在线观看| 精品国产一区二区三区av性色| 欧美日韩精品三区| 色哟哟亚洲精品| 成人动漫一区二区在线| 国产毛片精品国产一区二区三区| 六月丁香婷婷色狠狠久久| 亚洲成人三级小说| 亚洲一区二区三区四区在线| 国产精品无圣光一区二区| 久久综合九色综合久久久精品综合| 欧美高清性hdvideosex| 欧美日韩免费电影| 欧美日韩国产在线播放网站| 欧洲av一区二区嗯嗯嗯啊| 99久久精品国产网站| 不卡免费追剧大全电视剧网站| 国产一区二区三区四区五区入口| 欧美aa在线视频| 免费av成人在线| 蜜桃久久av一区| 麻豆精品视频在线观看| 久草精品在线观看| 韩国av一区二区| 国产精品综合在线视频| 国产一区999| 丰满白嫩尤物一区二区| 成人av网在线| 91在线播放网址| 色偷偷久久一区二区三区| 在线精品视频一区二区| 欧美亚洲动漫另类| 欧美男人的天堂一二区| 91麻豆精品国产综合久久久久久 | 91精品国产色综合久久不卡蜜臀| 欧美三区免费完整视频在线观看| 欧美亚洲综合网| 欧美日韩高清一区二区不卡| 777亚洲妇女| 精品精品欲导航| 国产精品久99| 一个色综合网站| 美日韩黄色大片| 高清不卡在线观看av| 91麻豆国产香蕉久久精品| 欧美日韩亚洲高清一区二区| 日韩女优制服丝袜电影| 久久久久久久性| 亚洲欧洲精品一区二区精品久久久| 亚洲免费观看高清完整版在线 | 久久久www成人免费无遮挡大片| 国产天堂亚洲国产碰碰| 亚洲女与黑人做爰| 无吗不卡中文字幕| 国产成人综合在线| 欧美日韩亚洲高清一区二区| 26uuu亚洲综合色欧美| 亚洲桃色在线一区| 久久精品国产免费| 91猫先生在线| 精品久久久久久无| 亚洲精品乱码久久久久| 韩国中文字幕2020精品| 在线看不卡av| 久久久精品综合| 三级亚洲高清视频| youjizz国产精品| 日韩一区二区麻豆国产| 亚洲欧美日韩人成在线播放| 久久精品国产在热久久| 色综合久久88色综合天天| 精品国产精品网麻豆系列| 亚洲国产精品久久久久秋霞影院 | 日本不卡1234视频| 国产99久久久国产精品潘金| 欧美精选午夜久久久乱码6080| 久久精品亚洲精品国产欧美| 亚洲激情自拍视频| 麻豆久久久久久久| www.亚洲精品| 久久久久久久久99精品| 夜夜揉揉日日人人青青一国产精品| 久久国产乱子精品免费女| 91视频免费观看| 精品国产伦一区二区三区观看体验| 中文字幕中文字幕一区二区| 亚洲码国产岛国毛片在线| 国产盗摄女厕一区二区三区| 欧美吞精做爰啪啪高潮| 欧美国产精品v| 蜜桃视频第一区免费观看| 欧美日韩和欧美的一区二区| 国产精品久久久久久久岛一牛影视| 日本美女视频一区二区| 色综合久久九月婷婷色综合| 日韩视频一区二区在线观看| 亚洲va中文字幕| 91在线观看下载| 久久婷婷国产综合国色天香| 亚洲国产精品影院| 欧美日韩亚洲综合在线 | 高清国产一区二区三区| 欧美一级高清片| 一区二区三区精品在线| youjizz久久| 精品国产成人系列| 一区二区三区.www| a4yy欧美一区二区三区| 久久精品一二三| 午夜精品成人在线视频| 欧美日韩精品免费| 亚洲一区二区精品3399| 91蜜桃网址入口| 国产精品萝li| 99久久777色| 国产精品久久久久久久蜜臀 | 亚洲电影一区二区| 色菇凉天天综合网| 亚洲理论在线观看| 欧美在线一区二区三区| 亚洲日本va午夜在线影院| 成人黄动漫网站免费app| 久久久高清一区二区三区| 国产+成+人+亚洲欧洲自线| 久久亚洲春色中文字幕久久久| 麻豆国产一区二区| 欧美一区二区视频在线观看| 国产精品高潮呻吟| 日本精品一级二级| 亚洲成人激情综合网| 欧美日韩黄色一区二区| 首页亚洲欧美制服丝腿| 久久夜色精品一区| 国产91丝袜在线播放0| 国产女同互慰高潮91漫画|