Hi Chris, On Sat, Feb 12, 2011 at 9:22 AM, Chris Ball <cjb@xxxxxxxxxx> wrote: > Hi Dmitry, > > On Sat, Feb 12, 2011 at 12:33:33AM +0000, Dmitry Shmidt wrote: >> Recently new check was added to core.c function mmc_rescan(): >> if (host->bus_ops && host->bus_ops->detect && !host->bus_dead >> && mmc_card_is_removable(host)) <<<< This one >> host->bus_ops->detect(host); >> mmc_card_is_removable() is checking >> !(host->caps & MMC_CAP_NONREMOVABLE) && mmc_assume_removable; >> >> If we use CONFIG_MMC_UNSAFE_RESUME then >> mmc_assume_removable will be 0 and any card will be always considered >> as non-removable. And host->bus_ops->detect() will not be called on card >> removal. > > I agree that we've changed the behavior to avoid running ->detect > in this case, but that was intentional -- you should not be using > CONFIG_MMC_UNSAFE_RESUME on a card that is physically removable. > Why are you trying to? MMC_UNSAFE_RESUME is affecting mmc_sdio_resume() sequence. If it is not defined then sdio card will be considered "removable" and on resume mmc_sdio_init_card() will be always called. static int mmc_sdio_resume(struct mmc_host *host) { ... if (mmc_card_is_removable(host) || !mmc_card_is_powered_resumed(host)) err = mmc_sdio_init_card(host, host->ocr, host->card, (host->pm_flags & MMC_PM_KEEP_POWER)); > > config MMC_UNSAFE_RESUME > bool "Assume MMC/SD cards are non-removable (DANGEROUS)" > ... > > Thanks, > > -- > Chris Ball <cjb@xxxxxxxxxx> <http://printf.net/> > One Laptop Per Child > Thanks, Dmitry -- 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