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

From: Matt Fleming
Date: Tue Sep 09 2008 - 05:43:12 EST


2008/9/9 Matt Fleming <mattjfleming@xxxxxxxxxxxxxx>:
> 2008/9/9 Pierre Ossman <drzeus-mmc@xxxxxxxxx>:
>
>> 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 :)
>

The stack trace where this check is needed is here,

mmc_get_timeout()
mmc_spi_readblock()
mmc_spi_request()
mmc_wait_for_req()
mmc_send_cxd_data()
mmc_send_csd()
mmc_attach_sd()

Maybe it would be a good idea to move the line at
drivers/mmc/core/mmc.c:447 up before the call to mmc_send_csd()? Then
it'd probably be possible to remove that !host->mmc->card check from
mmc_get_timeout().
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/