[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 9 Sep 2008 10:07:41 +0100
From: "Matt Fleming" <mattjfleming@...glemail.com>
To: "Pierre Ossman" <drzeus-mmc@...eus.cx>
Cc: linux-kernel@...r.kernel.org, dbrownell@...rs.sourceforge.net
Subject: Re: [RFC][PATCH] MMC: Use write timeout value as read from CSR
2008/9/9 Pierre Ossman <drzeus-mmc@...eus.cx>:
> On Tue, 9 Sep 2008 08:59:11 +0100
> "Matt Fleming" <mattjfleming@...glemail.com> wrote:
>
>>
>> OK, just to be clear, where are those fields not used? They are used
>> in the new mmc_get_timeout() function.
>>
>
> Sorry, you're right. I just noticed the !host->mmc->card part and
> assumed you had your own logic in there.
>
No worries.
> Why do you have that part though? What case have you found where you
> need the timeouts and do not have properly set timeout fields?
>
This check was put in place because the function was being called
before the card structure was setup properly. I didn't actually work
out the call path but it stopped the kmmcd thread oopsing :)
How does this patch look for the SDIO case?
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 044d84e..5ebfe35 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -249,8 +249,10 @@ void mmc_set_data_timeout(struct mmc_data *data,
const struct mmc_card *card)
* SDIO cards only define an upper 1 s limit on access.
*/
if (mmc_card_sdio(card)) {
- data->timeout_ns = 1000000000;
- data->timeout_clks = 0;
+ if (data->timeout_ns > 1000000000) {
+ data->timeout_ns = 1000000000;
+ data->timeout_clks = 0;
+ }
return;
}
View attachment "mmc-sdio-use-csr-timeout.patch" of type "text/x-diff" (531 bytes)
Powered by blists - more mailing lists