linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konstantin Dorfman <kdorfman@codeaurora.org>
To: Seungwon Jeon <tgih.jun@samsung.com>
Cc: linux-mmc@vger.kernel.org, 'Chris Ball' <cjb@laptop.org>,
	'Sujit Reddy Thumma' <sthumma@codeaurora.org>,
	'Adrian Hunter' <adrian.hunter@intel.com>
Subject: Re: [PATCH 2/2] mmc: block: don't start new request when the card is removed
Date: Fri, 08 Feb 2013 14:08:14 +0200	[thread overview]
Message-ID: <5114EAAE.6000109@codeaurora.org> (raw)
In-Reply-To: <001e01cdf88d$f666ecb0$e334c610$%jun@samsung.com>


Tested-by: Konstantin Dorfman <kdorfman@codeaurora.org>

On 01/22/2013 12:48 PM, Seungwon Jeon wrote:
> Current request can be started newly while handling the error.
> But if the card is removed, it's unnecessary to restart a request.
> This makes the extra error handling.
>
> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
> ---
>   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 f79b468..1170afe 100644
> --- a/drivers/mmc/card/block.c
> +++ b/drivers/mmc/card/block.c
> @@ -1456,8 +1456,14 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc)
>
>    start_new_req:
>   	if (rqc) {
> -		mmc_blk_rw_rq_prep(mq->mqrq_cur, card, 0, mq);
> -		mmc_start_req(card->host, &mq->mqrq_cur->mmc_active, NULL);
> +		if (mmc_card_removed(card)) {
> +			rqc->cmd_flags |= REQ_QUIET;
> +			blk_end_request_all(rqc, -EIO);
> +		} else {
> +			mmc_blk_rw_rq_prep(mq->mqrq_cur, card, 0, mq);
> +			mmc_start_req(card->host,
> +				      &mq->mqrq_cur->mmc_active, NULL);
> +		}
>   	}
>
>   	return 0;
>


-- 
Konstantin Dorfman,
QUALCOMM ISRAEL, on behalf of Qualcomm Innovation Center,
Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

  parent reply	other threads:[~2013-02-08 12:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-18  9:59 [PATCH] mmc: sdhci-s3c: fix the card detection in runtime-pm Seungwon Jeon
2012-10-18 11:02 ` [PATCH v2] " Heiko Stübner
2012-10-19  8:04   ` Seungwon Jeon
2012-10-19  8:10     ` Heiko Stübner
2012-10-29 21:16       ` Chris Ball
2012-10-29 22:37         ` Heiko Stübner
2012-10-30  3:54           ` Seungwon Jeon
2012-10-30  5:28           ` [PATCH v2 1/2] mmc: sdhci-s3c: ensure non-transaction of bus before clk_disable Seungwon Jeon
2012-11-07 19:34             ` Chris Ball
2013-01-22 10:48           ` [PATCH 2/2] mmc: block: don't start new request when the card is removed Seungwon Jeon
2013-02-01  5:25             ` Jaehoon Chung
2013-02-08 12:08             ` Konstantin Dorfman [this message]
2013-02-11 17:03             ` Chris Ball
2012-10-30  5:28         ` [PATCH v2 2/2] mmc: sdhci-s3c: fix the card detection in runtime-pm Seungwon Jeon
2012-11-07 19:36           ` Chris Ball
2012-11-09 10:41         ` [PATCH v3] mmc: sdhci-s3c: ensure non-transaction of bus before clk_disable Seungwon Jeon

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=5114EAAE.6000109@codeaurora.org \
    --to=kdorfman@codeaurora.org \
    --cc=adrian.hunter@intel.com \
    --cc=cjb@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=sthumma@codeaurora.org \
    --cc=tgih.jun@samsung.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).