summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host
diff options
context:
space:
mode:
authorWolfgang Muees <wolfgang.mues@auerswald.de>2009-03-11 14:17:43 +0100
committerPierre Ossman <drzeus@drzeus.cx>2009-03-24 21:30:02 +0100
commitea15ba5cd7bb370902cd9f6a73c2d288bfba6b2c (patch)
tree9ddf3e768f120407fa5ebe804b13a5d8f1143d80 /drivers/mmc/host
parent48881caec426786cd451383ee53943cc5d3bfdeb (diff)
downloadop-kernel-dev-ea15ba5cd7bb370902cd9f6a73c2d288bfba6b2c.zip
op-kernel-dev-ea15ba5cd7bb370902cd9f6a73c2d288bfba6b2c.tar.gz
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/host')
-rw-r--r--drivers/mmc/host/mmc_spi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
index ad9e0e2..69e1442 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,
* so it can always DMA directly into the target buffer.
* It'd probably be better to memcpy() the first chunk and
* avoid extra i/o calls...
+ *
+ * Note we check for more than 8 bytes, because in practice,
+ * some SD cards are slow...
*/
- for (i = 2; i < 9; i++) {
+ for (i = 2; i < 16; i++) {
value = mmc_spi_readbytes(host, 1);
if (value < 0)
goto done;
OpenPOWER on IntegriCloud