Re: [PATCH 5/7] mmc_spi: allow higher timeouts for SPI mode

From: Matt Fleming
Date: Wed Mar 11 2009 - 10:02:36 EST


On Wed, Mar 11, 2009 at 02:28:39PM +0100, Wolfgang Mües wrote:
> From: Wolfgang Muees <wolfgang.mues@xxxxxxxxxxxx>
>
> o Some SD cards have very high timeouts in SPI mode.
> So adjust the timeouts from theory to practice.
>

[...]

> + /*
> + * Some cards need very high timeouts if driven in SPI mode.
> + * The worst observed timeout was 900ms after writing a
> + * continuous stream of data until the internal logic
> + * overflowed.
> + */
> + if (mmc_host_is_spi(card->host)) {
> + if (data->flags & MMC_DATA_WRITE) {
> + if (data->timeout_ns < 1000000000)
> + data->timeout_ns = 1000000000; /* 1s */

I am correct in thinking that this patch, in conjuction with your other
patch, "[PATCH 6/7] mmc_spi: convert timeout handling to jiffies and avoid
busy waiting", will now penalize my working card and mandate a timeout
of 1 second?

Without your patch 6 at least mmc_spi_skip() would busy-wait for the
response, and if my card completed in less than 1 second then it'd just
return quicker.

It seems you've introduced a performance hit on all MMC over SPI cards.
--
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/