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

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

?? pciehp_core.c

?? h內核
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * PCI Express Hot Plug Controller Driver * * Copyright (C) 1995,2001 Compaq Computer Corporation * Copyright (C) 2001 Greg Kroah-Hartman (greg@kroah.com) * Copyright (C) 2001 IBM Corp. * Copyright (C) 2003-2004 Intel Corporation * * All rights reserved. * * 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. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or * NON INFRINGEMENT.  See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * Send feedback to <greg@kroah.com>, <dely.l.sy@intel.com> * */#include <linux/config.h>#include <linux/module.h>#include <linux/moduleparam.h>#include <linux/kernel.h>#include <linux/types.h>#include <linux/proc_fs.h>#include <linux/slab.h>#include <linux/workqueue.h>#include <linux/pci.h>#include <linux/init.h>#include <asm/uaccess.h>#include "pciehp.h"#include "pciehprm.h"#include <linux/interrupt.h>/* Global variables */int pciehp_debug;int pciehp_poll_mode;int pciehp_poll_time;struct controller *pciehp_ctrl_list;struct pci_func *pciehp_slot_list[256];#define DRIVER_VERSION	"0.4"#define DRIVER_AUTHOR	"Dan Zink <dan.zink@compaq.com>, Greg Kroah-Hartman <greg@kroah.com>, Dely Sy <dely.l.sy@intel.com>"#define DRIVER_DESC	"PCI Express Hot Plug Controller Driver"MODULE_AUTHOR(DRIVER_AUTHOR);MODULE_DESCRIPTION(DRIVER_DESC);MODULE_LICENSE("GPL");module_param(pciehp_debug, bool, 0644);module_param(pciehp_poll_mode, bool, 0644);module_param(pciehp_poll_time, int, 0644);MODULE_PARM_DESC(pciehp_debug, "Debugging mode enabled or not");MODULE_PARM_DESC(pciehp_poll_mode, "Using polling mechanism for hot-plug events or not");MODULE_PARM_DESC(pciehp_poll_time, "Polling mechanism frequency, in seconds");#define PCIE_MODULE_NAME "pciehp"static int pcie_start_thread (void);static int set_attention_status (struct hotplug_slot *slot, u8 value);static int enable_slot		(struct hotplug_slot *slot);static int disable_slot		(struct hotplug_slot *slot);static int get_power_status	(struct hotplug_slot *slot, u8 *value);static int get_attention_status	(struct hotplug_slot *slot, u8 *value);static int get_latch_status	(struct hotplug_slot *slot, u8 *value);static int get_adapter_status	(struct hotplug_slot *slot, u8 *value);static int get_max_bus_speed	(struct hotplug_slot *slot, enum pci_bus_speed *value);static int get_cur_bus_speed	(struct hotplug_slot *slot, enum pci_bus_speed *value);static struct hotplug_slot_ops pciehp_hotplug_slot_ops = {	.owner =		THIS_MODULE,	.set_attention_status =	set_attention_status,	.enable_slot =		enable_slot,	.disable_slot =		disable_slot,	.get_power_status =	get_power_status,	.get_attention_status =	get_attention_status,	.get_latch_status =	get_latch_status,	.get_adapter_status =	get_adapter_status,  	.get_max_bus_speed =	get_max_bus_speed,  	.get_cur_bus_speed =	get_cur_bus_speed,};static int init_slots(struct controller *ctrl){	struct slot *new_slot;	u8 number_of_slots;	u8 slot_device;	u32 slot_number;	int result = -ENOMEM;	dbg("%s\n",__FUNCTION__);	number_of_slots = ctrl->num_slots;	slot_device = ctrl->slot_device_offset;	slot_number = ctrl->first_slot;	while (number_of_slots) {		new_slot = kmalloc(sizeof(*new_slot), GFP_KERNEL);		if (!new_slot)			goto error;		memset(new_slot, 0, sizeof(struct slot));		new_slot->hotplug_slot =				kmalloc(sizeof(*(new_slot->hotplug_slot)),						GFP_KERNEL);		if (!new_slot->hotplug_slot)			goto error_slot;		memset(new_slot->hotplug_slot, 0, sizeof(struct hotplug_slot));		new_slot->hotplug_slot->info =			kmalloc(sizeof(*(new_slot->hotplug_slot->info)),						GFP_KERNEL);		if (!new_slot->hotplug_slot->info)			goto error_hpslot;		memset(new_slot->hotplug_slot->info, 0,					sizeof(struct hotplug_slot_info));		new_slot->hotplug_slot->name = kmalloc(SLOT_NAME_SIZE,						GFP_KERNEL);		if (!new_slot->hotplug_slot->name)			goto error_info;		new_slot->ctrl = ctrl;		new_slot->bus = ctrl->slot_bus;		new_slot->device = slot_device;		new_slot->hpc_ops = ctrl->hpc_ops;		new_slot->number = ctrl->first_slot;		new_slot->hp_slot = slot_device - ctrl->slot_device_offset;		/* register this slot with the hotplug pci core */		new_slot->hotplug_slot->private = new_slot;		make_slot_name (new_slot->hotplug_slot->name, SLOT_NAME_SIZE, new_slot);		new_slot->hotplug_slot->ops = &pciehp_hotplug_slot_ops;		new_slot->hpc_ops->get_power_status(new_slot, &(new_slot->hotplug_slot->info->power_status));		new_slot->hpc_ops->get_attention_status(new_slot, &(new_slot->hotplug_slot->info->attention_status));		new_slot->hpc_ops->get_latch_status(new_slot, &(new_slot->hotplug_slot->info->latch_status));		new_slot->hpc_ops->get_adapter_status(new_slot, &(new_slot->hotplug_slot->info->adapter_status));		dbg("Registering bus=%x dev=%x hp_slot=%x sun=%x slot_device_offset=%x\n", 			new_slot->bus, new_slot->device, new_slot->hp_slot, new_slot->number, ctrl->slot_device_offset);		result = pci_hp_register (new_slot->hotplug_slot);		if (result) {			err ("pci_hp_register failed with error %d\n", result);			goto error_name;		}		new_slot->next = ctrl->slot;		ctrl->slot = new_slot;		number_of_slots--;		slot_device++;		slot_number += ctrl->slot_num_inc;	}	return 0;error_name:	kfree(new_slot->hotplug_slot->name);error_info:	kfree(new_slot->hotplug_slot->info);error_hpslot:	kfree(new_slot->hotplug_slot);error_slot:	kfree(new_slot);error:	return result;}static int cleanup_slots (struct controller * ctrl){	struct slot *old_slot, *next_slot;	old_slot = ctrl->slot;	ctrl->slot = NULL;	while (old_slot) {		next_slot = old_slot->next;		pci_hp_deregister (old_slot->hotplug_slot);		kfree(old_slot->hotplug_slot->info);		kfree(old_slot->hotplug_slot->name);		kfree(old_slot->hotplug_slot);		kfree(old_slot);		old_slot = next_slot;	}	return(0);}static int get_ctlr_slot_config(struct controller *ctrl){	int num_ctlr_slots;		/* Not needed; PCI Express has 1 slot per port*/	int first_device_num;		/* Not needed */	int physical_slot_num;	u8 ctrlcap;				int rc;	rc = pcie_get_ctlr_slot_config(ctrl, &num_ctlr_slots, &first_device_num, &physical_slot_num, &ctrlcap);	if (rc) {		err("%s: get_ctlr_slot_config fail for b:d (%x:%x)\n", __FUNCTION__, ctrl->bus, ctrl->device);		return (-1);	}	ctrl->num_slots = num_ctlr_slots;	/* PCI Express has 1 slot per port */	ctrl->slot_device_offset = first_device_num;	ctrl->first_slot = physical_slot_num;	ctrl->ctrlcap = ctrlcap; 		dbg("%s: bus(0x%x) num_slot(0x%x) 1st_dev(0x%x) psn(0x%x) ctrlcap(%x) for b:d (%x:%x)\n",		__FUNCTION__, ctrl->slot_bus, num_ctlr_slots, first_device_num, physical_slot_num, ctrlcap, 		ctrl->bus, ctrl->device);	return (0);}/* * set_attention_status - Turns the Amber LED for a slot on, off or blink */static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 status){	struct slot *slot = hotplug_slot->private;	dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);	hotplug_slot->info->attention_status = status;		if (ATTN_LED(slot->ctrl->ctrlcap)) 		slot->hpc_ops->set_attention_status(slot, status);	return 0;}static int enable_slot(struct hotplug_slot *hotplug_slot){	struct slot *slot = hotplug_slot->private;	dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);	return pciehp_enable_slot(slot);}static int disable_slot(struct hotplug_slot *hotplug_slot){	struct slot *slot = hotplug_slot->private;	dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);	return pciehp_disable_slot(slot);}static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value){	struct slot *slot = hotplug_slot->private;	int retval;	dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);	retval = slot->hpc_ops->get_power_status(slot, value);	if (retval < 0)		*value = hotplug_slot->info->power_status;	return 0;}static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 *value){	struct slot *slot = hotplug_slot->private;	int retval;	dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);	retval = slot->hpc_ops->get_attention_status(slot, value);	if (retval < 0)		*value = hotplug_slot->info->attention_status;	return 0;}static int get_latch_status(struct hotplug_slot *hotplug_slot, u8 *value){	struct slot *slot = hotplug_slot->private;	int retval;	dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);	retval = slot->hpc_ops->get_latch_status(slot, value);	if (retval < 0)		*value = hotplug_slot->info->latch_status;	return 0;}static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value){	struct slot *slot = hotplug_slot->private;	int retval;	dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);	retval = slot->hpc_ops->get_adapter_status(slot, value);	if (retval < 0)		*value = hotplug_slot->info->adapter_status;	return 0;}static int get_max_bus_speed(struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value){	struct slot *slot = hotplug_slot->private;	int retval;	dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);		retval = slot->hpc_ops->get_max_bus_speed(slot, value);	if (retval < 0)		*value = PCI_SPEED_UNKNOWN;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区三区视频在线播放| 亚洲香蕉伊在人在线观| 免费成人美女在线观看| 7878成人国产在线观看| 手机精品视频在线观看| 日韩午夜精品视频| 国产精品一区二区x88av| 国产麻豆视频精品| 精品国产乱码久久久久久夜甘婷婷| 六月丁香综合在线视频| 国产精品视频九色porn| 色综合天天在线| 蜜桃传媒麻豆第一区在线观看| 欧美一区二区三区在线电影| 国产黄色精品网站| 亚洲欧美日韩国产综合| 91.xcao| 国产久卡久卡久卡久卡视频精品| 国产精品乱人伦| 欧美日韩在线亚洲一区蜜芽| 国内国产精品久久| 亚洲精品国产精品乱码不99| 欧美一级艳片视频免费观看| 成人午夜精品在线| 亚洲444eee在线观看| 久久久99精品免费观看| 色av一区二区| 国产成人免费在线| 午夜av区久久| 亚洲国产精品成人综合色在线婷婷| 欧美性生活影院| 国产精品1区2区3区在线观看| 一区二区成人在线| 久久久综合精品| 欧美久久久久久久久中文字幕| 国产精品一级在线| 天天综合天天做天天综合| 日本一区二区视频在线| 欧美二区在线观看| 99视频精品在线| 国内精品在线播放| 五月婷婷综合在线| 日韩毛片精品高清免费| 久久久久99精品一区| 6080国产精品一区二区| 91麻豆精品视频| 国产精品一区在线| 奇米影视一区二区三区| 亚洲老妇xxxxxx| 国产精品美女久久久久高潮| 久久亚洲一区二区三区明星换脸| 国产xxx精品视频大全| 国产精品不卡视频| 日韩精品中文字幕在线一区| 91色porny在线视频| 国产精品一区二区不卡| 美女尤物国产一区| 午夜视频在线观看一区| 自拍偷拍亚洲欧美日韩| 国产欧美精品一区二区色综合| 91精品国产手机| 欧美人妖巨大在线| 在线观看亚洲精品视频| 91天堂素人约啪| 成人av电影在线| 高清久久久久久| 成人手机在线视频| 国产suv精品一区二区6| 国产露脸91国语对白| 激情深爱一区二区| 国产毛片精品国产一区二区三区| 韩国成人福利片在线播放| 日韩精品乱码av一区二区| 亚洲欧洲日韩综合一区二区| 国产欧美一区二区精品性色| 久久久综合视频| 国产日韩欧美精品综合| 久久精品视频一区二区三区| 欧美精品一区二| 久久男人中文字幕资源站| 久久免费精品国产久精品久久久久| 日韩欧美美女一区二区三区| 欧美成人a视频| 国产午夜亚洲精品午夜鲁丝片| 国产日韩三级在线| 国产精品三级av| 亚洲人妖av一区二区| 伊人夜夜躁av伊人久久| 亚洲一区免费视频| 日韩成人一区二区三区在线观看| 久久精品国产一区二区| 国产一区二区看久久| 成人动漫一区二区在线| 色婷婷精品久久二区二区蜜臂av | 午夜欧美在线一二页| 午夜精品123| 狠狠色狠狠色综合系列| 成人晚上爱看视频| 欧美日韩一区二区三区四区五区| 制服丝袜av成人在线看| 亚洲精品一线二线三线| 国产精品激情偷乱一区二区∴| 亚洲美腿欧美偷拍| 日韩在线播放一区二区| 国产毛片一区二区| 91精彩视频在线观看| 欧美一区二区三区免费观看视频| 久久亚洲精华国产精华液| 国产精品的网站| 日本女人一区二区三区| 成人国产免费视频| 欧美肥大bbwbbw高潮| 国产精品污污网站在线观看| 亚洲一区二区视频在线观看| 久久er99精品| 91丨九色丨蝌蚪富婆spa| 欧美xxxxx裸体时装秀| 综合色中文字幕| 久久国产乱子精品免费女| 91丨porny丨最新| 欧美电影免费观看完整版| 国产精品电影院| 美女视频一区二区| 一本一道久久a久久精品综合蜜臀| 欧美电影免费观看完整版| 一区二区三区在线视频播放| 久久精品二区亚洲w码| 日本韩国精品在线| 欧美韩国日本不卡| 久久av资源网| 欧美一区二区网站| 玉足女爽爽91| 成人手机在线视频| 久久久综合精品| 另类中文字幕网| 欧美午夜精品久久久久久孕妇 | 国产精品久久久久精k8| 人人精品人人爱| 在线免费观看成人短视频| 国产女同互慰高潮91漫画| 秋霞影院一区二区| 欧美日韩国产一级片| 樱花影视一区二区| 97久久精品人人做人人爽| 久久精品无码一区二区三区| 琪琪一区二区三区| 88在线观看91蜜桃国自产| 亚洲综合免费观看高清完整版 | 欧美熟乱第一页| 国产精品久久久久久户外露出| 国产一区二区三区电影在线观看| 4438x成人网最大色成网站| 一区二区三区四区av| 91免费看片在线观看| 亚洲欧洲一区二区三区| 播五月开心婷婷综合| 亚洲国产精品黑人久久久| 福利电影一区二区三区| 久久久久国产成人精品亚洲午夜| 精品一区二区三区在线视频| 日韩视频免费观看高清完整版 | 国产乱子轮精品视频| 欧美不卡一区二区三区四区| 日韩中文字幕91| 这里只有精品免费| 免费的国产精品| 久久亚洲综合av| 成人网页在线观看| 日韩伦理电影网| 在线观看亚洲a| 日精品一区二区三区| 91精品国产91久久综合桃花| 免费看日韩a级影片| ww久久中文字幕| 国产·精品毛片| 亚洲欧美一区二区三区国产精品| 91玉足脚交白嫩脚丫在线播放| 亚洲免费观看高清在线观看| 在线精品国精品国产尤物884a| 亚洲高清免费视频| 6080国产精品一区二区| 狠狠网亚洲精品| 国产精品区一区二区三区| 91尤物视频在线观看| 亚洲午夜视频在线| 日韩欧美色综合| 成人性视频免费网站| 亚洲一区二区综合| 欧美一区二区三区在线观看视频| 国产精品自拍三区| 亚洲人成网站精品片在线观看 | 久久国产精品露脸对白| 久久久青草青青国产亚洲免观| 成人黄色小视频| 亚洲高清中文字幕| 久久综合五月天婷婷伊人| av在线不卡免费看| 日韩精品亚洲一区二区三区免费| 精品国产污污免费网站入口 | 国产精品国产三级国产普通话蜜臀 |