Re: [RFC][PATCH] MMC: Use write timeout value as read from CSR

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Matt Fleming
Date: Tuesday, September 9, 2008 - 2:07 am

2008/9/9 Pierre Ossman <drzeus-mmc@drzeus.cx>:

No worries.


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;
        }
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [RFC][PATCH] MMC: Use write timeout value as read from CSR, Matt Fleming, (Tue Sep 9, 2:07 am)