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

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

?? pciehp_ctrl.c

?? h內核
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* this is the main worker thread */static int event_thread(void* data){	struct controller *ctrl;	lock_kernel();	daemonize("pciehpd_event");	unlock_kernel();	while (1) {		dbg("!!!!event_thread sleeping\n");		down_interruptible (&event_semaphore);		dbg("event_thread woken finished = %d\n", event_finished);		if (event_finished || signal_pending(current))			break;		/* Do stuff here */		if (pushbutton_pending)			pciehp_pushbutton_thread(pushbutton_pending);		else if (surprise_rm_pending)			pciehp_surprise_rm_thread(surprise_rm_pending);		else			for (ctrl = pciehp_ctrl_list; ctrl; ctrl=ctrl->next)				interrupt_event_handler(ctrl);	}	dbg("event_thread signals exit\n");	up(&event_exit);	return 0;}int pciehp_event_start_thread(void){	int pid;	/* initialize our semaphores */	init_MUTEX_LOCKED(&event_exit);	event_finished=0;	init_MUTEX_LOCKED(&event_semaphore);	pid = kernel_thread(event_thread, NULL, 0);	if (pid < 0) {		err ("Can't start up our event thread\n");		return -1;	}	dbg("Our event thread pid = %d\n", pid);	return 0;}void pciehp_event_stop_thread(void){	event_finished = 1;	dbg("event_thread finish command given\n");	up(&event_semaphore);	dbg("wait for event_thread to exit\n");	down(&event_exit);}static int update_slot_info(struct slot *slot){	struct hotplug_slot_info *info;	/* char buffer[SLOT_NAME_SIZE]; */	int result;	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);												if (PWR_LED(ctrl->ctrlcap)) {							p_slot->hpc_ops->green_led_on(p_slot);							/* Wait for the command to complete */							wait_for_ctrl_irq (ctrl);						}						if (ATTN_LED(ctrl->ctrlcap)) {							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);						if (PWR_LED(ctrl->ctrlcap)) {							p_slot->hpc_ops->green_led_off(p_slot);							/* Wait for the command to complete */							wait_for_ctrl_irq (ctrl);						}						if (ATTN_LED(ctrl->ctrlcap)){							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) {										if (ATTN_BUTTN(ctrl->ctrlcap)) {						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 */						if (PWR_LED(ctrl->ctrlcap)) {							p_slot->hpc_ops->green_led_blink(p_slot);							/* Wait for the command to complete */							wait_for_ctrl_irq (ctrl);						}						if (ATTN_LED(ctrl->ctrlcap)) {							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) {					if (POWER_CTRL(ctrl->ctrlcap)) {						dbg("power fault\n");						/* Wait for exclusive access to hardware */						down(&ctrl->crit_sect);						if (ATTN_LED(ctrl->ctrlcap)) {							p_slot->hpc_ops->set_attention_status(p_slot, 1);							wait_for_ctrl_irq (ctrl);						}						if (PWR_LED(ctrl->ctrlcap)) {							p_slot->hpc_ops->green_led_off(p_slot);							wait_for_ctrl_irq (ctrl);						}						/* Done with exclusive hardware access */						up(&ctrl->crit_sect);					}				}				/***********SURPRISE REMOVAL********************/				else if ((ctrl->event_queue[loop].event_type == INT_PRESENCE_ON) || 					(ctrl->event_queue[loop].event_type == INT_PRESENCE_OFF)) {					if (HP_SUPR_RM(ctrl->ctrlcap)) {						dbg("Surprise Removal\n");						if (p_slot) {							surprise_rm_pending = (unsigned long) p_slot;							up(&event_semaphore);							update_slot_info(p_slot);						}					}				} 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;	}	if (MRL_SENS(p_slot->ctrl->ctrlcap)) {			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;		}	}		if (POWER_CTRL(p_slot->ctrl->ctrlcap)) {			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);	if (!HP_SUPR_RM(p_slot->ctrl->ctrlcap)) {			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;		}	}	if (MRL_SENS(p_slot->ctrl->ctrlcap)) {			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;		}	}	if (POWER_CTRL(p_slot->ctrl->ctrlcap)) {			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++;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩精品系列| 久久精品人人做人人爽97| 亚洲欧美激情小说另类| 99国产一区二区三精品乱码| 中日韩免费视频中文字幕| gogo大胆日本视频一区| 亚洲欧美日本在线| 欧美综合视频在线观看| 丝袜亚洲另类欧美综合| 日韩免费性生活视频播放| 国产在线国偷精品免费看| 国产喂奶挤奶一区二区三区| 成人性生交大片免费看视频在线 | 欧美无砖专区一中文字| 在线观看亚洲精品| 日韩精品久久理论片| 欧美不卡在线视频| 成人精品亚洲人成在线| 亚洲国产精品一区二区www| 欧美一区二区三区影视| 高清shemale亚洲人妖| 亚洲一区免费观看| 精品日韩欧美一区二区| 91麻豆精品在线观看| 日本女人一区二区三区| 国产精品天美传媒| 91精品国产综合久久久蜜臀图片 | 91免费视频大全| 亚洲成年人网站在线观看| 久久综合国产精品| 欧美综合色免费| 国产老肥熟一区二区三区| 一区二区三区国产豹纹内裤在线| 欧美mv和日韩mv的网站| 99久免费精品视频在线观看| 日韩成人伦理电影在线观看| 国产精品国产自产拍高清av王其| 欧美一区二区三区四区久久| 99久久精品国产一区| 久久99精品国产91久久来源| 亚洲综合小说图片| 中文字幕 久热精品 视频在线| 91精品国产综合久久蜜臀| 色综合天天综合狠狠| 国产一区二区成人久久免费影院 | 日韩视频永久免费| 色先锋久久av资源部| 国产精品国产自产拍高清av| 日韩一区二区在线观看| 91丨国产丨九色丨pron| 国产成人啪免费观看软件| 日韩激情一区二区| 亚洲午夜免费视频| 中文字幕制服丝袜一区二区三区| 亚洲男人天堂av网| 中文字幕欧美国产| 久久综合九色综合欧美亚洲| 在线不卡中文字幕| 欧美性高清videossexo| 色哟哟精品一区| 成人av网站在线| 成人看片黄a免费看在线| 极品少妇xxxx精品少妇偷拍| 日韩和欧美的一区| 亚洲高清在线视频| 亚洲大片一区二区三区| 一区二区三区**美女毛片| 亚洲女子a中天字幕| 国产精品护士白丝一区av| 日本一区二区三区在线观看| 26uuu精品一区二区| 日韩欧美一二三| 九九在线精品视频| 免费一级欧美片在线观看| 亚洲成人免费在线观看| 亚洲 欧美综合在线网络| 亚洲理论在线观看| 一区二区免费看| 一区二区三区中文字幕精品精品 | 久久这里只精品最新地址| 日韩精品一区二区三区视频| 在线成人免费视频| 日韩三级精品电影久久久| 欧美一区二区在线不卡| 日韩精品一区二区三区视频在线观看| 91精品国产麻豆| 日韩欧美123| 精品少妇一区二区三区日产乱码 | 亚洲国产cao| 亚洲日本免费电影| 亚洲欧美偷拍另类a∨色屁股| 成人欧美一区二区三区白人 | 久久伊99综合婷婷久久伊| 欧美刺激午夜性久久久久久久| 日韩一区二区电影在线| 欧美精品一区二| 国产精品传媒视频| 亚洲mv大片欧洲mv大片精品| 日日噜噜夜夜狠狠视频欧美人| 秋霞影院一区二区| 国产精品白丝jk白祙喷水网站 | 亚洲美女免费在线| 午夜影视日本亚洲欧洲精品| 麻豆一区二区99久久久久| 国产一区二区精品久久91| 国产suv精品一区二区883| 99在线精品免费| 欧美人妖巨大在线| 久久精品在这里| 亚洲欧美日韩国产一区二区三区| 亚洲一区免费观看| 国产美女精品一区二区三区| 91香蕉国产在线观看软件| 91.com在线观看| 国产精品的网站| 日韩电影在线观看一区| 处破女av一区二区| 欧美色倩网站大全免费| xnxx国产精品| 亚洲制服欧美中文字幕中文字幕| 精品亚洲国产成人av制服丝袜| 成人av午夜电影| 欧美成人在线直播| 一区二区三区成人| 成人午夜免费视频| 91精品国产丝袜白色高跟鞋| 国产精品福利影院| 麻豆国产欧美一区二区三区| 色哟哟在线观看一区二区三区| 精品国产一区二区三区忘忧草| 亚洲免费色视频| 国产精品一二三在| 91精品久久久久久久91蜜桃| ...av二区三区久久精品| 激情伊人五月天久久综合| 欧美专区在线观看一区| 亚洲国产精品高清| 美女mm1313爽爽久久久蜜臀| 欧美伊人精品成人久久综合97 | 色哟哟国产精品| 国产香蕉久久精品综合网| 日韩精品一区第一页| 91亚洲精品一区二区乱码| 国产丝袜欧美中文另类| 久久97超碰色| 日韩一区二区免费视频| 亚洲福利国产精品| 色综合久久天天综合网| 国产精品毛片高清在线完整版| 另类小说综合欧美亚洲| 538在线一区二区精品国产| 一区二区在线观看不卡| 91视频在线观看| 亚洲欧洲一区二区三区| 成人免费视频一区| 国产欧美精品区一区二区三区 | 午夜精品一区在线观看| 日本韩国一区二区三区视频| 国产精品第13页| av中文一区二区三区| 国产精品美女久久久久久久| 国产成人综合亚洲网站| 国产三级欧美三级日产三级99 | 日韩丝袜美女视频| 青青草国产成人av片免费| 这里只有精品免费| 日韩精品一级中文字幕精品视频免费观看 | 欧美日韩国产一级片| 亚洲精品视频在线观看免费| eeuss鲁一区二区三区| 中文字幕一区二区三区不卡| jlzzjlzz亚洲日本少妇| 中文字幕制服丝袜成人av| av成人免费在线观看| 自拍视频在线观看一区二区| 91美女片黄在线观看| 亚洲国产中文字幕在线视频综合 | 久久日韩粉嫩一区二区三区| 国产综合色精品一区二区三区| 久久久另类综合| 顶级嫩模精品视频在线看| 1区2区3区欧美| 欧美亚州韩日在线看免费版国语版 | 欧美性受xxxx黑人xyx性爽| 舔着乳尖日韩一区| 精品国免费一区二区三区| 国产成人亚洲综合色影视| 中文字幕在线播放不卡一区| 91麻豆蜜桃一区二区三区| 亚洲成人精品一区| 欧美tickle裸体挠脚心vk| 国产成人在线视频免费播放| 亚洲欧洲av一区二区三区久久| 91啦中文在线观看| 午夜精品久久久久久久| 亚洲精品一区二区三区在线观看| 国产a久久麻豆| 亚洲一区二区四区蜜桃| 精品日韩成人av| 99国产麻豆精品|