Hi, Carlo I understand now. So the problem comes out because the sw_caps.sd3_bus_mode marks the capability of a card, while the host->timing is the mode we actually do with. For your case, you are running DDR50 mode, what if we add more condition for coming into the tuning logic? struct sdhci_host *host = mmc_priv(card->host); if (!mmc_host_is_spi(card->host) && card->host->ops->execute_tuning && ((card->sw_caps.sd3_bus_mode & SD_MODE_UHS_SDR50) || (card->sw_caps.sd3_bus_mode & SD_MODE_UHS_SDR104))&& ((host->timing & MMC_TIMING_UHS_SDR50) || (host->timing & MMC_TIMING_UHS_SDR104))) { mmc_host_clk_hold(card->host); err = card->host->ops->execute_tuning(card->host, MMC_SEND_TUNING_BLOCK); mmc_host_clk_release(card->host); } -----Original Message----- From: carlo.caione@xxxxxxxxx [mailto:carlo.caione@xxxxxxxxx] On Behalf Of Carlo Caione Sent: 2015年12月18日 3:54 To: Yang, York <weijuny@xxxxxxxxxxxxxxxx> Cc: Ulf Hansson <ulf.hansson@xxxxxxxxxx>; Barry Song <21cnbao@xxxxxxxxx>; linux-mmc <linux-mmc@xxxxxxxxxxxxxxx>; DL-SHA-WorkGroupLinux <workgroup.linux@xxxxxxx>; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; Song, Barry <baohuas@xxxxxxxxxxxxxxxx> Subject: Re: [PATCH 1/2] mmc: core: enable CMD19 tuning for DDR50 mode On gio, dic 17, 2015 at 02:00:17 +0000, Yang, York wrote: > Hi, Carlo Hi Yang, > I don't understand. We can see that 9faac7b95 is all about DDR50. It > should not affect the behavior of SDR50. What I'm saying is that this commit is negatively affecting some DDR50 SDIO card as in my case. Ok, let's try to go through the code with and without 9faac7b95. Without 9faac7b95: - mmc_sdio_init_uhs_card() is called - sw_caps.sd3_bus_mode is 0x14 (SD_MODE_UHS_SDR50 | SD_MODE_UHS_DDR50) - card->sw_caps.sd3_bus_mode & SD_MODE_UHS_SDR50 is verified and mmc_execute_tuning() is called - sdhci_execute_tuning() is called - host->timing is MMC_TIMING_UHS_DDR50 - since there is no case for that we end up in 'default', goto out_unlock and CMD19 is never issued With 9faac7b95: - mmc_sdio_init_uhs_card() is called - sw_caps.sd3_bus_mode is 0x14 (SD_MODE_UHS_SDR50 | SD_MODE_UHS_DDR50) - card->sw_caps.sd3_bus_mode & SD_MODE_UHS_SDR50 is verified and mmc_execute_tuning() is called - sdhci_execute_tuning() is called - host->timing is MMC_TIMING_UHS_DDR50 - this time we have the the 'case MMC_TIMING_UHS_DDR50' and we break on that - CMD19 is issued and the card stops working > Since the commit is very simple, you may remove the change one by one > by yourself. And see if any difference occurs. As stated above the problem is in the new 'case MMC_TIMING_UHS_DDR50' we have in sdhci_execute_tuning() > Besides, please check > if the card->sw_caps.sd3_bus_mode changes with or without DDR50 tuning > enabled. It doesn't. -- Carlo Caione ��.n��������+%������w��{.n�����{��i��)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥