mmc: core: don't try to switch block size for dual rate mode
authorZiyuan Xu <xzy.xu@rock-chips.com>
Thu, 22 Sep 2016 09:19:21 +0000 (17:19 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Fri, 23 Sep 2016 09:06:40 +0000 (17:06 +0800)
Per spec, block size should always be 512 bytes for dual rate mode,
so any attempts to switch the block size under dual rate mode should
be neglected.

Change-Id: I6ede0d8fd6c7b8e4903a51c1c2a1b96d350bd2e2
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
drivers/mmc/core/core.c

index eb2f0917c4e7e6453f363ff028e3c96359149ac6..d72977c999adee37c7b9c9fec2719a04cdfcc6d6 100644 (file)
@@ -2419,7 +2419,8 @@ int mmc_set_blocklen(struct mmc_card *card, unsigned int blocklen)
 {
        struct mmc_command cmd = {0};
 
-       if (mmc_card_blockaddr(card) || mmc_card_ddr52(card))
+       if (mmc_card_blockaddr(card) || mmc_card_ddr52(card) ||
+           mmc_card_hs400(card) || mmc_card_hs400es(card))
                return 0;
 
        cmd.opcode = MMC_SET_BLOCKLEN;