All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Pitre <nico@fluxnic.net>
To: Bing Zhao <bzhao@marvell.com>
Cc: linux-mmc@vger.kernel.org, Michal Miroslaw <mirqus@gmail.com>,
	Chris Ball <cjb@laptop.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v2] sdio: skip initialization on powered resume
Date: Thu, 02 Sep 2010 13:54:11 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LFD.2.00.1009021344430.19366@xanadu.home> (raw)
In-Reply-To: <1283391692-14150-1-git-send-email-bzhao@marvell.com>

On Wed, 1 Sep 2010, Bing Zhao wrote:

> Quoted Michal Miroslaw's comment:
> 
> Simplified SDIO spec v.2.00 (section 6.14 - Bus State Diagram)
> suggests, that initialization commands (CMD5, CMD3) are not accepted
> in CMD state. As the card stays in that state on powered suspend (no
> resetting CMD52 nor power cycle is issued) then reinitialization
> should be entirely skipped on resume unless the power was lost between
> suspend and resume (or card was temporarily removed from the slot).
> 
> Signed-off-by: Bing Zhao <bzhao@marvell.com>

Comments below.

> +	/*
> +	 * Simplified SDIO spec v2.00 (section 6.14 - Bus State Diagram)
> +	 * suggests that initialization should be skipped on powered resume.
> +	 */
> +	if (!(host->pm_flags & MMC_PM_KEEP_POWER)) {
> +		err = mmc_sdio_init_card(host, host->ocr, host->card,
> +					host->pm_flags & MMC_PM_KEEP_POWER);
> +	}

Please look at the if() condition, and at the last argument to 
mmc_sdio_init_card(), then ponder.

I think the proper fix goes _inside_ mmc_sdio_init_card() as there are 
certainly still validation checks which are appropriate to perform.


Nicolas

  reply	other threads:[~2010-09-02 17:54 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 [this message]
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
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=alpine.LFD.2.00.1009021344430.19366@xanadu.home \
    --to=nico@fluxnic.net \
    --cc=akpm@linux-foundation.org \
    --cc=bzhao@marvell.com \
    --cc=cjb@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=mirqus@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.