diff options
Diffstat (limited to 'drivers/mmc/card/block.c')
-rw-r--r-- | drivers/mmc/card/block.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 5bab73b91c20..e12a03cc2a6e 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c | |||
@@ -1932,8 +1932,14 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
1932 | } | 1932 | } |
1933 | 1933 | ||
1934 | out: | 1934 | out: |
1935 | if (!req && !(mq->flags & MMC_QUEUE_NEW_REQUEST)) | 1935 | if ((!req && !(mq->flags & MMC_QUEUE_NEW_REQUEST)) || |
1936 | /* release host only when there are no more requests */ | 1936 | (req && (req->cmd_flags & MMC_REQ_SPECIAL_MASK))) |
1937 | /* | ||
1938 | * Release host when there are no more requests | ||
1939 | * and after special request(discard, flush) is done. | ||
1940 | * In case sepecial request, there is no reentry to | ||
1941 | * the 'mmc_blk_issue_rq' with 'mqrq_prev->req'. | ||
1942 | */ | ||
1937 | mmc_release_host(card->host); | 1943 | mmc_release_host(card->host); |
1938 | return ret; | 1944 | return ret; |
1939 | } | 1945 | } |