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

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

?? pciehp_core.c

?? Linux Kernel 2.6.9 for OMAP1710
?? 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/miscdevice.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"/* 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;	int updown;			/* Not needed */	int rc;	int flags;			/* Not needed */	rc = pcie_get_ctlr_slot_config(ctrl, &num_ctlr_slots, &first_device_num, &physical_slot_num, &updown, &flags);	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->slot_num_inc = updown; 	/* Not needed */		/* either -1 or 1 */	dbg("%s: bus(0x%x) num_slot(0x%x) 1st_dev(0x%x) psn(0x%x) updown(%d) for b:d (%x:%x)\n",		__FUNCTION__, ctrl->slot_bus, num_ctlr_slots, first_device_num, physical_slot_num, updown, 		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;	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;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区二区三区三四区视频在线观看 | 91精品在线观看入口| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 日韩高清一区二区| 欧美性三三影院| 视频一区国产视频| 欧美va在线播放| 国产精品456| 亚洲欧洲性图库| 欧美主播一区二区三区美女| 亚洲国产精品久久久男人的天堂| 日本亚洲欧美天堂免费| 欧美一卡二卡三卡| 国产91精品在线观看| 中文字幕日韩一区| 欧美日韩二区三区| 国产在线看一区| 欧美激情一二三区| 欧美在线免费观看亚洲| 美女尤物国产一区| 国产精品高潮久久久久无| 在线日韩av片| 国产最新精品免费| 18成人在线观看| 欧美成人免费网站| 99精品久久99久久久久| 日本不卡123| 日本一区二区在线不卡| 欧美日韩高清一区| 成人美女在线观看| 日韩精品一区第一页| 中文字幕免费一区| 欧美日韩精品一二三区| 91精品一区二区三区久久久久久 | 国产嫩草影院久久久久| 91亚洲男人天堂| 青青国产91久久久久久| 中文字幕精品综合| 欧美精品 国产精品| 岛国精品一区二区| 免费观看日韩av| 综合久久国产九一剧情麻豆| 欧美一级国产精品| 97se狠狠狠综合亚洲狠狠| 日韩专区中文字幕一区二区| 国产精品国产精品国产专区不蜜| 国产精品资源在线| 一区二区成人在线| 中文欧美字幕免费| 精品国产露脸精彩对白| 91福利社在线观看| 大胆亚洲人体视频| 国产精品资源站在线| 日韩av二区在线播放| 亚洲一区二区影院| 成人欧美一区二区三区1314| 久久亚洲综合av| 欧美一区永久视频免费观看| 一本久道久久综合中文字幕| 成人午夜短视频| 91精品国产综合久久香蕉麻豆| 天堂影院一区二区| 亚洲精品乱码久久久久久| 国产精品色一区二区三区| 日韩免费成人网| 日韩一二三区不卡| 91精品国产丝袜白色高跟鞋| 欧美日韩国产色站一区二区三区| 日本不卡视频一二三区| 一区二区三区91| 亚洲男人天堂av| 日韩美女啊v在线免费观看| 久久综合久久综合九色| 欧美va在线播放| 日韩免费高清电影| 日韩一区二区三区电影在线观看 | 日本aⅴ精品一区二区三区| 亚洲最新视频在线播放| 一级精品视频在线观看宜春院| 欧美一区二区三区爱爱| 欧美日韩激情一区二区三区| 欧美人xxxx| 欧美日韩一级视频| 欧美美女一区二区| 欧美一级片在线| 精品少妇一区二区三区日产乱码| hitomi一区二区三区精品| aaa亚洲精品| 色老综合老女人久久久| 在线精品视频小说1| 欧美视频在线一区二区三区| 91福利国产精品| 欧美军同video69gay| 日韩欧美中文字幕公布| 久久综合久久久久88| 中文字幕欧美激情一区| 亚洲蜜臀av乱码久久精品蜜桃| 久久久不卡网国产精品二区| 国产区在线观看成人精品| 亚洲天堂福利av| 亚洲综合色网站| 日日骚欧美日韩| 国产精品一区在线观看你懂的| 天堂午夜影视日韩欧美一区二区| 中文字幕电影一区| 亚洲激情av在线| 人人狠狠综合久久亚洲| 久久er精品视频| 99re视频这里只有精品| 欧美日韩国产综合一区二区三区| 91论坛在线播放| 欧美人妇做爰xxxⅹ性高电影| 在线观看亚洲精品视频| 4438x亚洲最大成人网| 国产视频一区在线观看| 亚洲日本护士毛茸茸| 日韩高清在线电影| av午夜精品一区二区三区| 欧美日韩亚洲综合一区| 久久久久久99久久久精品网站| 欧美成人女星排名| 最新日韩av在线| 久久66热偷产精品| 91极品视觉盛宴| 亚洲自拍偷拍综合| 国产精品资源站在线| 欧美日韩不卡一区二区| 欧美激情一区二区三区不卡| 亚洲18影院在线观看| 国产suv一区二区三区88区| 欧美这里有精品| 国产免费观看久久| 久久精品国产亚洲一区二区三区| 美女视频黄频大全不卡视频在线播放| 亚洲国产精品一区二区www在线| 综合色天天鬼久久鬼色| 蜜臀久久久久久久| 一本到三区不卡视频| 久久视频一区二区| 日韩专区一卡二卡| 色婷婷狠狠综合| 中文无字幕一区二区三区| 免费成人av资源网| 欧美三级日韩在线| 亚洲精品少妇30p| caoporn国产精品| 国产欧美精品一区二区三区四区 | 色噜噜狠狠一区二区三区果冻| 99re视频精品| 中文字幕欧美国产| 国产一区 二区| 精品国产一区二区三区不卡| 日韩高清不卡一区| 欧美三级一区二区| 1000部国产精品成人观看| 国产999精品久久| 精品国产乱码久久久久久久久| 久久嫩草精品久久久精品| 午夜久久久久久久久久一区二区| 蜜臀av一区二区三区| 欧美老女人第四色| 亚洲高清免费观看高清完整版在线观看 | 9人人澡人人爽人人精品| 久久视频一区二区| 国产精一品亚洲二区在线视频| 99视频热这里只有精品免费| 欧美激情综合在线| 成人h动漫精品| 亚洲欧美色综合| 色噜噜狠狠一区二区三区果冻| 欧美一级国产精品| 久久精品99国产精品| 91精品国产乱码| 蜜臀精品一区二区三区在线观看 | 国产麻豆日韩欧美久久| 欧美成人性福生活免费看| 九色porny丨国产精品| 一区二区激情小说| 欧美日韩在线播放| 午夜精品爽啪视频| 欧美成人午夜电影| 成人深夜视频在线观看| 国产精品蜜臀在线观看| 日本国产一区二区| 视频在线观看国产精品| 欧美大肚乱孕交hd孕妇| 高清国产一区二区三区| 亚洲欧美另类小说| 欧美一二三区在线| 国产成人精品在线看| 中国av一区二区三区| 色婷婷狠狠综合| 免费精品视频最新在线| 亚洲国产精品高清| 在线免费观看视频一区| 久久精品国产77777蜜臀| 国产精品久久久久久妇女6080| 狠狠色丁香婷婷综合| 日本一区二区免费在线| 91网站在线观看视频|