mei: always use domain runtime pm callbacks.
authorAlexander Usyskin <alexander.usyskin@intel.com>
Tue, 26 Sep 2017 06:18:27 +0000 (09:18 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Oct 2017 09:25:09 +0000 (11:25 +0200)
commitb42dc0635bf0a6aa59fe4d7c826796ff659908c7
tree2bcfd0b11b1ff666f5b439d9a1904332caa39f6c
parentd81fa669e3de7eb8a631d7d95dac5fbcb2bf9d4e
mei: always use domain runtime pm callbacks.

This patch fixes a regression caused by the new changes
in the "run wake" handlers.

The mei devices that support D0i3 are no longer receiving an interrupt
after entering runtime suspend state and will stall.

pci_dev_run_wake function now returns "true" for some devices
(including mei) for which it used to return "false",
arguably incorrectly as "run wake" used to mean that
wakeup signals can be generated for a device in
the working state of the system, so it could not be enabled
or disabled before too.

MEI maps runtime suspend/resume to its own defined
power gating (PG) states, (D0i3 or other depending on generation),
hence we need to go around the native PCI runtime service which
eventually brings the device into D3cold/hot state,
but the mei devices cannot wake up from D3 unlike from D0i3/PG state,
which keeps irq running.
To get around PCI device native runtime pm,
MEI uses runtime pm domain handlers which take precedence.

Cc: <stable@vger.kernel.org> #4.13+
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/pci-me.c
drivers/misc/mei/pci-txe.c