On 11/24/2011 3:00 PM, Per Forlin wrote:
Hi David,
On Tue, Nov 22, 2011 at 9:18 PM, David Taylor<dmtaylor@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html