]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Disable PME during PCI scan
authorZhao Yakui <yakui.zhao@intel.com>
Tue, 13 May 2008 03:15:05 +0000 (11:15 +0800)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 10 Jun 2008 17:59:47 +0000 (10:59 -0700)
commit39199c55f4144e3b06d9be533d048230fc527fdb
treea6add566bb0fefbddd09d53e26b680be3ccd3a9b
parentf488718f123c30f2d4f65549399f5953bd0a56d2
PCI: Disable PME during PCI scan

If a device supports #PME and can generate PME events from D0, we may see
superfluous events before a driver is loaded (drivers should only enable PME as
needed), preventing suspend from working if the corresponding GPE was enabled.

Likewise, if the ACPI device has the _PRW object, the _PSW/_DSW object will be
called in order to disable the wakeup functionality. But when it is allowed to
wake up the sleeping state, OSPM will enable it again.

So we should disable PME in the course of scanning PCI devices and enable it
again only when PME events are actually required to be generated from the
requested PCI state (for example, D3_hot or D3_cold).  It is also safe to
disable PME again when the PME is disabled for the PCI devices.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Li Shaohua <shaohua.li@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/probe.c