summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Dorfman <kdorfman@codeaurora.org>2015-08-02 16:07:05 +0300
committerSubhash Jadavani <subhashj@codeaurora.org>2016-05-31 15:27:10 -0700
commit004730036cb47288e4354ab4f3aaf3ec061338ed (patch)
tree48238e7ee41c958f8d0d48271a67e3ffa3c0d76e
parent49dd1ccd0d1409f5ac4fd6dc5ee620adf9297701 (diff)
mmc: block: differentiate system suspend and shutdown flows
Block layer queue on suspend flow gives up if there are active requests, while shutdown flow stops issuing thread and waits for completion of outstanding requests and never give up. This change propagates additional parameter to differentiate between suspend and shutdown flows Change-Id: I35a036c1a5585e3088301c07ade7d09ebd2cfc1b Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org> [subhashj@codeaurora.org: fixed merge conflicts] Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
-rw-r--r--drivers/mmc/card/block.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index b083cdd2b0e5..17d5c0289882 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -4043,18 +4043,18 @@ static void mmc_blk_remove(struct mmc_card *card)
dev_set_drvdata(&card->dev, NULL);
}
-static int _mmc_blk_suspend(struct mmc_card *card)
+static int _mmc_blk_suspend(struct mmc_card *card, bool wait)
{
struct mmc_blk_data *part_md;
struct mmc_blk_data *md = dev_get_drvdata(&card->dev);
int rc = 0;
if (md) {
- rc = mmc_queue_suspend(&md->queue, 0);
+ rc = mmc_queue_suspend(&md->queue, wait);
if (rc)
goto out;
list_for_each_entry(part_md, &md->part, part) {
- rc = mmc_queue_suspend(&part_md->queue, 0);
+ rc = mmc_queue_suspend(&part_md->queue, wait);
if (rc)
goto out_resume;
}
@@ -4072,7 +4072,7 @@ static int _mmc_blk_suspend(struct mmc_card *card)
static void mmc_blk_shutdown(struct mmc_card *card)
{
- _mmc_blk_suspend(card);
+ _mmc_blk_suspend(card, 1);
/* send power off notification */
if (mmc_card_mmc(card))
@@ -4084,7 +4084,7 @@ static int mmc_blk_suspend(struct device *dev)
{
struct mmc_card *card = mmc_dev_to_card(dev);
- return _mmc_blk_suspend(card);
+ return _mmc_blk_suspend(card, 0);
}
static int mmc_blk_resume(struct device *dev)