[PATCH 04/11] mmc: core: Adjust the checking for device status in mmc_send_status_error()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



mmc_send_status_error() gives up checking for bit 17 and bit 18
in device status, and add checking for unlocked status. Refer to
the comment in mmc_send_status_error() for details.

Signed-off-by: Shawn Lin <shawn.lin@xxxxxxxxxxxxxx>
---

 drivers/mmc/core/mmc_ops.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
index 6e8826e..04a5443 100644
--- a/drivers/mmc/core/mmc_ops.c
+++ b/drivers/mmc/core/mmc_ops.c
@@ -418,8 +418,16 @@ static int mmc_send_status_error(struct mmc_host *host, u32 status,
 		if (unlikely(mmc_host_is_spi(host)))
 			return (status & R1_SPI_ILLEGAL_COMMAND) ?
 				-EBADMSG : 0;
-
-		if (status & 0xFDFFA000)
+		/*
+		 * Per JESD84-B51 spec, section 6.13, table 68(Device
+		 * status), bit 17 and bit 18 are obsolete and hosts
+		 * should ignore these bits. And bit 15 means device
+		 * is locked but not unlocked by CMD42 prior to any
+		 * operations which need check busy, which is also not
+		 * allowed. So here give up checking bit 17 and bit 18,
+		 * and add checking for bit 25.
+		 */
+		if (status & 0xFFF9A000)
 			pr_warn("%s: unexpected status %#x after switch\n",
 				mmc_hostname(host), status);
 		if (status & R1_SWITCH_ERROR)
-- 
1.9.1


--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux