mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* SD card removal issues during data transfer
@ 2009-07-07 14:56 Vishwas Poghul
  0 siblings, 0 replies; only message in thread
From: Vishwas Poghul @ 2009-07-07 14:56 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-07-07 14:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-07 14:56 SD card removal issues during data transfer Vishwas Poghul

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®