Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
95a62965
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
95a62965
编写于
7月 28, 2005
作者:
G
Greg Kroah-Hartman
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PATCH] PCI: start paying attention to a lot of pci function return values
Signed-off-by:
N
Greg Kroah-Hartman
<
gregkh@suse.de
>
上级
085ae41f
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
39 addition
and
13 deletion
+39
-13
drivers/pci/bus.c
drivers/pci/bus.c
+2
-1
drivers/pci/pci-driver.c
drivers/pci/pci-driver.c
+4
-2
drivers/pci/pci.c
drivers/pci/pci.c
+5
-2
drivers/pci/pcie/portdrv_pci.c
drivers/pci/pcie/portdrv_pci.c
+6
-2
drivers/usb/core/hcd-pci.c
drivers/usb/core/hcd-pci.c
+19
-5
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-hcd.c
+3
-1
未找到文件。
drivers/pci/bus.c
浏览文件 @
95a62965
...
...
@@ -140,10 +140,11 @@ void __devinit pci_bus_add_devices(struct pci_bus *bus)
void
pci_enable_bridges
(
struct
pci_bus
*
bus
)
{
struct
pci_dev
*
dev
;
int
retval
;
list_for_each_entry
(
dev
,
&
bus
->
devices
,
bus_list
)
{
if
(
dev
->
subordinate
)
{
pci_enable_device
(
dev
);
retval
=
pci_enable_device
(
dev
);
pci_set_master
(
dev
);
pci_enable_bridges
(
dev
->
subordinate
);
}
...
...
drivers/pci/pci-driver.c
浏览文件 @
95a62965
...
...
@@ -272,17 +272,19 @@ static int pci_device_suspend(struct device * dev, pm_message_t state)
}
/*
/*
* Default resume method for devices that have no driver provided resume,
* or not even a driver at all.
*/
static
void
pci_default_resume
(
struct
pci_dev
*
pci_dev
)
{
int
retval
;
/* restore the PCI config space */
pci_restore_state
(
pci_dev
);
/* if the device was enabled before suspend, reenable */
if
(
pci_dev
->
is_enabled
)
pci_enable_device
(
pci_dev
);
retval
=
pci_enable_device
(
pci_dev
);
/* if the device was busmaster before the suspend, make it busmaster again */
if
(
pci_dev
->
is_busmaster
)
pci_set_master
(
pci_dev
);
...
...
drivers/pci/pci.c
浏览文件 @
95a62965
...
...
@@ -444,8 +444,11 @@ pci_enable_device_bars(struct pci_dev *dev, int bars)
{
int
err
;
pci_set_power_state
(
dev
,
PCI_D0
);
if
((
err
=
pcibios_enable_device
(
dev
,
bars
))
<
0
)
err
=
pci_set_power_state
(
dev
,
PCI_D0
);
if
(
err
)
return
err
;
err
=
pcibios_enable_device
(
dev
,
bars
);
if
(
err
<
0
)
return
err
;
return
0
;
}
...
...
drivers/pci/pcie/portdrv_pci.c
浏览文件 @
95a62965
...
...
@@ -90,15 +90,19 @@ static void pcie_portdrv_save_config(struct pci_dev *dev)
pci_save_msi_state
(
dev
);
}
static
void
pcie_portdrv_restore_config
(
struct
pci_dev
*
dev
)
static
int
pcie_portdrv_restore_config
(
struct
pci_dev
*
dev
)
{
struct
pcie_port_device_ext
*
p_ext
=
pci_get_drvdata
(
dev
);
int
retval
;
pci_restore_state
(
dev
);
if
(
p_ext
->
interrupt_mode
==
PCIE_PORT_MSI_MODE
)
pci_restore_msi_state
(
dev
);
pci_enable_device
(
dev
);
retval
=
pci_enable_device
(
dev
);
if
(
retval
)
return
retval
;
pci_set_master
(
dev
);
return
0
;
}
/*
...
...
drivers/usb/core/hcd-pci.c
浏览文件 @
95a62965
...
...
@@ -260,8 +260,10 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, pm_message_t message)
retval
=
pci_set_power_state
(
dev
,
PCI_D3hot
);
if
(
retval
==
0
)
{
dev_dbg
(
hcd
->
self
.
controller
,
"--> PCI D3
\n
"
);
pci_enable_wake
(
dev
,
PCI_D3hot
,
hcd
->
remote_wakeup
);
pci_enable_wake
(
dev
,
PCI_D3cold
,
hcd
->
remote_wakeup
);
retval
=
pci_enable_wake
(
dev
,
PCI_D3hot
,
hcd
->
remote_wakeup
);
if
(
retval
)
break
;
retval
=
pci_enable_wake
(
dev
,
PCI_D3cold
,
hcd
->
remote_wakeup
);
}
else
if
(
retval
<
0
)
{
dev_dbg
(
&
dev
->
dev
,
"PCI D3 suspend fail, %d
\n
"
,
retval
);
...
...
@@ -335,8 +337,20 @@ int usb_hcd_pci_resume (struct pci_dev *dev)
dev
->
current_state
);
}
#endif
pci_enable_wake
(
dev
,
dev
->
current_state
,
0
);
pci_enable_wake
(
dev
,
PCI_D3cold
,
0
);
retval
=
pci_enable_wake
(
dev
,
dev
->
current_state
,
0
);
if
(
retval
)
{
dev_err
(
hcd
->
self
.
controller
,
"can't enable_wake to %d, %d!
\n
"
,
dev
->
current_state
,
retval
);
return
retval
;
}
retval
=
pci_enable_wake
(
dev
,
PCI_D3cold
,
0
);
if
(
retval
)
{
dev_err
(
hcd
->
self
.
controller
,
"can't enable_wake to %d, %d!
\n
"
,
PCI_D3cold
,
retval
);
return
retval
;
}
}
else
{
/* Same basic cases: clean (powered/not), dirty */
dev_dbg
(
hcd
->
self
.
controller
,
"PCI legacy resume
\n
"
);
...
...
@@ -376,7 +390,7 @@ int usb_hcd_pci_resume (struct pci_dev *dev)
usb_hc_died
(
hcd
);
}
pci_enable_device
(
dev
);
retval
=
pci_enable_device
(
dev
);
return
retval
;
}
EXPORT_SYMBOL
(
usb_hcd_pci_resume
);
...
...
drivers/usb/host/ehci-hcd.c
浏览文件 @
95a62965
...
...
@@ -549,7 +549,9 @@ static int ehci_start (struct usb_hcd *hcd)
hcd
->
can_wakeup
=
(
port_wake
&
1
)
!=
0
;
/* help hc dma work well with cachelines */
pci_set_mwi
(
pdev
);
retval
=
pci_set_mwi
(
pdev
);
if
(
retval
)
ehci_dbg
(
ehci
,
"unable to enable MWI - not fatal.
\n
"
);
}
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录