mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vishwas Poghul <vishwaspoghul@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: SD card removal issues during data transfer
Date: Tue, 7 Jul 2009 20:26:11 +0530	[thread overview]
Message-ID: <ed41fa890907070756k28a186b0n76e7ca2fb713d41f@mail.gmail.com> (raw)

Kernel MMC/SD developers,

I've been encountering some problems when I abruptly remove SD card
during data transfer (song playback ... more so when the amount of
transfer is huge)
The kernel gets stuck in mmc_request function in the loops below
if (!mq) {
                printk(KERN_ERR "MMC: killing requests for dead queue\n");
                while ((req = elv_next_request(q)) != NULL) {
                        do {

  ret = end_that_request_chunk(req, 0,
                                        req->current_nr_sectors << 9);
                        } while (ret);
                }
                return;
        }

elv_next_requests returns the current request which is then ended with
end_that_request_chunk, however the request is never dequeued. As a
result, every
iteration of the while returns the same request and this "while"
becomes an infinite loop with the same req being returned each time

I added a call to blkdev_dequeue_request(req); after the do_while but
within the while and with this change the while loop always ends but I
observed that the kernel MMC stack sometimes(infrequent though) does
not respond to mmc_detect_change upon the next card insertion.

I'm running an ARM9 port of 2.6.24.7 kernel on a custom board with a
custom SD host controller and always use 4 bit transfer mode

Any help/info or similar experiences would be of real help.

Thanks in advance

Vishwas
Engineer at BridgeCo

                 reply	other threads:[~2009-07-07 14:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=ed41fa890907070756k28a186b0n76e7ca2fb713d41f@mail.gmail.com \
    --to=vishwaspoghul@gmail.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®