提交 c157dfa3 编写于 作者: R Rafael J. Wysocki 提交者: Jesse Barnes

PCI PM: Fix pci_prepare_to_sleep

The recently introduced pci_prepare_to_sleep() needs the following fix,
because there are systems which are not power manageable by ACPI (ie.
ACPI doesn't provide methods to put the device into low power states and
back), but require ACPI hooks to be executed for wake-up to work.
Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
上级 beef3129
...@@ -1152,7 +1152,6 @@ int pci_prepare_to_sleep(struct pci_dev *dev) ...@@ -1152,7 +1152,6 @@ int pci_prepare_to_sleep(struct pci_dev *dev)
break; break;
default: default:
target_state = state; target_state = state;
pci_enable_wake(dev, target_state, true);
} }
} else if (device_may_wakeup(&dev->dev)) { } else if (device_may_wakeup(&dev->dev)) {
/* /*
...@@ -1167,10 +1166,11 @@ int pci_prepare_to_sleep(struct pci_dev *dev) ...@@ -1167,10 +1166,11 @@ int pci_prepare_to_sleep(struct pci_dev *dev)
while (target_state while (target_state
&& !(dev->pme_support & (1 << target_state))) && !(dev->pme_support & (1 << target_state)))
target_state--; target_state--;
pci_pme_active(dev, true);
} }
} }
pci_enable_wake(dev, target_state, true);
error = pci_set_power_state(dev, target_state); error = pci_set_power_state(dev, target_state);
if (error) if (error)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册