Re: [PATCH] mmc_core: fix data timeout for SEND_EXT_CSD
From: Matt Fleming
Date: Thu Feb 19 2009 - 06:22:58 EST
On Thu, Feb 19, 2009 at 09:33:48AM +0200, Adrian Hunter wrote:
> ext Pierre Ossman wrote:
>>
>> I'm confused. Where did the 64 come from in the first place? That
>> function will not be called for CID/CSD when !SPI. So the way I see it
>> the code should be:
>>
>> if ((opcode == MMC_SEND_CSD) || (opcode == (MMC_SEND_CID)) {
>> data.timeout_ns = 0;
>> data.timeout_clks = 8;
>> } else {
>> mmc_set_data_timeout(&data, card);
>> }
>
> Theoretically yes, it should be 8 not 64 - if all the SPI devices obey
> the standard. As I do not have an SPI device I did not feel comfortable
> changing it. Also 64 clocks is not a long time anyway, so it did not
> seem to do any harm.
When I wrote the code, I got the 64 clock cycle timeout from the MMC
spec that I was looking at. Unfortunately, I don't have the spec in
front of me at the moment. It is possible that I read the timeout for
the !SPI case, though.
--
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/