Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Linux-御风守护者
linux
提交
7682455e
L
linux
项目概览
Linux-御风守护者
/
linux
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7682455e
编写于
5月 25, 2009
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'linux-2.6.30.y' of
git://git.kernel.org/pub/scm/linux/kernel/git/inaky/wimax
上级
f11a377b
e069c0cf
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
30 addition
and
5 deletion
+30
-5
drivers/net/wimax/i2400m/usb.c
drivers/net/wimax/i2400m/usb.c
+30
-5
未找到文件。
drivers/net/wimax/i2400m/usb.c
浏览文件 @
7682455e
...
...
@@ -505,27 +505,52 @@ int i2400mu_suspend(struct usb_interface *iface, pm_message_t pm_msg)
#ifdef CONFIG_PM
struct
usb_device
*
usb_dev
=
i2400mu
->
usb_dev
;
#endif
unsigned
is_autosuspend
=
0
;
struct
i2400m
*
i2400m
=
&
i2400mu
->
i2400m
;
#ifdef CONFIG_PM
if
(
usb_dev
->
auto_pm
>
0
)
is_autosuspend
=
1
;
#endif
d_fnstart
(
3
,
dev
,
"(iface %p pm_msg %u)
\n
"
,
iface
,
pm_msg
.
event
);
if
(
i2400m
->
updown
==
0
)
goto
no_firmware
;
d_printf
(
1
,
dev
,
"fw up, requesting standby
\n
"
);
if
(
i2400m
->
state
==
I2400M_SS_DATA_PATH_CONNECTED
&&
is_autosuspend
)
{
/* ugh -- the device is connected and this suspend
* request is an autosuspend one (not a system standby
* / hibernate).
*
* The only way the device can go to standby is if the
* link with the base station is in IDLE mode; that
* were the case, we'd be in status
* I2400M_SS_CONNECTED_IDLE. But we are not.
*
* If we *tell* him to go power save now, it'll reset
* as a precautionary measure, so if this is an
* autosuspend thing, say no and it'll come back
* later, when the link is IDLE
*/
result
=
-
EBADF
;
d_printf
(
1
,
dev
,
"fw up, link up, not-idle, autosuspend: "
"not entering powersave
\n
"
);
goto
error_not_now
;
}
d_printf
(
1
,
dev
,
"fw up: entering powersave
\n
"
);
atomic_dec
(
&
i2400mu
->
do_autopm
);
result
=
i2400m_cmd_enter_powersave
(
i2400m
);
atomic_inc
(
&
i2400mu
->
do_autopm
);
#ifdef CONFIG_PM
if
(
result
<
0
&&
usb_dev
->
auto_pm
==
0
)
{
if
(
result
<
0
&&
!
is_autosuspend
)
{
/* System suspend, can't fail */
dev_err
(
dev
,
"failed to suspend, will reset on resume
\n
"
);
result
=
0
;
}
#endif
if
(
result
<
0
)
goto
error_enter_powersave
;
i2400mu_notification_release
(
i2400mu
);
d_printf
(
1
,
dev
,
"
fw up, got standby
\n
"
);
d_printf
(
1
,
dev
,
"
powersave requested
\n
"
);
error_enter_powersave:
error_not_now:
no_firmware:
d_fnend
(
3
,
dev
,
"(iface %p pm_msg %u) = %d
\n
"
,
iface
,
pm_msg
.
event
,
result
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录