mmc-moxart: CMD6 locks up the controller

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

 



Hello,

newbie here, please bear with me...

It seems that CMD6/SD_SWITCH request locks up the mmc-moxart controller. It does not respond to any command after CMD6. The fix suggested by Mr. Jonas Jensen <jonas.jensen@xxxxxxxxx> is to ignore the SD_SWITCH request in moxart_request() My question is - looking at mmc_read_switch() in drivers/mmc/core/sd.c - would be -EINVAL a proper response in this case?

This diff is against kernel 4.6.

Best regards,
Michal Kadlic
---

diff -purN a/drivers/mmc/host/moxart-mmc.c b/drivers/mmc/host/moxart-mmc.c
--- a/drivers/mmc/host/moxart-mmc.c     2016-06-01 14:23:01.000000000 +0200
+++ b/drivers/mmc/host/moxart-mmc.c     2016-06-01 14:37:08.856296102 +0200
@@ -411,6 +411,14 @@ static void moxart_request(struct mmc_ho
                mrq->cmd->error = -ETIMEDOUT;
                goto request_done;
        }
+
+       if (mrq->cmd->opcode == SD_SWITCH) {
+
+                /* CMD6 (at least in mode 0) locks up the controller
+                 * so we have to ignore this request */
+                mrq->cmd->error = -EINVAL;
+                goto request_done;
+        }

        moxart_prepare_data(host);
        moxart_send_command(host, host->mrq->cmd)
--
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