diff options
author | Subhash Jadavani <subhashj@codeaurora.org> | 2015-08-12 17:53:21 -0700 |
---|---|---|
committer | Subhash Jadavani <subhashj@codeaurora.org> | 2016-05-31 15:27:38 -0700 |
commit | 38c20819fce7eb22a3d0f560049fc8f5c0292bf7 (patch) | |
tree | 9ecf21631ca44ff68e1e6eb0174c5eb3564350a7 /include/linux/mmc/host.h | |
parent | b78e1b402589663b584111e24b6756beccef4797 (diff) |
mmc: queue: fix the cmdq thread wake up handling
If request has to be requeued (due to any DCMD commmand pending or cmdq
being halted) and if we change the task status to interruptible before
going to sleep then thread may not wakeup again. Note that
blk_requeue_request() doesn't trigger ->request_fn() again to wakeup
the thread.
Fix this issue by making cmdq thread wait for the completion of DCMD
or until the cmdq is unhalted. This change also simplifies the
cmdq thread function.
Change-Id: Iebffc993241e5fadb2962fedc44576566dc66e9c
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Diffstat (limited to 'include/linux/mmc/host.h')
-rw-r--r-- | include/linux/mmc/host.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index a312467be721..3b028e566282 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -244,11 +244,12 @@ struct mmc_slot { * @active_reqs requests being processed * @data_active_reqs data requests being processed * @curr_state state of cmdq engine - * @req_starved completion should invoke the request_fn since - * no tags were available * @cmdq_ctx_lock acquire this before accessing this structure * @queue_empty_wq workqueue for waiting for all * the outstanding requests to be completed + * @wait waiting for all conditions described in + * mmc_cmdq_ready_wait to be satisified before + * issuing the new request to LLD. */ struct mmc_cmdq_context_info { unsigned long active_reqs; /* in-flight requests */ @@ -257,10 +258,8 @@ struct mmc_cmdq_context_info { #define CMDQ_STATE_ERR 0 #define CMDQ_STATE_DCMD_ACTIVE 1 #define CMDQ_STATE_HALT 2 - /* no free tag available */ - unsigned long req_starved; wait_queue_head_t queue_empty_wq; - struct request_queue *q; + wait_queue_head_t wait; }; /** |