On Fri, Aug 27, 2010 at 07:55:44PM +0800, Gao, Yunpeng wrote: > >-----Original Message----- > >From: linux-mmc-owner@xxxxxxxxxxxxxxx > >[mailto:linux-mmc-owner@xxxxxxxxxxxxxxx] On Behalf Of Kyungmin Park > >Sent: Friday, August 27, 2010 3:15 PM > >To: Matt Fleming > >Cc: Jaehoon Chung; linux-mmc@xxxxxxxxxxxxxxx; Marek Szyprowski; Andrew Morton; > >Ben Dooks > >Subject: Re: [PATCH] sdhci: disable MMC_CAP_NEEDS_POLL in nonremovable case > > > >On Fri, Aug 27, 2010 at 4:09 PM, Matt Fleming <matt@xxxxxxxxxxxxxxxxx> wrote: > >> On Fri, Aug 27, 2010 at 03:34:54PM +0900, Jaehoon Chung wrote: > >>> If controller use SDHCI_QUIRK_BROKEN_CARD_DETECTION quirk, > >>> controller need always polling detect > >>> > >>> In this case, always generated interrupt.Because controller checked card > >status. > >>> I think that is not efficiently. > >>> > >>> But if card is nonremovable, we need not always polling. > >>> So i added the check-point which is nonremovable or not > >>> > >>> Signed-off-by: Jaehoon Chung <jh80.chung@xxxxxxxxxxx> > >>> --- > >>> drivers/mmc/host/sdhci.c | 5 +++-- > >>> 1 files changed, 3 insertions(+), 2 deletions(-) > >>> > >>> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c > >>> index 401527d..4bc5d3c 100644 > >>> --- a/drivers/mmc/host/sdhci.c > >>> +++ b/drivers/mmc/host/sdhci.c > >>> @@ -1826,8 +1826,9 @@ int sdhci_add_host(struct sdhci_host *host) > >>> if (caps & SDHCI_CAN_DO_HISPD) > >>> mmc->caps |= MMC_CAP_SD_HIGHSPEED; > >>> > >>> - if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) > >>> - mmc->caps |= MMC_CAP_NEEDS_POLL; > >>> + if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) && > >>> + !(host->mmc->caps & MMC_CAP_NONREMOVABLE)) > >>> + mmc->caps |= MMC_CAP_NEEDS_POLL; > > Since module parameter 'mmc_assume_removable' (defined in core.c) also > controls the nonremovable attribute of the mmc/eMMC device, will it be > better to also check value of 'mmc_assume_removable' here? Thanks. Yeah, I think that check is also needed. I've got a couple of patches that I'll reply to this thread with. There should really be a helper function for determining when a card is either physially non-removable (eMMC) or logically non-removable (mmc_assume_removable == 0). -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html