@@ -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)
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@rock-chips.com> --- drivers/mmc/core/mmc_ops.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)