diff options
author | Wolfgang Muees <wolfgang.mues@auerswald.de> | 2009-03-11 09:17:43 -0400 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2009-03-24 16:30:02 -0400 |
commit | ea15ba5cd7bb370902cd9f6a73c2d288bfba6b2c (patch) | |
tree | 9ddf3e768f120407fa5ebe804b13a5d8f1143d80 /drivers/mmc | |
parent | 48881caec426786cd451383ee53943cc5d3bfdeb (diff) |
mmc_spi: wait more bytes for card response
Some cards are slower than the standard allows and need more
time to respond to a command. Max. observed number of bytes
was 12.
Signed-off-by: Wolfgang Muees <wolfgang.mues@auerswald.de>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/mmc_spi.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c index ad9e0e213f64..69e1442ff2e2 100644 --- a/drivers/mmc/host/mmc_spi.c +++ b/drivers/mmc/host/mmc_spi.c | |||
@@ -279,8 +279,11 @@ static int mmc_spi_response_get(struct mmc_spi_host *host, | |||
279 | * so it can always DMA directly into the target buffer. | 279 | * so it can always DMA directly into the target buffer. |
280 | * It'd probably be better to memcpy() the first chunk and | 280 | * It'd probably be better to memcpy() the first chunk and |
281 | * avoid extra i/o calls... | 281 | * avoid extra i/o calls... |
282 | * | ||
283 | * Note we check for more than 8 bytes, because in practice, | ||
284 | * some SD cards are slow... | ||
282 | */ | 285 | */ |
283 | for (i = 2; i < 9; i++) { | 286 | for (i = 2; i < 16; i++) { |
284 | value = mmc_spi_readbytes(host, 1); | 287 | value = mmc_spi_readbytes(host, 1); |
285 | if (value < 0) | 288 | if (value < 0) |
286 | goto done; | 289 | goto done; |