All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bing Zhao <bzhao@marvell.com>
To: Nicolas Pitre <nico@fluxnic.net>, Chris Ball <cjb@laptop.org>
Cc: zhangfei gao <zhangfei.gao@gmail.com>,
	Sahitya Tummala <stummala@codeaurora.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Michal Miroslaw <mirqus@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Maxim Levitsky <maximlevitsky@gmail.com>
Subject: RE: [PATCH v2] sdio: skip initialization on powered resume
Date: Fri, 21 Jan 2011 19:27:06 -0800	[thread overview]
Message-ID: <477F20668A386D41ADCC57781B1F704307F4EA2885@SC-VEXCH1.marvell.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1101212148320.8580@xanadu.home>



> -----Original Message-----
> From: Nicolas Pitre [mailto:nico@fluxnic.net]
> Sent: Friday, January 21, 2011 6:56 PM
> To: Bing Zhao
> Cc: zhangfei gao; Sahitya Tummala; linux-mmc@vger.kernel.org; Michal Miroslaw; Chris Ball; Andrew
> Morton; Maxim Levitsky
> Subject: RE: [PATCH v2] sdio: skip initialization on powered resume
> 
> On Fri, 21 Jan 2011, Bing Zhao wrote:
> 
> > Hi Zhangfei,
> >
> > > -----Original Message-----
> > > From: zhangfei gao [mailto:zhangfei.gao@gmail.com]
> > > Sent: Friday, January 21, 2011 1:07 AM
> > > To: Nicolas Pitre; Bing Zhao
> > > Cc: Sahitya Tummala; linux-mmc@vger.kernel.org; Michal Miroslaw; Chris Ball; Andrew Morton; Maxim
> > > Levitsky
> > > Subject: Re: [PATCH v2] sdio: skip initialization on powered resume
> > >
> > > On Wed, Sep 15, 2010 at 10:26 PM, Nicolas Pitre <nico@fluxnic.net> wrote:
> > > > On Wed, 15 Sep 2010, Bing Zhao wrote:
> > > >
> > > >> 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.
> > > >
> > > > Maybe that's what we should do in the powered suspend case then.
> > > >
> > > >> 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().
> > > >
> > > > If a card is removed while the host is suspended, then this should be
> > > > detected.
> > > >
> > > >
> > > > Nicolas
> > > > --
> > > > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> > > > the body of a message to majordomo@vger.kernel.org
> > > > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > > >
> > >
> > > Hi, Bing
> > >
> > > Do you have any updated patch to skip mmc_sdio_init_card in resume back.
> > > We need such patch in enable host sleep feature for mrvl8787.
> >
> > I posted a patch that skips mmc_sdio_init_card() with MMC_PM_SKIP_RESUME_PROBE flag earlier:
> >
> > [PATCH v1] sdio: add MMC_PM_SKIP_RESUME_PROBE to workaround powered resume
> > http://marc.info/?l=linux-mmc&m=128294262424567&w=2
> >
> > Nicolas commented that it's too hackish with this approach.
> > http://marc.info/?l=linux-mmc&m=128294738230151&w=2
> >
> > Other than that, I couldn't think of a better way to solve the issue here:
> >
> > In mmc_sdio_init_card() CIS device/vendor IDs are read to check if the
> > card has been replaced or not when the system was suspended. But
> > reading these IDs will cause CMD52 timeout if the card is in sleep
> > state. The function driver can wake up the card by writing to certain
> > card specific register, so that the followed SDIO commands (CMD52,
> > CMD53, etc.) can go through. But the resume handler of the function
> > driver won't be invoked until the IDs get validated.
> 
> Please add the extra explanation above to the commit log so that
> the context is not lost.  And then
> 
> Acked-by: Nicolas Pitre <nico@fluxnic.net>
> 
> Then this could be revisited eventually when more devices are supported
> and a better abstraction to cover their needs could be created.
> 
> 
> Nicolas

Hi Nicolas,

Thanks for ack. I'll resend the patch with extra explanation in commit log.


Hi Chris,

I'll rebase and test the patch based on git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc.git tree. Should I use "master" or "mmc-next" branch?

Thanks,

Bing


  reply	other threads:[~2011-01-22  3:32 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 [this message]
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=477F20668A386D41ADCC57781B1F704307F4EA2885@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 \
    --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.