summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2015-05-07 12:54:00 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-24 18:15:54 (GMT)
commit41c95b04385863f694fcf96e08994ebc722b7b9f (patch)
tree5b638016924bff6fb3625c60ff5a83e4ea77c493
parenta1809d38900cff016b2bac9d82766f7420f8eb5d (diff)
downloadlinux-41c95b04385863f694fcf96e08994ebc722b7b9f.tar.xz
mei: add also write waiting list to runtime pm blockers
The io callback is clear from write_waitling_list after we receive interrupt from the hw to ack the write completion. We need to wait for this interrupt deliver before we try to enter low power state Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/misc/mei/init.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c
index 97353cf..94514b2 100644
--- a/drivers/misc/mei/init.c
+++ b/drivers/misc/mei/init.c
@@ -361,13 +361,15 @@ bool mei_write_is_idle(struct mei_device *dev)
{
bool idle = (dev->dev_state == MEI_DEV_ENABLED &&
list_empty(&dev->ctrl_wr_list.list) &&
- list_empty(&dev->write_list.list));
+ list_empty(&dev->write_list.list) &&
+ list_empty(&dev->write_waiting_list.list));
- dev_dbg(dev->dev, "write pg: is idle[%d] state=%s ctrl=%d write=%d\n",
+ dev_dbg(dev->dev, "write pg: is idle[%d] state=%s ctrl=%01d write=%01d wwait=%01d\n",
idle,
mei_dev_state_str(dev->dev_state),
list_empty(&dev->ctrl_wr_list.list),
- list_empty(&dev->write_list.list));
+ list_empty(&dev->write_list.list),
+ list_empty(&dev->write_waiting_list.list));
return idle;
}