RE: [PATCH] mmc: remove MMC_CAP_NEEDS_POLL setting in sdhci_add_host

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Anton,
For adding a new QUICK which is something like SDHCI_QUICK_NEEDS_POLL, I think it is unnecessary since it actually has the same meaning as MMC_CAP_NEEDS_POLLING. Actually, we can directly set MMC_CAP_NEEDS_POLL in host driver.

So I prefer to review all the host drivers, and proposed relevant changes. And some vendors already have been like this(setting polling by themselves). And as u can see, I have already sent the new patch set. Pls also help review. Thanks a lot.


Best Wishes,

Yong Ding
Operating Systems Engineering,
Application Processor Systems Engineering

-----Original Message-----
From: Anton Vorontsov [mailto:anton.vorontsov@xxxxxxxxxx] 
Sent: Thursday, September 27, 2012 7:50 AM
To: Yong Ding
Cc: Chris Ball; linux-mmc@xxxxxxxxxxxxxxx; Daniel Drake; Zhangfei Gao
Subject: Re: [PATCH] mmc: remove MMC_CAP_NEEDS_POLL setting in sdhci_add_host

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.
��.n��������+%������w��{.n�����{��i��)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux