Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
e92b9b3b
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e92b9b3b
编写于
1月 07, 2012
作者:
F
Francois Romieu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
via-rhine: rework suspend and resume.
Cover of
861ab440
. Signed-off-by:
N
Francois Romieu
<
romieu@fr.zoreil.com
>
上级
fc3e0f8a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
20 addition
and
21 deletion
+20
-21
drivers/net/ethernet/via/via-rhine.c
drivers/net/ethernet/via/via-rhine.c
+20
-21
未找到文件。
drivers/net/ethernet/via/via-rhine.c
浏览文件 @
e92b9b3b
...
...
@@ -2291,17 +2291,18 @@ static void rhine_shutdown (struct pci_dev *pdev)
spin_unlock
(
&
rp
->
lock
);
/* Hit power state D3 (sleep) */
if
(
!
avoid_D3
)
if
(
system_state
==
SYSTEM_POWER_OFF
&&
!
avoid_D3
)
{
iowrite8
(
ioread8
(
ioaddr
+
StickyHW
)
|
0x03
,
ioaddr
+
StickyHW
);
/* TODO: Check use of pci_enable_wake() */
pci_wake_from_d3
(
pdev
,
true
);
pci_set_power_state
(
pdev
,
PCI_D3hot
);
}
}
#ifdef CONFIG_PM
static
int
rhine_suspend
(
struct
pci_dev
*
pdev
,
pm_message_t
stat
e
)
#ifdef CONFIG_PM
_SLEEP
static
int
rhine_suspend
(
struct
device
*
devic
e
)
{
struct
pci_dev
*
pdev
=
to_pci_dev
(
device
);
struct
net_device
*
dev
=
pci_get_drvdata
(
pdev
);
struct
rhine_private
*
rp
=
netdev_priv
(
dev
);
...
...
@@ -2313,28 +2314,21 @@ static int rhine_suspend(struct pci_dev *pdev, pm_message_t state)
napi_disable
(
&
rp
->
napi
);
netif_device_detach
(
dev
);
pci_save_state
(
pdev
);
rhine_shutdown
(
pdev
);
return
0
;
}
static
int
rhine_resume
(
struct
pci_dev
*
pdev
)
static
int
rhine_resume
(
struct
device
*
device
)
{
struct
pci_dev
*
pdev
=
to_pci_dev
(
device
);
struct
net_device
*
dev
=
pci_get_drvdata
(
pdev
);
struct
rhine_private
*
rp
=
netdev_priv
(
dev
);
int
ret
;
if
(
!
netif_running
(
dev
))
return
0
;
ret
=
pci_set_power_state
(
pdev
,
PCI_D0
);
netif_info
(
rp
,
drv
,
dev
,
"Entering power state D0 %s (%d)
\n
"
,
ret
?
"failed"
:
"succeeded"
,
ret
);
pci_restore_state
(
pdev
);
#ifdef USE_MMIO
enable_mmio
(
rp
->
pioaddr
,
rp
->
quirks
);
#endif
...
...
@@ -2352,18 +2346,23 @@ static int rhine_resume(struct pci_dev *pdev)
return
0
;
}
#endif
/* CONFIG_PM */
static
SIMPLE_DEV_PM_OPS
(
rhine_pm_ops
,
rhine_suspend
,
rhine_resume
);
#define RHINE_PM_OPS (&rhine_pm_ops)
#else
#define RHINE_PM_OPS NULL
#endif
/* !CONFIG_PM_SLEEP */
static
struct
pci_driver
rhine_driver
=
{
.
name
=
DRV_NAME
,
.
id_table
=
rhine_pci_tbl
,
.
probe
=
rhine_init_one
,
.
remove
=
__devexit_p
(
rhine_remove_one
),
#ifdef CONFIG_PM
.
suspend
=
rhine_suspend
,
.
resume
=
rhine_resume
,
#endif
/* CONFIG_PM */
.
shutdown
=
rhine_shutdown
,
.
shutdown
=
rhine_shutdown
,
.
driver
.
pm
=
RHINE_PM_OPS
,
};
static
struct
dmi_system_id
__initdata
rhine_dmi_table
[]
=
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录