All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ohad Ben-Cohen <ohad@wizery.com>
To: zhangfei gao <zhangfei.gao@gmail.com>
Cc: Bing Zhao <bzhao@marvell.com>, Nicolas Pitre <nico@fluxnic.net>,
	Sahitya Tummala <stummala@codeaurora.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Michal Miroslaw <mirqus@gmail.com>, Chris Ball <cjb@laptop.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Maxim Levitsky <maximlevitsky@gmail.com>,
	Jun Nie <njun@marvell.com>
Subject: Re: [PATCH v2] sdio: skip initialization on powered resume
Date: Tue, 25 Jan 2011 09:11:46 +0200	[thread overview]
Message-ID: <AANLkTimp4a3BSGePPBwJP3zF2vbgF0hOmRHk2uZoeUF5@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimZJbO1FNGKUG2JhJZOVeM-95cc5NuvAN+oC+Vx@mail.gmail.com>

Hello Zhangfei,

On Tue, Jan 25, 2011 at 5:10 AM, zhangfei gao <zhangfei.gao@gmail.com> wrote:
> Could we remove mmc_card_is_removable(host) condition, the skip is not
> related with whether card is removable or not, do you think so?

But, as Nicolas pointed out before, what if the card is removed (or
replaced) while the system was suspended ?

It seems that this won't be detected, and your driver, once resumed,
will assume the card is still in place and will just fail. Are you ok
with it ?

Can you please explain what's required to wake up mrvl8787 from this
deep sleep ?

One thing we can do is letting drivers register a wake-up function
within the SDIO core, just before suspending. Then, upon resume, if
such a wake-up function was registered, SDIO core would invoke it just
before it tries to read the CIS.

This way your card stays in deep sleep while the system is suspended,
and when the system wakes up, SDIO core has a chance to make sure the
card was not removed/replaced.

If the card is replaced, the wake-up function will probably just fail,
and then SDIO core will have to reinitialize that new card. I'm not
sure that's ideal, but those errors would happen anyway if we just
skip the reinitialization and let the driver assume the card wasn't
replaced.

What do you think ? Would that work for you ?

Btw we have the same thing with the wl1271. Since it's mostly
nonremovable, we're ok with 3cfc33a, but that may change.

Thanks,
Ohad.

  reply	other threads:[~2011-01-25  7:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-02  1:41 [PATCH v2] sdio: skip initialization on powered resume Bing Zhao
2010-09-02 17:54 ` Nicolas Pitre
2010-09-02 22:58   ` Bing Zhao
2010-09-02 23:30     ` Nicolas Pitre
2010-09-08  1:03       ` Bing Zhao
2010-09-08  1:28         ` Nicolas Pitre
2010-09-08  2:10           ` Bing Zhao
2010-09-14 10:15             ` Sahitya Tummala
2010-09-16  0:27               ` Bing Zhao
2010-09-16  2:26                 ` Nicolas Pitre
2011-01-21  9:07                   ` zhangfei gao
2011-01-22  2:22                     ` Bing Zhao
2011-01-22  2:55                       ` Nicolas Pitre
2011-01-22  3:27                         ` Bing Zhao
2011-01-22  3:38                           ` Chris Ball
2011-01-22 22:01                     ` Ohad Ben-Cohen
2011-01-25  2:17                       ` Bing Zhao
2011-01-25  3:10                         ` zhangfei gao
2011-01-25  7:11                           ` Ohad Ben-Cohen [this message]
2011-01-25  7:24                             ` Ohad Ben-Cohen

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=AANLkTimp4a3BSGePPBwJP3zF2vbgF0hOmRHk2uZoeUF5@mail.gmail.com \
    --to=ohad@wizery.com \
    --cc=akpm@linux-foundation.org \
    --cc=bzhao@marvell.com \
    --cc=cjb@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=maximlevitsky@gmail.com \
    --cc=mirqus@gmail.com \
    --cc=nico@fluxnic.net \
    --cc=njun@marvell.com \
    --cc=stummala@codeaurora.org \
    --cc=zhangfei.gao@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.