Re: mmc_rescan failure in case of CONFIG_MMC_UNSAFE_RESUME

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

[Cc += Ohad]
On Mon, Feb 14, 2011 at 1:54 PM, Dmitry Shmidt <dimitrysh@xxxxxxxxxxx> wrote:
> Hi Chris,
>
> On Mon, Feb 14, 2011 at 11:40 AM, Chris Ball <cjb@xxxxxxxxxx> wrote:
>> Hi Dmitry,
>>
>> [Cc += Nico]
>>
>> On Mon, Feb 14, 2011 at 11:04:13AM -0800, Dmitry Shmidt wrote:
>>> 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));
>>
>> mmc_sdio_init_card() is supposed to be called if your card is removable,
>> because the card might have changed.  It has a fast path that's enabled
>> by MMC_PM_KEEP_POWER.  (Nicolas explained this back in October.)
>>
>> You absolutely should not enable MMC_UNSAFE_RESUME if your host has a
>> removable card.  It's an awful hack, and you just found an example of
>> where it breaks.
>
> My main concern was that here we are mixing two things: removable
> cards and cards that stay powered and need quick resume.
> It is possible to assume that last ones are not removable, but I feel
> it is not 100% correct. For example you may have
> removable wlan sdio adaptor.
>
>> If you need mmc_sdio_resume() to have an even faster path for you, we can
>> talk about that and see if it makes sense.  Misusing MMC_UNSAFE_RESUME to
>> get a powered SDIO resume is just wrong.
>
> So what can we do to suppress resume for removable sdio card ?
>
>>
>> Thanks,
>>
>> --
>> Chris Ball   <cjb@xxxxxxxxxx>   <http://printf.net/>
>> One Laptop Per Child
>>
As I wrote, Ohad's patch resolves quick resume situation for
non-removable cards, but in case of
removable - it is not working.

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


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux