linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aaron Lu <aaron.lu@amd.com>
To: Huang Changming-R66093 <r66093@freescale.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Chris Ball <cjb@laptop.org>
Subject: Re: [PATCH 2/4 v4] MMC/SD: Add callback function to detect card
Date: Fri, 13 Jan 2012 15:36:25 +0800	[thread overview]
Message-ID: <20120113073625.GA29784@ladygaga> (raw)
In-Reply-To: <8A2FC72B45BB5A4C9F801431E06AE48F11669591@039-SN1MPN1-005.039d.mgd.msft.net>

On Fri, Jan 13, 2012 at 07:05:19AM +0000, Huang Changming-R66093 wrote:
> If you read the previous email about this serial patches discussed with other guys, you can understand.
> 
> > -----Original Message-----
> > From: Aaron Lu [mailto:aaron.lu@amd.com]
> > Sent: Friday, January 13, 2012 2:28 PM
> > To: Huang Changming-R66093
> > Cc: linux-mmc@vger.kernel.org; Chris Ball
> > Subject: Re: [PATCH 2/4 v4] MMC/SD: Add callback function to detect card
> > 
> > Hi,
> > 
> > On Fri, Jan 13, 2012 at 04:52:42AM +0000, Huang Changming-R66093 wrote:
> > >
> > > > For sd hosts, this should only happen for hosts which have
> > > > SDHCI_QUIRK_BROKEN_CARD_DETECTION set.
> > > Yes, but which will impact the performance.
> > 
> > You only set this bit when your host broke, and if your host has other
> > means to detect this, then go with your newly added callback.
> To detect the card state, if SDHCI_QUIRK_BROKEN_CARD_DETECTION is set, then driver will send command to card, which will cause the bad performance.
> So my patch will do:
> 1. use get_cd to detect the card state, if platform don't support this feature(get_cd is not defined in special platform), -ENOSYS will be returned
> 2. if -ENOSYS, then send the command to card.

OK, this is clear. I didn't know there is a get_cd callback already
defined in sdhci_ops with a clear return value description, sorry for
the mess.

> > I just suggested to change the name and use a different return value for
> > this get_cd function, not to add a new function call.
> > 
> The description for get_cd in file "include/linux/mmc/host.h":
>          * Return values for the get_cd callback should be:
>          *   0 for a absent card
>          *   1 for a present card
>          *   -ENOSYS when not supported (equal to NULL callback)
>          *   or a negative errno value when something bad happened
> I don't think your suggest is reasonable.
Agree.



  reply	other threads:[~2012-01-13  7:36 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-27  8:00 [PATCH 2/4 v4] MMC/SD: Add callback function to detect card r66093
2012-01-13  2:25 ` Huang Changming-R66093
2012-01-13  3:26   ` Aaron Lu
2012-01-13  4:52     ` Huang Changming-R66093
2012-01-13  6:27       ` Aaron Lu
2012-01-13  7:05         ` Huang Changming-R66093
2012-01-13  7:36           ` Aaron Lu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-10-30  8:12 [PATCH 1/4 v3] MMC/core: Add f_min to mmc_power_on() r66093
2012-10-30  8:12 ` [PATCH 2/4 v4] MMC/SD: Add callback function to detect card r66093
2012-10-30 11:34   ` Girish K S
2012-10-31  2:23     ` Huang Changming-R66093
2012-10-31  4:29       ` Jaehoon Chung
2012-10-31  5:52         ` Huang Changming-R66093
2012-11-01 15:57   ` Johan Rudholm
2012-11-02  1:37     ` Huang Changming-R66093
2012-11-02 10:33       ` Johan Rudholm
2012-11-05  3:17         ` Huang Changming-R66093
2012-11-05 14:07           ` Johan Rudholm
2012-11-06  1:55             ` Huang Changming-R66093
2012-11-06  1:55             ` Huang Changming-R66093
2012-11-13  7:50               ` Huang Changming-R66093
2012-11-19  2:48             ` Huang Changming-R66093
2012-11-19  3:05   ` Anton Vorontsov
2012-11-19  3:11     ` Huang Changming-R66093

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=20120113073625.GA29784@ladygaga \
    --to=aaron.lu@amd.com \
    --cc=cjb@laptop.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).