All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bing Zhao <bzhao@marvell.com>
To: Sahitya Tummala <stummala@codeaurora.org>
Cc: Nicolas Pitre <nico@fluxnic.net>,
	"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>
Subject: RE: [PATCH v2] sdio: skip initialization on powered resume
Date: Wed, 15 Sep 2010 17:27:10 -0700	[thread overview]
Message-ID: <477F20668A386D41ADCC57781B1F704307D30738F5@SC-VEXCH1.marvell.com> (raw)
In-Reply-To: <1284459351.2359.17.camel@stummala-linux.in.qualcomm.com>

Hi Sahitya,

> -----Original Message-----
> From: Sahitya Tummala [mailto:stummala@codeaurora.org]
> Sent: Tuesday, September 14, 2010 3:16 AM
> To: Bing Zhao
> Cc: Nicolas Pitre; linux-mmc@vger.kernel.org; Michal Miroslaw; Chris Ball; Andrew Morton
> Subject: RE: [PATCH v2] sdio: skip initialization on powered resume
> 
> Hi Bing, Chris,
> 
> On Tue, 2010-09-07 at 19:10 -0700, Bing Zhao wrote:
> > Hi Nicolas,
> >
> > > -----Original Message-----
> > > From: Nicolas Pitre [mailto:nico@fluxnic.net]
> > > Sent: Tuesday, September 07, 2010 6:29 PM
> > > To: Bing Zhao
> > > Cc: linux-mmc@vger.kernel.org; Michal Miroslaw; Chris Ball; Andrew Morton
> > > Subject: RE: [PATCH v2] sdio: skip initialization on powered resume
> > >
> > > On Tue, 7 Sep 2010, Bing Zhao wrote:
> > >
> > > > Thanks for the hint.
> > > >
> > > > The new patch skips reading CCCR, common CIS, and validation of
> > > > vendor/device IDs inside mmc_sdio_init_card() when powered_resume is
> > > > not zero.
> > >
> > > Why do you skip the reading of the CIS and IDs validation?  That's
> > > basically the main reason for still calling mmc_sdio_init_card().  And
> > > that only requires CMD 52 so that should be fine.
> >
> > While the system is suspended, the SDIO card could be in sleep mode (deep sleep or IEEE Power Save)
> as well. Reading CIS or any other CMD52 will fail if the card happens to be in sleep at this moment.
> If we skip re-initialization (including CCCR/CIS and IDs validation), mmc_sdio_init_card() returns
> success. Then the client driver's resume() handler will be called and the card can be woken up by
> client driver.
> 
> In one of your previous patches, "sdio: don't use CMD[357] as part of a
> powered SDIO resume", its mentioned that there is an issue with CMD7 in
> mmc_sdio_init_card() that is called during SDIO resume on Marvell 8686.
> 
> But in mmc_resume_host(), there is still a call to mmc_detect_change()
> which in turn calls mmc_sdio_detect(), thus sending CMD7 to the card.
> Does CMD7 to your card succeed after your client driver resume is
> called?

If CMD7 is sent _before_ client driver's resume handler is called, while 8686 card is in sleep mode, it will fail. If CMD7 is sent _after_ client driver's resume handler is called, it should succeed.

By the way, a patch "mmc: fix all hangs related to mmc/sd card insert/removal during suspend/resume" (4c2ef25fe0b847d2ae818f74758ddb0be1c27d8e by Maxim Levitsky) has removed the call to mmc_detect_change() in mmc_resume_host().

Regards,

Bing

> 
> Thanks,
> Sahitya.
> 
> --
> Sent by a consultant of the Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
> Forum.
> 


  reply	other threads:[~2010-09-16  0:28 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 [this message]
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
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=477F20668A386D41ADCC57781B1F704307D30738F5@SC-VEXCH1.marvell.com \
    --to=bzhao@marvell.com \
    --cc=akpm@linux-foundation.org \
    --cc=cjb@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=maximlevitsky@gmail.com \
    --cc=mirqus@gmail.com \
    --cc=nico@fluxnic.net \
    --cc=stummala@codeaurora.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 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.