diff options
author | Alexander Usyskin <alexander.usyskin@intel.com> | 2015-05-07 14:53:59 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-24 20:15:53 +0200 |
commit | a1809d38900cff016b2bac9d82766f7420f8eb5d (patch) | |
tree | e9f8436ae0d878826475b80839fb99d7c10ed8ad /drivers/misc/mei/client.c | |
parent | mei: consume flow control on the first chunk of writing (diff) | |
download | linux-a1809d38900cff016b2bac9d82766f7420f8eb5d.tar.xz linux-a1809d38900cff016b2bac9d82766f7420f8eb5d.zip |
mei: request autosuspend at the end of write
On longer non-blocking write might not complete at the end of
autosuspend expiration, therefore we request autosuspend
again on the write completion.
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 '')
-rw-r--r-- | drivers/misc/mei/client.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c index ce88c2199b2c..7a5a6636f0fd 100644 --- a/drivers/misc/mei/client.c +++ b/drivers/misc/mei/client.c @@ -1459,12 +1459,18 @@ err: */ void mei_cl_complete(struct mei_cl *cl, struct mei_cl_cb *cb) { + struct mei_device *dev = cl->dev; + switch (cb->fop_type) { case MEI_FOP_WRITE: mei_io_cb_free(cb); cl->writing_state = MEI_WRITE_COMPLETE; - if (waitqueue_active(&cl->tx_wait)) + if (waitqueue_active(&cl->tx_wait)) { wake_up_interruptible(&cl->tx_wait); + } else { + pm_runtime_mark_last_busy(dev->dev); + pm_request_autosuspend(dev->dev); + } break; case MEI_FOP_READ: |