public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: card: Fixup request missing in mmc_blk_issue_rw_rq
@ 2015-05-19  6:32 Justin Wang (王丁)
  2015-05-28  8:29 ` Ulf Hansson
  2015-06-12 12:38 ` [PATCH v2] " Justin Wang (王丁)
  0 siblings, 2 replies; 5+ messages in thread
From: Justin Wang (王丁) @ 2015-05-19  6:32 UTC (permalink / raw)
  To: 'ulf.hansson@linaro.org',
	'kuninori.morimoto.gx@renesas.com',
	'jh80.chung@samsung.com',
	'akpm@linux-foundation.org',
	'JBottomley@Odin.com', 'ben@decadent.org.uk',
	'chuanxiao.dong@intel.com'
  Cc: 'linux-mmc@vger.kernel.org',
	'linux-kernel@vger.kernel.org'

From 05849da563c80c20597ab6275d5881a8ed426f96 Mon Sep 17 00:00:00 2001
From: justin.wang <justin.wang@spreadtrum.com>
Date: Mon, 18 May 2015 20:14:15 +0800
Subject: [PATCH] mmc: card: Fixup request missing in mmc_blk_issue_rw_rq

The current handler of MMC_BLK_CMD_ERR in mmc_blk_issue_rw_rq function
may cause new coming request permanent missing when the ongoing
request (previoulsy started) complete end.

This would cause the process related to the missing request stay at 'D'
state forever.

Signed-off-by: Ding Wang <justin.wang@spreadtrum.com>
---
 drivers/mmc/card/block.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 60f7141..f05cd1f 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -1910,9 +1910,11 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc)
 			break;
 		case MMC_BLK_CMD_ERR:
 			ret = mmc_blk_cmd_err(md, card, brq, req, ret);
-			if (!mmc_blk_reset(md, card->host, type))
-				break;
-			goto cmd_abort;
+			if (mmc_blk_reset(md, card->host, type))
+				goto cmd_abort;
+			if (!ret)
+				goto start_new_req;
+			break;
 		case MMC_BLK_RETRY:
 			if (retry++ < 5)
 				break;
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-06-15  9:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-19  6:32 [PATCH] mmc: card: Fixup request missing in mmc_blk_issue_rw_rq Justin Wang (王丁)
2015-05-28  8:29 ` Ulf Hansson
2015-06-02  9:14   ` Justin Wang (王丁)
2015-06-12 12:38 ` [PATCH v2] " Justin Wang (王丁)
2015-06-15  9:55   ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox