]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Don't touch card regs after runtime suspend D3
authorDave Airlie <airlied@redhat.com>
Mon, 29 Oct 2012 23:26:54 +0000 (17:26 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 7 Nov 2012 22:24:18 +0000 (15:24 -0700)
commit2d50ed9fc858174f4c85cf2bd3f69796a5ca9c98
tree3008a3fd2494e79e2f98bf6cd304c2b8e2f8ceac
parent47e9b4f8d477fa4aee4b58e1afe93ce35e1d294e
PCI: Don't touch card regs after runtime suspend D3

If the driver takes care of state saving, don't touch any registers on it.

Optimus (dual-gpu) laptops seem to have their own form of D3cold, but
unfortunately enter it on normal D3 transitions via the ACPI callback.

So when we use runtime PM to transition to D3, the card disappears off
the PCI bus, however we then try to access registers on it in the
runtime suspend finish, which really doesn't work.

This patch checks whether the pci state is saved and doesn't attempt to hit
any registers after that point if it is.

(Looks okay to Rafael)

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci-driver.c