Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea15ba5c authored by Wolfgang Muees's avatar Wolfgang Muees Committed by Pierre Ossman
Browse files

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: default avatarWolfgang Muees <wolfgang.mues@auerswald.de>
Acked-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
parent 48881cae
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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;