public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Sujit Reddy Thumma <sthumma@codeaurora.org>
To: Per Forlin <per.lkml@gmail.com>
Cc: David Taylor <dmtaylor@skytex.net>, linux-mmc@vger.kernel.org
Subject: Re: [PATCH] mmc: core: Kill block requests if card is removed
Date: Thu, 24 Nov 2011 17:01:15 +0530	[thread overview]
Message-ID: <4ECE2B03.5000501@codeaurora.org> (raw)
In-Reply-To: <CAFEEs1nBFFLNvRDfwFkkp5SaifmKeykS-jrEtiSHw2ahR_38Zg@mail.gmail.com>

On 11/24/2011 3:00 PM, Per Forlin wrote:
> Hi David,
>
> On Tue, Nov 22, 2011 at 9:18 PM, David Taylor<dmtaylor@skytex.net>  wrote:
>> Sujit Reddy Thumma<sthumma<at>  codeaurora.org>  writes:
>>
>>>
>>> Kill block requests when the host knows that the card is
>>> removed from the slot and is sure that subsequent requests
>>> are bound to fail. Do this silently so that the block
>>> layer doesn't output unnecessary error messages.
>>>
>>> This patch implements suggestion from Adrian Hunter,
>>> http://thread.gmane.org/gmane.linux.kernel.mmc/2714/focus=3474
>>>
>>> Signed-off-by: Sujit Reddy Thumma<sthumma<at>  codeaurora.org>
>>> ---
>>>   drivers/mmc/card/queue.c |    5 +++++
>>>   drivers/mmc/core/bus.c   |    2 ++
>>>   include/linux/mmc/card.h |    3 +++
>>>   3 files changed, 10 insertions(+), 0 deletions(-)
>>>
>>
>> Thanks, this patch worked nicely to control a seemingly endless series of
>> driver complaints when the SD card was removed during a transfer.
>>
>> The OMAP4 I'm working on has hardware assisted detection of card removal, and
>> this patch looks like it will be sufficient.
>>
> What happens if you run "dd if=/dev/zero of=/dev/mmcblk0 bs=1M
> count=1000" and during dd the card is ejected?
> When I test this, the host is claimed until the dd has tried to
> transfer all 1000MB.

That is true only when we are using >3.0 kernel.

--
Thanks,
Sujit

      reply	other threads:[~2011-11-24 11:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-09  4:31 [PATCH] mmc: core: Kill block requests if card is removed Sujit Reddy Thumma
2011-11-09  9:34 ` Adrian Hunter
2011-11-09 20:53   ` Per Forlin
2011-11-09 22:05     ` Per Forlin
2011-11-10  4:13       ` Sujit Reddy Thumma
2011-11-10  4:02     ` Sujit Reddy Thumma
2011-11-10  9:35       ` Adrian Hunter
2011-11-10 14:20         ` Per Forlin
2011-11-14  4:19           ` Sujit Reddy Thumma
2011-11-14  7:52             ` Per Forlin
2011-11-14  8:24               ` Per Forlin
2011-11-14  8:46                 ` Sujit Reddy Thumma
2011-11-09 21:47 ` Per Forlin
2011-11-10  5:31   ` Sujit Reddy Thumma
2011-11-22 20:18 ` David Taylor
2011-11-24  9:30   ` Per Forlin
2011-11-24 11:31     ` Sujit Reddy Thumma [this message]

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=4ECE2B03.5000501@codeaurora.org \
    --to=sthumma@codeaurora.org \
    --cc=dmtaylor@skytex.net \
    --cc=linux-mmc@vger.kernel.org \
    --cc=per.lkml@gmail.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