All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: r66093@freescale.com
Cc: linux-mmc@vger.kernel.org, Jerry Huang <Chang-Ming.Huang@freescale.com>
Subject: Re: [PATCH 3/3] MMC/SD: add callback function to detect card
Date: Fri, 27 Aug 2010 20:05:13 +0100	[thread overview]
Message-ID: <20100827190513.GC20407@void.printf.net> (raw)
In-Reply-To: <1259913309-27146-1-git-send-email-r66093@freescale.com>

Hi,

On Fri, Dec 04, 2009 at 03:55:09PM +0800, r66093@freescale.com wrote:
> From: Jerry Huang <Chang-Ming.Huang@freescale.com>
> 
> Add callback function to check if the card has been removed.
> 
> in order to check if the card has been removed, the function mmc_send_status will send commad CMD13 to card and ask the card to send its status register to driver, which will generate interrupt repeatly and make the system bad.
> Therefore, get_cd callback is used to detect the card if the driver has.
> 
> Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
> ---
>  drivers/mmc/core/mmc.c |    5 ++++-
>  drivers/mmc/core/sd.c  |    5 ++++-
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index 06084db..c5c676d 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -494,7 +494,10 @@ static void mmc_detect(struct mmc_host *host)
>  	/*
>  	 * Just check if our card has been removed.
>  	 */
> -	err = mmc_send_status(host->card, NULL);
> +	if (host->ops->get_cd)
> +		err = !host->ops->get_cd(host);
> +	else
> +		err = mmc_send_status(host->card, NULL);
>  
>  	mmc_release_host(host);
>  
> diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
> index cd81c39..3cf1f38 100644
> --- a/drivers/mmc/core/sd.c
> +++ b/drivers/mmc/core/sd.c
> @@ -548,7 +548,10 @@ static void mmc_sd_detect(struct mmc_host *host)
>  	/*
>  	 * Just check if our card has been removed.
>  	 */
> -	err = mmc_send_status(host->card, NULL);
> +	if (host->ops->get_cd)
> +		err = !host->ops->get_cd(host);
> +	else
> +		err = mmc_send_status(host->card, NULL);
>  
>  	mmc_release_host(host);
>  
> -- 
> 1.6.4

This patchset wasn't replied to -- any comments on it from the list?

-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

  parent reply	other threads:[~2010-08-27 19:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-04  7:55 [PATCH 3/3] MMC/SD: add callback function to detect card r66093
2010-01-06  2:40 ` Huang Changming-R66093
2010-08-27 19:05 ` Chris Ball [this message]
2010-08-31 19:10   ` Matt Fleming
2010-08-31 19:23     ` Adrian Hunter
2010-08-31 19:38       ` Matt Fleming
2010-08-31 19:40       ` Adrian Hunter
2010-08-31 19:57         ` Adrian Hunter
2010-09-05 21:46           ` Matt Fleming

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=20100827190513.GC20407@void.printf.net \
    --to=cjb@laptop.org \
    --cc=Chang-Ming.Huang@freescale.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=r66093@freescale.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.