summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsutosh Das <asutoshd@codeaurora.org>2015-07-23 11:23:44 +0530
committerSubhash Jadavani <subhashj@codeaurora.org>2016-05-31 15:27:07 -0700
commited1bdbadff70bc32ae279b9fa967094c2d784b56 (patch)
tree2ae189e5fcf404d64a57bb01b7e5e74656ff0bca
parentb7b3cd3406a1b16194a8df3e999aef85cb7e91c4 (diff)
mmc: queue: fix high power consumption
The cmdqd thread was marked as uninterruptible. This did not allow the cmdqd thread to sleep when there is no traffic. Added interruptible attributes to the thread. Change-Id: I658eecabfff074044b23c7c270c9101a34d37a45 Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
-rw-r--r--drivers/mmc/card/queue.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
index 3fcd18353eca..ea5d7bf124ac 100644
--- a/drivers/mmc/card/queue.c
+++ b/drivers/mmc/card/queue.c
@@ -98,6 +98,7 @@ static int mmc_cmdq_thread(void *d)
int ret = 0;
spin_lock_irqsave(q->queue_lock, flags);
+ set_current_state(TASK_INTERRUPTIBLE);
req = blk_peek_request(q);
if (req) {
ret = blk_queue_start_tag(q, req);
@@ -116,6 +117,7 @@ static int mmc_cmdq_thread(void *d)
schedule();
continue;
}
+ set_current_state(TASK_RUNNING);
ret = mq->cmdq_issue_fn(mq, req);
if (ret) {
pr_err("%s: failed (%d) to issue req, requeue\n",