mmc: fix host release issue after discard/flush operation

Under function mmc_blk_issue_rq, relese the host when there
are no more requests after special request(discard, flush),
To fix reboot stuck issue.

Change-Id: Ie8d1024a4403ed8f8a3f6a2dfcd3874465b28c3b
Signed-off-by: Pavan Anamula <pavana@codeaurora.org>
This commit is contained in:
Pavan Anamula
2016-03-08 13:08:50 +05:30
parent 244bf389b1
commit 31ab7dc66c
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -2716,6 +2716,7 @@ out:
* (all existing requests completed or reinserted to the block layer)
*/
if ((!req && !(test_bit(MMC_QUEUE_NEW_REQUEST, &mq->flags))) ||
(cmd_flags & MMC_REQ_SPECIAL_MASK) ||
((test_bit(MMC_QUEUE_URGENT_REQUEST, &mq->flags)) &&
!(cmd_flags & MMC_REQ_NOREINSERT_MASK))) {
if (mmc_card_need_bkops(card))
+2
View File
@@ -1,6 +1,8 @@
#ifndef MMC_QUEUE_H
#define MMC_QUEUE_H
#define MMC_REQ_SPECIAL_MASK (REQ_DISCARD | REQ_FLUSH)
struct request;
struct task_struct;