From 9605b31c2a935e1b0c537577777b6f024a090211 Mon Sep 17 00:00:00 2001 From: Wolfgang Muees Date: Tue, 26 May 2009 08:56:19 +0100 Subject: [PATCH] --- yaml --- r: 149466 b: refs/heads/master c: fdd858db7113ca64132de390188d7ca00701013d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/mmc/host/mmc_spi.c | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 010e9067719f..cb3bfb5986b3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c54f6bc67a4398243682f7438a2129906e127d21 +refs/heads/master: fdd858db7113ca64132de390188d7ca00701013d diff --git a/trunk/drivers/mmc/host/mmc_spi.c b/trunk/drivers/mmc/host/mmc_spi.c index a789db8eed28..240608cc7ae9 100644 --- a/trunk/drivers/mmc/host/mmc_spi.c +++ b/trunk/drivers/mmc/host/mmc_spi.c @@ -335,15 +335,16 @@ static int mmc_spi_response_get(struct mmc_spi_host *host, /* Status byte: the entire seven-bit R1 response. */ if (cmd->resp[0] != 0) { - if ((R1_SPI_PARAMETER | R1_SPI_ADDRESS - | R1_SPI_ILLEGAL_COMMAND) + if ((R1_SPI_PARAMETER | R1_SPI_ADDRESS) & cmd->resp[0]) - value = -EINVAL; + value = -EFAULT; /* Bad address */ + else if (R1_SPI_ILLEGAL_COMMAND & cmd->resp[0]) + value = -ENOSYS; /* Function not implemented */ else if (R1_SPI_COM_CRC & cmd->resp[0]) - value = -EILSEQ; + value = -EILSEQ; /* Illegal byte sequence */ else if ((R1_SPI_ERASE_SEQ | R1_SPI_ERASE_RESET) & cmd->resp[0]) - value = -EIO; + value = -EIO; /* I/O error */ /* else R1_SPI_IDLE, "it's resetting" */ }