diff options
author | 2015-10-13 15:02:38 +0300 | |
---|---|---|
committer | 2015-10-17 21:45:05 -0700 | |
commit | 34af19132ed77b51f84274c23cef4ed520542319 (patch) | |
tree | af776ab73b4d9a71b9341fd881ea735282dfd69d /drivers/misc | |
parent | mei: cancel driver workers only after client devices were removed (diff) | |
download | linux-34af19132ed77b51f84274c23cef4ed520542319.tar.gz linux-34af19132ed77b51f84274c23cef4ed520542319.tar.bz2 linux-34af19132ed77b51f84274c23cef4ed520542319.zip |
mei: keep the device awake during reads in chunks
Long messages are read in chunks, to prevent trashing runtime pm between
the reading of the chunks we call pm_runtime_mark_last_busy() on
non-final chunk message as the next chunk of the same message will be
received immediately in the next interrupt with high probablity.
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>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/mei/interrupt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c index c418d7888994..64b568a0268d 100644 --- a/drivers/misc/mei/interrupt.c +++ b/drivers/misc/mei/interrupt.c @@ -21,6 +21,7 @@ #include <linux/fs.h> #include <linux/jiffies.h> #include <linux/slab.h> +#include <linux/pm_runtime.h> #include <linux/mei.h> @@ -147,6 +148,9 @@ int mei_cl_irq_read_msg(struct mei_cl *cl, cb->read_time = jiffies; cl_dbg(dev, cl, "completed read length = %lu\n", cb->buf_idx); list_move_tail(&cb->list, &complete_list->list); + } else { + pm_runtime_mark_last_busy(dev->dev); + pm_request_autosuspend(dev->dev); } out: |