Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
96075315
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
96075315
编写于
2月 21, 2014
作者:
R
Rafael J. Wysocki
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'acpi-pci-hotplug' into acpi-dock
上级
59b42fa0
cc6254e0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
19 addition
and
10 deletion
+19
-10
drivers/pci/hotplug/acpiphp_glue.c
drivers/pci/hotplug/acpiphp_glue.c
+19
-10
未找到文件。
drivers/pci/hotplug/acpiphp_glue.c
浏览文件 @
96075315
...
...
@@ -255,9 +255,15 @@ static void acpiphp_dock_release(void *data)
put_bridge
(
context
->
func
.
parent
);
}
/* callback routine to register each ACPI PCI slot object */
static
acpi_status
register_slot
(
acpi_handle
handle
,
u32
lvl
,
void
*
data
,
void
**
rv
)
/**
* acpiphp_add_context - Add ACPIPHP context to an ACPI device object.
* @handle: ACPI handle of the object to add a context to.
* @lvl: Not used.
* @data: The object's parent ACPIPHP bridge.
* @rv: Not used.
*/
static
acpi_status
acpiphp_add_context
(
acpi_handle
handle
,
u32
lvl
,
void
*
data
,
void
**
rv
)
{
struct
acpiphp_bridge
*
bridge
=
data
;
struct
acpiphp_context
*
context
;
...
...
@@ -271,9 +277,6 @@ static acpi_status register_slot(acpi_handle handle, u32 lvl, void *data,
struct
pci_dev
*
pdev
=
bridge
->
pci_dev
;
u32
val
;
if
(
pdev
&&
device_is_managed_by_native_pciehp
(
pdev
))
return
AE_OK
;
status
=
acpi_evaluate_integer
(
handle
,
"_ADR"
,
NULL
,
&
adr
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
status
!=
AE_NOT_FOUND
)
...
...
@@ -325,8 +328,14 @@ static acpi_status register_slot(acpi_handle handle, u32 lvl, void *data,
list_add_tail
(
&
slot
->
node
,
&
bridge
->
slots
);
/* Register slots for ejectable functions only. */
if
(
acpi_pci_check_ejectable
(
pbus
,
handle
)
||
is_dock_device
(
handle
))
{
/*
* Expose slots to user space for functions that have _EJ0 or _RMV or
* are located in dock stations. Do not expose them for devices handled
* by the native PCIe hotplug (PCIeHP), becuase that code is supposed to
* expose slots to user space in those cases.
*/
if
((
acpi_pci_check_ejectable
(
pbus
,
handle
)
||
is_dock_device
(
handle
))
&&
!
(
pdev
&&
device_is_managed_by_native_pciehp
(
pdev
)))
{
unsigned
long
long
sun
;
int
retval
;
...
...
@@ -923,14 +932,14 @@ void acpiphp_enumerate_slots(struct pci_bus *bus)
acpi_unlock_hp_context
();
}
/*
must be added to the list prior to calling register_slot
*/
/*
Must be added to the list prior to calling acpiphp_add_context().
*/
mutex_lock
(
&
bridge_mutex
);
list_add
(
&
bridge
->
list
,
&
bridge_list
);
mutex_unlock
(
&
bridge_mutex
);
/* register all slot objects under this bridge */
status
=
acpi_walk_namespace
(
ACPI_TYPE_DEVICE
,
handle
,
1
,
register_slo
t
,
NULL
,
bridge
,
NULL
);
acpiphp_add_contex
t
,
NULL
,
bridge
,
NULL
);
if
(
ACPI_FAILURE
(
status
))
{
acpi_handle_err
(
handle
,
"failed to register slots
\n
"
);
cleanup_bridge
(
bridge
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录