Skip to content

Commit

Permalink
mmc_spi: wait more bytes for card response
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wolfgang Muees authored and Pierre Ossman committed Mar 24, 2009
1 parent 48881ca commit ea15ba5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/mmc/host/mmc_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ea15ba5

Please sign in to comment.