From: Haavard Skinnemoen <hskinnemoen@atmel.com>
To: Pierre Ossman <drzeus@drzeus.cx>
Cc: linux-kernel@vger.kernel.org, kernel@avr32linux.org
Subject: MMC card detection
Date: Thu, 21 Feb 2008 19:46:20 +0100 [thread overview]
Message-ID: <20080221194620.6a3c0030@dhcp-252-066.norway.atmel.com> (raw)
Hi Pierre,
I've been trying to debug some card detection problems in the atmel-mci
driver. Sometimes, when I remove a card, the event doesn't seem to get
detected properly, and the MMC core thinks the card is still there.
When I re-insert the card, the MMC core thinks the card is gone.
I've tried to add a debouncing timer to avoid glitches on the card
detect pin. This helps a bit, but it does not eliminate the problem
altogether.
It seems like the problem only occurs if the card is removed very
slowly. If I increase the debouncing or detection delay, I have to
remove the card more slowly to trigger the problem.
I think the real problem is that the card detection interrupt triggers
while there is still electrical contact with the card. So when the MMC
core tries to send a SEND_STATUS command to check if it's still there,
the card will respond even though it's about to be removed. Since there
will be no more interrupts as the card is completely removed, the MMC
core will never notice that the card is gone.
When the card is reinserted, the MMC core will try to send a
SEND_STATUS command again. This time, the card won't respond because it
is in the "idle" state, and the MMC core will think the card is gone.
In order to fix this problem, I think I need a way to tell the MMC core
that the card really is gone and that there's no point trying to
communicate with it. Is there any way I can do that?
Haavard
next reply other threads:[~2008-02-21 18:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-21 18:46 Haavard Skinnemoen [this message]
2008-02-21 20:31 ` Haavard Skinnemoen
2008-02-25 17:24 ` Pierre Ossman
2008-03-06 13:39 mmc " shri
2008-03-14 22:54 ` Pierre Ossman
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=20080221194620.6a3c0030@dhcp-252-066.norway.atmel.com \
--to=hskinnemoen@atmel.com \
--cc=drzeus@drzeus.cx \
--cc=kernel@avr32linux.org \
--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®