]> git.hungrycats.org Git - linux/commit
mei: don't schedule suspend in pm idle
authorAlexander Usyskin <alexander.usyskin@intel.com>
Thu, 17 Jul 2014 07:53:36 +0000 (10:53 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Sep 2014 23:36:27 +0000 (16:36 -0700)
commitdf060ede29c85fb3c79037342b75e5666fbf1b90
tree6d7e387fdd3cbacc42dcd6f2ee96e54ff362a44f
parent06dcc69217177e10028898abbf29d5cc8a582303
mei: don't schedule suspend in pm idle

commit d5d83f8abea13d0b50ee762276c6c900d1946264 upstream.

Calling pm_schedule_suspend from the runtime pm idle callback
may reschedule existing timer, thus in case of frequent runtime
rpm idle call the suspend maybe starved.
Instead we call pm_runtime_autosuspend which is checking if the
timer is already charged.

An example is monitoring device pci config space.
Pci config sysfs handlers calls pci_config_pm_runtime_put/get
helpers which in turns calls to device idle callback

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/pci-me.c
drivers/misc/mei/pci-txe.c