Hi Guennadi,
I'm having trouble using a cd-gpio. After I request it, I get the
IRQ and mmc_rescan() triggers successfully, but mmc_attach_sd()
fails because every command returns -123 (ENOMEDIUM), due to:
sdhci.c:
/* If polling, assume that the card is always present. */
if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION)
present = true;
else
present = sdhci_readl(host, SDHCI_PRESENT_STATE) &
SDHCI_CARD_PRESENT;
if (!present || host->flags & SDHCI_DEVICE_DEAD) {
host->mrq->cmd->error = -ENOMEDIUM;
tasklet_schedule(&host->finish_tasklet);
} else {
...
"present" is false because SDHCI_PRESENT_STATE doesn't have the presence
bit sent (if it did, we wouldn't need a cd-gpio, right?) and the command
fails.
And we can't just set SDHCI_QUIRK_BROKEN_CARD_DETECTION, because that
would turn on polling, which we don't want. How's this supposed to work?
Maybe your system was differently broken, and we need some new way to
communicate that neither the PRESENT bit nor polling should be used?
Thanks,
- Chris.
--
Chris Ball <[email protected]> <http://printf.net/>
One Laptop Per Child
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html