Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gsplhtlxg
clone-Linux
提交
f1f055f1
C
clone-Linux
项目概览
gsplhtlxg
/
clone-Linux
通知
2
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
clone-Linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f1f055f1
编写于
1月 16, 2009
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge branches 'bugzilla-11884' and 'bugzilla-8544' into release
上级
4b48d9d4
c6cb0e87
0e4240d9
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
42 addition
and
47 deletion
+42
-47
drivers/acpi/ec.c
drivers/acpi/ec.c
+30
-43
drivers/acpi/thermal.c
drivers/acpi/thermal.c
+12
-4
未找到文件。
drivers/acpi/ec.c
浏览文件 @
f1f055f1
...
...
@@ -120,31 +120,6 @@ static struct acpi_ec {
spinlock_t
curr_lock
;
}
*
boot_ec
,
*
first_ec
;
/*
* Some Asus system have exchanged ECDT data/command IO addresses.
*/
static
int
print_ecdt_error
(
const
struct
dmi_system_id
*
id
)
{
printk
(
KERN_NOTICE
PREFIX
"%s detected - "
"ECDT has exchanged control/data I/O address
\n
"
,
id
->
ident
);
return
0
;
}
static
struct
dmi_system_id
__cpuinitdata
ec_dmi_table
[]
=
{
{
print_ecdt_error
,
"Asus L4R"
,
{
DMI_MATCH
(
DMI_BIOS_VERSION
,
"1008.006"
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"L4R"
),
DMI_MATCH
(
DMI_BOARD_NAME
,
"L4R"
)
},
NULL
},
{
print_ecdt_error
,
"Asus M6R"
,
{
DMI_MATCH
(
DMI_BIOS_VERSION
,
"0207"
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"M6R"
),
DMI_MATCH
(
DMI_BOARD_NAME
,
"M6R"
)
},
NULL
},
{},
};
/* --------------------------------------------------------------------------
Transaction Management
-------------------------------------------------------------------------- */
...
...
@@ -983,8 +958,8 @@ static const struct acpi_device_id ec_device_ids[] = {
int
__init
acpi_ec_ecdt_probe
(
void
)
{
acpi_status
status
;
struct
acpi_ec
*
saved_ec
=
NULL
;
struct
acpi_table_ecdt
*
ecdt_ptr
;
acpi_handle
dummy
;
boot_ec
=
make_acpi_ec
();
if
(
!
boot_ec
)
...
...
@@ -998,21 +973,16 @@ int __init acpi_ec_ecdt_probe(void)
pr_info
(
PREFIX
"EC description table is found, configuring boot EC
\n
"
);
boot_ec
->
command_addr
=
ecdt_ptr
->
control
.
address
;
boot_ec
->
data_addr
=
ecdt_ptr
->
data
.
address
;
if
(
dmi_check_system
(
ec_dmi_table
))
{
/*
* If the board falls into ec_dmi_table, it means
* that ECDT table gives the incorrect command/status
* & data I/O address. Just fix it.
*/
boot_ec
->
data_addr
=
ecdt_ptr
->
control
.
address
;
boot_ec
->
command_addr
=
ecdt_ptr
->
data
.
address
;
}
boot_ec
->
gpe
=
ecdt_ptr
->
gpe
;
boot_ec
->
handle
=
ACPI_ROOT_OBJECT
;
acpi_get_handle
(
ACPI_ROOT_OBJECT
,
ecdt_ptr
->
id
,
&
boot_ec
->
handle
);
/*
Add some basic check against completely broken table
*/
if
(
boot_ec
->
data_addr
!=
boot_ec
->
command_addr
)
/*
Don't trust ECDT, which comes from ASUSTek
*/
if
(
!
dmi_name_in_vendors
(
"ASUS"
)
)
goto
install
;
saved_ec
=
kmalloc
(
sizeof
(
struct
acpi_ec
),
GFP_KERNEL
);
if
(
!
saved_ec
)
return
-
ENOMEM
;
memcpy
(
&
saved_ec
,
boot_ec
,
sizeof
(
saved_ec
));
/* fall through */
}
/* This workaround is needed only on some broken machines,
...
...
@@ -1023,12 +993,29 @@ int __init acpi_ec_ecdt_probe(void)
/* Check that acpi_get_devices actually find something */
if
(
ACPI_FAILURE
(
status
)
||
!
boot_ec
->
handle
)
goto
error
;
if
(
saved_ec
)
{
/* try to find good ECDT from ASUSTek */
if
(
saved_ec
->
command_addr
!=
boot_ec
->
command_addr
||
saved_ec
->
data_addr
!=
boot_ec
->
data_addr
||
saved_ec
->
gpe
!=
boot_ec
->
gpe
||
saved_ec
->
handle
!=
boot_ec
->
handle
)
pr_info
(
PREFIX
"ASUSTek keeps feeding us with broken "
"ECDT tables, which are very hard to workaround. "
"Trying to use DSDT EC info instead. Please send "
"output of acpidump to linux-acpi@vger.kernel.org
\n
"
);
kfree
(
saved_ec
);
saved_ec
=
NULL
;
}
else
{
/* We really need to limit this workaround, the only ASUS,
* which needs it, has fake EC._INI method, so use it as flag.
* Keep boot_ec struct as it will be needed soon.
*/
if
(
ACPI_FAILURE
(
acpi_get_handle
(
boot_ec
->
handle
,
"_INI"
,
&
dummy
)))
acpi_handle
dummy
;
if
(
!
dmi_name_in_vendors
(
"ASUS"
)
||
ACPI_FAILURE
(
acpi_get_handle
(
boot_ec
->
handle
,
"_INI"
,
&
dummy
)))
return
-
ENODEV
;
}
install:
if
(
!
ec_install_handlers
(
boot_ec
))
{
first_ec
=
boot_ec
;
...
...
drivers/acpi/thermal.c
浏览文件 @
f1f055f1
...
...
@@ -416,7 +416,8 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
}
/* Passive (optional) */
if
(
flag
&
ACPI_TRIPS_PASSIVE
)
{
if
(((
flag
&
ACPI_TRIPS_PASSIVE
)
&&
tz
->
trips
.
passive
.
flags
.
valid
)
||
(
flag
==
ACPI_TRIPS_INIT
))
{
valid
=
tz
->
trips
.
passive
.
flags
.
valid
;
if
(
psv
==
-
1
)
{
status
=
AE_SUPPORT
;
...
...
@@ -462,8 +463,11 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
memset
(
&
devices
,
0
,
sizeof
(
struct
acpi_handle_list
));
status
=
acpi_evaluate_reference
(
tz
->
device
->
handle
,
"_PSL"
,
NULL
,
&
devices
);
if
(
ACPI_FAILURE
(
status
))
if
(
ACPI_FAILURE
(
status
))
{
printk
(
KERN_WARNING
PREFIX
"Invalid passive threshold
\n
"
);
tz
->
trips
.
passive
.
flags
.
valid
=
0
;
}
else
tz
->
trips
.
passive
.
flags
.
valid
=
1
;
...
...
@@ -487,7 +491,8 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
if
(
act
==
-
1
)
break
;
/* disable all active trip points */
if
(
flag
&
ACPI_TRIPS_ACTIVE
)
{
if
((
flag
==
ACPI_TRIPS_INIT
)
||
((
flag
&
ACPI_TRIPS_ACTIVE
)
&&
tz
->
trips
.
active
[
i
].
flags
.
valid
))
{
status
=
acpi_evaluate_integer
(
tz
->
device
->
handle
,
name
,
NULL
,
&
tmp
);
if
(
ACPI_FAILURE
(
status
))
{
...
...
@@ -521,8 +526,11 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
memset
(
&
devices
,
0
,
sizeof
(
struct
acpi_handle_list
));
status
=
acpi_evaluate_reference
(
tz
->
device
->
handle
,
name
,
NULL
,
&
devices
);
if
(
ACPI_FAILURE
(
status
))
if
(
ACPI_FAILURE
(
status
))
{
printk
(
KERN_WARNING
PREFIX
"Invalid active%d threshold
\n
"
,
i
);
tz
->
trips
.
active
[
i
].
flags
.
valid
=
0
;
}
else
tz
->
trips
.
active
[
i
].
flags
.
valid
=
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录