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;
}