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

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

?? pciehp_core.c

?? 底層驅動開發
?? 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>, <kristen.c.accardi@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,};/** * release_slot - free up the memory used by a slot * @hotplug_slot: slot to free */static void release_slot(struct hotplug_slot *hotplug_slot){	struct slot *slot = hotplug_slot->private;	dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);	kfree(slot->hotplug_slot->info);	kfree(slot->hotplug_slot->name);	kfree(slot->hotplug_slot);	kfree(slot);}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;		new_slot->hotplug_slot->release = &release_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);		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;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美日本韩国| 成人免费毛片片v| 欧美三级日韩在线| 日本在线不卡视频| 日韩一区二区三区电影| 国产麻豆一精品一av一免费| 欧美经典三级视频一区二区三区| 国产传媒日韩欧美成人| 亚洲欧美电影院| 制服丝袜亚洲色图| 精品日韩一区二区三区免费视频| 亚洲永久精品国产| 国产婷婷一区二区| 欧美亚州韩日在线看免费版国语版| 亚洲国产成人91porn| 精品国产乱码久久久久久浪潮| 国产91精品精华液一区二区三区| 亚洲女爱视频在线| 国产三级一区二区三区| 欧美精品在线一区二区三区| 国产乱码精品一区二区三| 午夜精品一区二区三区三上悠亚| 国产日韩欧美电影| 制服丝袜日韩国产| 欧美午夜理伦三级在线观看| 99这里都是精品| av电影在线观看不卡| 国产资源在线一区| 精品制服美女久久| 婷婷久久综合九色综合绿巨人| 亚洲精品免费在线播放| 国产日产精品1区| 精品噜噜噜噜久久久久久久久试看 | 欧美怡红院视频| 欧美中文字幕久久| 欧美这里有精品| 欧美影院一区二区三区| 精品视频1区2区| 欧美大度的电影原声| 91精品国产免费| 久久久久久久久久久久久夜| 久久久久久一二三区| 欧美国产精品v| 日韩欧美一级精品久久| 懂色av一区二区在线播放| 国产成人av电影在线| hitomi一区二区三区精品| 91麻豆视频网站| 日韩免费高清av| 国产精品久线在线观看| 午夜视频久久久久久| 蜜桃一区二区三区在线观看| 精品一区二区在线看| 97精品国产露脸对白| 欧美视频你懂的| 国产欧美精品一区二区色综合朱莉 | 中文字幕一区三区| 日韩vs国产vs欧美| 色综合久久精品| 国产日本欧美一区二区| 亚洲大型综合色站| av影院午夜一区| 久久这里只有精品首页| 亚洲大尺度视频在线观看| 成人激情图片网| 久久久久久久久97黄色工厂| 国产精品伦一区二区三级视频| 亚洲国产日韩综合久久精品| 不卡视频在线观看| 久久久午夜精品理论片中文字幕| 亚洲国产精品久久人人爱| www.欧美日韩| 亚洲精品国产一区二区三区四区在线| 国产不卡高清在线观看视频| 欧美变态口味重另类| 日本色综合中文字幕| 国产一区二区三区久久悠悠色av| 91精品福利在线一区二区三区 | 激情文学综合丁香| 一本色道久久综合精品竹菊| 国产欧美一区二区精品忘忧草| 激情av综合网| 中文字幕一区二区三区av| 99r国产精品| 亚洲另类在线一区| 欧美精品第1页| 九色综合狠狠综合久久| 国产欧美视频一区二区| 91社区在线播放| 免费在线视频一区| 欧美国产精品一区二区三区| 成人黄色777网| 日本亚洲电影天堂| 欧美mv日韩mv国产网站app| 国产91精品精华液一区二区三区| 亚洲欧美综合网| 欧美精品tushy高清| 国产超碰在线一区| 亚洲一区二区三区四区五区黄| 日韩三级av在线播放| zzijzzij亚洲日本少妇熟睡| 婷婷综合久久一区二区三区| 国产精品无遮挡| 久久久国产精品不卡| 日本久久一区二区三区| 国产伦精品一区二区三区免费迷| 一个色妞综合视频在线观看| 中文字幕一区在线观看| 欧美日韩大陆在线| 91福利精品视频| 色婷婷久久99综合精品jk白丝| 美女网站色91| 麻豆国产一区二区| 免费看黄色91| 卡一卡二国产精品| 免费在线视频一区| 蜜臀精品一区二区三区在线观看| 午夜电影一区二区| 蜜桃av一区二区在线观看 | 播五月开心婷婷综合| 午夜av一区二区| 蜜臀av一区二区在线观看 | 日韩一区中文字幕| 中文字幕在线不卡一区二区三区| 久久久久久久久久久99999| 久久九九国产精品| 亚洲免费成人av| 婷婷开心久久网| 国产成人免费视频网站| 91亚洲永久精品| 91精品久久久久久久91蜜桃| 久久久亚洲欧洲日产国码αv| 中文字幕av资源一区| 亚洲综合色丁香婷婷六月图片| 亚洲午夜精品网| 国产精品自产自拍| 欧美无砖砖区免费| 国产亚洲一区二区在线观看| 一区二区三区丝袜| 久久精品久久99精品久久| 99久久久无码国产精品| 91精品黄色片免费大全| 国产精品久久毛片| 久久精品久久综合| 在线成人午夜影院| 一区二区三区精品| 一道本成人在线| 国产偷国产偷精品高清尤物 | 国产精品免费人成网站| 免费人成黄页网站在线一区二区| 99视频在线精品| 中文字幕第一区| 国内精品嫩模私拍在线| 日韩一卡二卡三卡| 午夜视黄欧洲亚洲| 色婷婷精品久久二区二区蜜臂av | 香蕉乱码成人久久天堂爱免费| 成人h动漫精品一区二区| 色婷婷激情综合| 欧美一区二区视频在线观看2022| 精品国产91洋老外米糕| 奇米四色…亚洲| 日韩精品一区二区三区在线| 天堂va蜜桃一区二区三区| 欧美日韩国产三级| 日韩精品国产欧美| 日韩一区二区在线播放| 激情成人综合网| 亚洲三级在线看| 欧美日韩在线观看一区二区| 亚洲成人一区在线| 精品国产91乱码一区二区三区| 久久成人免费网| 国产精品嫩草99a| 精品视频免费在线| 国产91精品一区二区麻豆网站| 国产精品白丝在线| 欧美成人精精品一区二区频| 粉嫩久久99精品久久久久久夜| 亚洲色欲色欲www在线观看| 4438x亚洲最大成人网| 成人动漫中文字幕| 丝袜亚洲另类欧美综合| 国产女人18水真多18精品一级做| 色综合天天综合网国产成人综合天 | 看国产成人h片视频| 一区二区三区中文字幕| 欧美刺激午夜性久久久久久久| 成人av中文字幕| 狠狠v欧美v日韩v亚洲ⅴ| 亚洲成人av一区二区三区| 国产精品网站在线播放| 久久九九99视频| 精品99999| 久久久777精品电影网影网| 欧美日韩情趣电影| 欧美色爱综合网| 日本大香伊一区二区三区| 99久久国产综合色|国产精品| 国产精品66部|