提交 6905b1f1 编写于 作者: R Rafael J. Wysocki 提交者: David S. Miller

Net / e100: Fix suspend of devices that cannot be power managed

If the adapter is not power-manageable using either ACPI, or the
native PCI PM interface, __e100_power_off() returns error code, which
causes every attempt to suspend to fail, although it should return 0
in such a case.  Fix this problem by ignoring the return value of
pci_set_power_state() in __e100_power_off().
Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
Acked-by: NAndreas Mohr <andi@lisas.de>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ab0a8e6c
......@@ -2895,12 +2895,13 @@ static void __e100_shutdown(struct pci_dev *pdev, bool *enable_wake)
static int __e100_power_off(struct pci_dev *pdev, bool wake)
{
if (wake) {
if (wake)
return pci_prepare_to_sleep(pdev);
} else {
pci_wake_from_d3(pdev, false);
return pci_set_power_state(pdev, PCI_D3hot);
}
pci_wake_from_d3(pdev, false);
pci_set_power_state(pdev, PCI_D3hot);
return 0;
}
#ifdef CONFIG_PM
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册