diff options
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/mmc_spi.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c index a789db8eed28..240608cc7ae9 100644 --- a/drivers/mmc/host/mmc_spi.c +++ b/drivers/mmc/host/mmc_spi.c | |||
@@ -335,15 +335,16 @@ checkstatus: | |||
335 | 335 | ||
336 | /* Status byte: the entire seven-bit R1 response. */ | 336 | /* Status byte: the entire seven-bit R1 response. */ |
337 | if (cmd->resp[0] != 0) { | 337 | if (cmd->resp[0] != 0) { |
338 | if ((R1_SPI_PARAMETER | R1_SPI_ADDRESS | 338 | if ((R1_SPI_PARAMETER | R1_SPI_ADDRESS) |
339 | | R1_SPI_ILLEGAL_COMMAND) | ||
340 | & cmd->resp[0]) | 339 | & cmd->resp[0]) |
341 | value = -EINVAL; | 340 | value = -EFAULT; /* Bad address */ |
341 | else if (R1_SPI_ILLEGAL_COMMAND & cmd->resp[0]) | ||
342 | value = -ENOSYS; /* Function not implemented */ | ||
342 | else if (R1_SPI_COM_CRC & cmd->resp[0]) | 343 | else if (R1_SPI_COM_CRC & cmd->resp[0]) |
343 | value = -EILSEQ; | 344 | value = -EILSEQ; /* Illegal byte sequence */ |
344 | else if ((R1_SPI_ERASE_SEQ | R1_SPI_ERASE_RESET) | 345 | else if ((R1_SPI_ERASE_SEQ | R1_SPI_ERASE_RESET) |
345 | & cmd->resp[0]) | 346 | & cmd->resp[0]) |
346 | value = -EIO; | 347 | value = -EIO; /* I/O error */ |
347 | /* else R1_SPI_IDLE, "it's resetting" */ | 348 | /* else R1_SPI_IDLE, "it's resetting" */ |
348 | } | 349 | } |
349 | 350 | ||