All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Justin Wang (王丁)" <Justin.Wang@spreadtrum.com>
To: "'ulf.hansson@linaro.org'" <ulf.hansson@linaro.org>,
	"'kuninori.morimoto.gx@renesas.com'" 
	<kuninori.morimoto.gx@renesas.com>,
	"'jh80.chung@samsung.com'" <jh80.chung@samsung.com>,
	"'akpm@linux-foundation.org'" <akpm@linux-foundation.org>,
	"'JBottomley@Odin.com'" <JBottomley@Odin.com>,
	"'ben@decadent.org.uk'" <ben@decadent.org.uk>,
	"'chuanxiao.dong@intel.com'" <chuanxiao.dong@intel.com>
Cc: "'linux-mmc@vger.kernel.org'" <linux-mmc@vger.kernel.org>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
Subject: [PATCH] mmc: card: Fixup request missing in mmc_blk_issue_rw_rq
Date: Tue, 19 May 2015 06:32:31 +0000	[thread overview]
Message-ID: <dbf65349aac343abbd215129dd3ceefb@SHMBX03.spreadtrum.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1414 bytes --]

>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

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

WARNING: multiple messages have this Message-ID (diff)
From: "Justin Wang (王丁)" <Justin.Wang@spreadtrum.com>
To: "'ulf.hansson@linaro.org'" <ulf.hansson@linaro.org>,
	"'kuninori.morimoto.gx@renesas.com'"
	<kuninori.morimoto.gx@renesas.com>,
	"'jh80.chung@samsung.com'" <jh80.chung@samsung.com>,
	"'akpm@linux-foundation.org'" <akpm@linux-foundation.org>,
	"'JBottomley@Odin.com'" <JBottomley@Odin.com>,
	"'ben@decadent.org.uk'" <ben@decadent.org.uk>,
	"'chuanxiao.dong@intel.com'" <chuanxiao.dong@intel.com>
Cc: "'linux-mmc@vger.kernel.org'" <linux-mmc@vger.kernel.org>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
Subject: [PATCH] mmc: card: Fixup request missing in mmc_blk_issue_rw_rq
Date: Tue, 19 May 2015 06:32:31 +0000	[thread overview]
Message-ID: <dbf65349aac343abbd215129dd3ceefb@SHMBX03.spreadtrum.com> (raw)

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


             reply	other threads:[~2015-05-19  6:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-19  6:32 Justin Wang (王丁) [this message]
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-02  9:14     ` Justin Wang (王丁)
2015-06-12 12:38 ` [PATCH v2] " Justin Wang (王丁)
2015-06-12 12:38   ` Justin Wang (王丁)
2015-06-15  9:55   ` Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dbf65349aac343abbd215129dd3ceefb@SHMBX03.spreadtrum.com \
    --to=justin.wang@spreadtrum.com \
    --cc=JBottomley@Odin.com \
    --cc=akpm@linux-foundation.org \
    --cc=ben@decadent.org.uk \
    --cc=chuanxiao.dong@intel.com \
    --cc=jh80.chung@samsung.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.