All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Vorontsov <anton.vorontsov@linaro.org>
To: Yong Ding <yongd@marvell.com>
Cc: Chris Ball <cjb@laptop.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Daniel Drake <dsd@laptop.org>, Zhangfei Gao <zgao6@marvell.com>
Subject: Re: [PATCH] mmc: remove MMC_CAP_NEEDS_POLL setting in sdhci_add_host
Date: Wed, 26 Sep 2012 16:49:36 -0700	[thread overview]
Message-ID: <20120926234936.GB7203@lizard> (raw)
In-Reply-To: <89813612683626448B837EE5A0B6A7CB30384F5CAD@SC-VEXCH4.marvell.com>

On Tue, Sep 25, 2012 at 02:13:10AM -0700, Yong Ding wrote:
[...]
> So, in all, u are right if with my current patch, some host drivers need
> some improvement to add MMC_CAP_NEEDS_POLL when it is actually needed.
> But I think this shall be the right way to follow. Or, we might enable
> polling for some cases in which it is unnecessary, and maybe this is a
> potential issue-bomb. How do u think?

I think if you carefully review and fixup all the drivers, it will be
fine.

But you'd have to add MMC_CAP_NEEDS_POLL into drivers' code (while w/ the
quirk it's less lines of code for drivers).

So, here is another idea: how about something like this

#define SDHCI_QUIRK_NEEDS_POLL \
	(SDHCI_QUIRK_BROKEN_CARD_DETECTION | (1 << NN))

And changing the logic to:

	if ((host->quirks & SDHCI_QUIRK_NEEDS_POLL) &&
	    !(host->mmc->caps & MMC_CAP_NONREMOVABLE))
		mmc->caps |= MMC_CAP_NEEDS_POLL;

And then, you'd just convert all the current drivers to
SDHCI_QUIRK_NEEDS_POLL (which would be 100% safe), and for your driver,
you'd only set SDHCI_QUIRK_BROKEN_CARD_DETECTION.

Thanks,
Anton.

  reply	other threads:[~2012-09-26 23:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-25  6:34 [PATCH] mmc: remove MMC_CAP_NEEDS_POLL setting in sdhci_add_host yongd
2012-09-25  7:04 ` Anton Vorontsov
2012-09-25  9:13   ` Yong Ding
2012-09-26 23:49     ` Anton Vorontsov [this message]
2012-09-28 10:39       ` Yong Ding

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=20120926234936.GB7203@lizard \
    --to=anton.vorontsov@linaro.org \
    --cc=cjb@laptop.org \
    --cc=dsd@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=yongd@marvell.com \
    --cc=zgao6@marvell.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.