linux/drivers/mmc/host
Douglas Anderson 7463e4ccb7 mmc: sdhci-msm: Add retries when all tuning phases are found valid
[ Upstream commit 9d5dcefb7b ]

As the comments in this patch say, if we tune and find all phases are
valid it's _almost_ as bad as no phases being found valid.  Probably
all phases are not really reliable but we didn't detect where the
unreliable place is.  That means we'll essentially be guessing and
hoping we get a good phase.

This is not just a problem in theory.  It was causing real problems on
a real board.  On that board, most often phase 10 is found as the only
invalid phase, though sometimes 10 and 11 are invalid and sometimes
just 11.  Some percentage of the time, however, all phases are found
to be valid.  When this happens, the current logic will decide to use
phase 11.  Since phase 11 is sometimes found to be invalid, this is a
bad choice.  Sure enough, when phase 11 is picked we often get mmc
errors later in boot.

I have seen cases where all phases were found to be valid 3 times in a
row, so increase the retry count to 10 just to be extra sure.

Fixes: 415b5a75da ("mmc: sdhci-msm: Add platform_execute_tuning implementation")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20200827075809.1.If179abf5ecb67c963494db79c3bc4247d987419b@changeid
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-09-17 13:45:23 +02:00
..
android-goldfish.c mmc: android-goldfish: fix bad logic of sg_copy_{from,to}_buffer conversion 2018-08-21 16:06:17 +02:00
atmel-mci.c mmc: atmel-mci: do not assume idle after atmci_request_end 2019-01-26 09:32:39 +01:00
au1xmmc.c mmc: au1xmmc: handle highmem pages 2018-05-29 12:24:26 +02:00
bcm2835.c mmc: bcm2835: reset host on timeout 2019-02-12 19:47:10 +01:00
cavium-octeon.c mmc: cavium-octeon: Convert to use module_platform_driver 2017-08-30 15:03:38 +02:00
cavium-thunderx.c mmc: cavium: Fix use-after-free in of_platform_device_destroy 2017-09-08 15:38:22 +02:00
cavium.c mmc: cavium: Add the missing dma unmap when the dma has finished. 2019-08-16 10:12:39 +02:00
cavium.h mmc: cavium: Add scatter-gather DMA support 2017-04-24 21:42:10 +02:00
cb710-mmc.c mmc: cb710: Move away from using deprecated APIs 2013-10-30 20:26:37 -04:00
cb710-mmc.h mmc: cb710: use to_platform_device() 2016-01-05 18:04:57 +01:00
cqhci.c mmc: cqhci: Avoid false "cqhci: CQE stuck on" by not open-coding timeout loop 2020-05-06 08:13:33 +02:00
cqhci.h mmc: cqhci: Ensure macro parameters are wrapped in parentheses 2017-12-11 13:11:21 +01:00
davinci_mmc.c mmc: davinci: remove extraneous __init annotation 2019-04-20 09:15:55 +02:00
dw_mmc-bluefield.c mmc: dw_mmc-bluefield: : Fix the license information 2019-01-31 08:14:36 +01:00
dw_mmc-exynos.c mmc: dw_mmc-exynos: fix potential external abort in resume_noirq() 2018-07-16 11:21:45 +02:00
dw_mmc-exynos.h mmc: dw_mmc: exynos: Support eMMC's HS400 mode 2015-03-23 14:13:28 +01:00
dw_mmc-hi3798cv200.c mmc: dw_mmc: add support for hi3798cv200 specific extensions of dw-mshc 2018-03-15 14:43:22 +01:00
dw_mmc-k3.c mmc: dw_mmc: Fix out-of-bounds access for slot's caps 2018-02-27 15:12:25 +01:00
dw_mmc-pci.c mmc: dw_mmc: remove the deprecated "num-slots" 2018-03-15 09:27:11 +01:00
dw_mmc-pltfm.c mmc: dw_mmc: Remove the public dw_mmc header file 2017-02-13 13:19:59 +01:00
dw_mmc-pltfm.h mmc: remove use of __devexit 2012-11-28 12:28:18 -08:00
dw_mmc-rockchip.c mmc: dw_mmc: fix misleading comment in dw_mci_rk3288_set_ios 2018-05-02 15:08:38 +02:00
dw_mmc-zx.c mmc: dw_mmc: Fix out-of-bounds access for slot's caps 2018-02-27 15:12:25 +01:00
dw_mmc-zx.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dw_mmc.c mmc: dw_mmc: Re-store SDIO IRQs mask at system resume 2019-10-05 13:09:57 +02:00
dw_mmc.h mmc: dw_mmc: add support for hi3798cv200 specific extensions of dw-mshc 2018-03-15 14:43:22 +01:00
jz4740_mmc.c mmc: jz4740: Get CD/WP GPIOs from descriptors 2019-02-12 19:47:10 +01:00
Kconfig mmc: host: Fix Kconfig warnings on keystone_defconfig 2020-03-20 11:55:51 +01:00
Makefile mmc: sdhci-pci-dwc-mshc: synopsys dwc mshc support 2018-07-16 11:21:45 +02:00
meson-gx-mmc.c mmc: meson-gx: make sure the descriptor is stopped on errors 2019-12-05 09:20:19 +01:00
meson-mx-sdio.c mmc: meson-mx-sdio: trigger a soft reset after a timeout or CRC error 2020-06-22 09:05:12 +02:00
mmc_spi.c mmc: spi: Toggle SPI polarity, do not hardcode it 2020-02-11 04:33:59 -08:00
mmci_qcom_dml.c mmc: mmci: Add and implement a ->dma_setup() callback for qcom dml 2018-08-01 12:01:13 +02:00
mmci_qcom_dml.h mmc: mmci: Add and implement a ->dma_setup() callback for qcom dml 2018-08-01 12:01:13 +02:00
mmci.c mmc: mmci: expand startbiterr to irqmask and error check 2019-11-24 08:20:43 +01:00
mmci.h mmc: mmci: expand startbiterr to irqmask and error check 2019-11-24 08:20:43 +01:00
moxart-mmc.c mmc: moxart: constify mmc_host_ops structures 2017-08-30 14:01:41 +02:00
mtk-sd.c mmc: mediatek: fix CMD_TA to 2 for MT8173 HS200/HS400 mode 2019-12-31 16:36:17 +01:00
mvsdio.c mmc: mvsdio: Enable MMC_CAP_ERASE 2018-05-31 15:02:16 +02:00
mvsdio.h
mxcmmc.c mmc: mxcmmc: "Revert mmc: mxcmmc: handle highmem pages" 2019-03-27 14:14:37 +09:00
mxs-mmc.c mmc: mxs-mmc: Implement CMD23 support 2017-02-13 13:20:27 +01:00
of_mmc_spi.c mmc: of_mmc_spi: fix restricted cast warning of sparse 2017-08-30 14:01:45 +02:00
omap_hsmmc.c mmc: host: omap_hsmmc: add code for special init of wl1251 to get rid of pandora_wl1251_init_card 2019-12-17 20:35:11 +01:00
omap.c mmc: omap: fix the maximum timeout setting 2019-04-05 22:33:02 +02:00
pxamci.c mmc: pxamci: fix enum type confusion 2019-03-27 14:14:37 +09:00
pxamci.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
renesas_sdhi_core.c mmc: renesas_sdhi: Fix card initialization failure in high speed mode 2019-09-16 08:22:07 +02:00
renesas_sdhi_internal_dmac.c mmc: renesas_sdhi_internal_dmac: clean up the code for dma complete 2020-08-21 11:05:35 +02:00
renesas_sdhi_sys_dmac.c mmc: tmio: fix access width of Block Count Register 2019-03-05 17:58:52 +01:00
renesas_sdhi.h mmc: tmio,renesas_sdhi: move ssc_tappos to renesas_sdhi.h 2017-12-19 08:50:04 +01:00
rtsx_pci_sdmmc.c mmc: rtsx_pci: Fix support for speed-modes that relies on tuning 2020-03-25 08:06:11 +01:00
rtsx_usb_sdmmc.c mmc: rtsx_usb: Enable MMC_CAP_ERASE to allow erase/discard/trim requests 2018-05-08 09:43:27 +02:00
s3cmci.c Merge branch 'fixes' into next 2018-01-04 12:44:21 +01:00
s3cmci.h mmc: s3cmci: Register cpufreq notifier only on S3C24xx 2016-07-25 10:34:46 +02:00
sdhci_f_sdh30.c mmc: sdhci_f_sdh30: add ACPI support 2018-01-11 15:50:53 +01:00
sdhci-acpi.c mmc: sdhci-acpi: Add SDHCI_QUIRK2_BROKEN_64_BIT_DMA for AMDI0040 2020-05-20 08:18:34 +02:00
sdhci-bcm-kona.c mmc: sdhci-*: Don't emit error msg if sdhci_add_host() fails 2018-05-29 12:24:26 +02:00
sdhci-brcmstb.c mmc: sdhci-brcmstb: handle mmc_of_parse() errors during probe 2020-01-27 14:50:28 +01:00
sdhci-cadence.c mmc: sdhci-cadence: fix logically and structurally dead code 2018-05-02 15:08:49 +02:00
sdhci-cns3xxx.c mmc: sdhci-pltfm: Drop define for SDHCI_PLTFM_PMOPS 2016-07-29 11:29:04 +02:00
sdhci-dove.c mmc: sdhci-pltfm: Drop define for SDHCI_PLTFM_PMOPS 2016-07-29 11:29:04 +02:00
sdhci-esdhc-imx.c mmc: sdhci-esdhc-imx: fix the mask for tuning start point 2020-06-22 09:05:20 +02:00
sdhci-esdhc.h mmc: sdhci-of-esdhc: support ESDHC_CAPABILITIES_1 accessing 2017-08-30 15:03:36 +02:00
sdhci-iproc.c mmc: sdhci-iproc: Set NO_HISPD bit to fix HS50 data hold time problem 2019-05-31 06:46:01 -07:00
sdhci-msm.c mmc: sdhci-msm: Add retries when all tuning phases are found valid 2020-09-17 13:45:23 +02:00
sdhci-of-arasan.c mmc: sdhci-of-arasan: Do now show error message in case of deffered probe 2019-08-25 10:48:05 +02:00
sdhci-of-at91.c mmc: sdhci-of-at91: fix cd-gpios for SAMA5D2 2020-03-25 08:06:11 +01:00
sdhci-of-dwcmshc.c mmc: sdhci-of-dwcmshc: add SDHCI OF Synopsys DWC MSHC driver 2018-07-16 11:21:45 +02:00
sdhci-of-esdhc.c mmc: sdhci-of-esdhc: fix P2020 errata handling 2019-12-31 16:36:35 +01:00
sdhci-of-hlwd.c mmc: sdhci-pltfm: Drop define for SDHCI_PLTFM_PMOPS 2016-07-29 11:29:04 +02:00
sdhci-omap.c mmc: sdhci-omap: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY 2020-04-02 15:28:09 +02:00
sdhci-pci-arasan.c mmc:host:sdhci-pci:Addition of Arasan PCI Controller with integrated phy. 2018-01-04 12:46:11 +01:00
sdhci-pci-core.c mmc: sdhci-pci: Fix eMMC driver strength for BYT-based controllers 2020-05-06 08:13:34 +02:00
sdhci-pci-data.c mmc: sdhci-pci: Use ACPI DSM to get driver strength for some Intel devices 2017-04-24 21:41:28 +02:00
sdhci-pci-dwc-mshc.c mmc: sdhci-pci-dwc-mshc: synopsys dwc mshc support 2018-07-16 11:21:45 +02:00
sdhci-pci-o2micro.c mmc: sdhci: sdhci-pci-o2micro: Check if controller supports 8-bit width 2019-07-31 07:27:01 +02:00
sdhci-pci.h mmc: sdhci-pci: Add support for Intel CML 2019-09-16 08:22:13 +02:00
sdhci-pic32.c mmc: sdhci-*: Don't emit error msg if sdhci_add_host() fails 2018-05-29 12:24:26 +02:00
sdhci-pltfm.c mmc: sdhci-pltfm: export sdhci_pltfm_suspend/resume 2017-08-30 15:03:45 +02:00
sdhci-pltfm.h mmc: sdhci-pltfm: export sdhci_pltfm_suspend/resume 2017-08-30 15:03:45 +02:00
sdhci-pxav2.c mmc: sdhci-*: Don't emit error msg if sdhci_add_host() fails 2018-05-29 12:24:26 +02:00
sdhci-pxav3.c mmc: sdhci-*: Don't emit error msg if sdhci_add_host() fails 2018-05-29 12:24:26 +02:00
sdhci-s3c.c mmc: sdhci-*: Don't emit error msg if sdhci_add_host() fails 2018-05-29 12:24:26 +02:00
sdhci-sirf.c mmc: sdhci: enable/disable the clock in sdhci_pltfm_suspend/resume 2017-08-30 15:03:44 +02:00
sdhci-spear.c mmc: sdhci-*: Don't emit error msg if sdhci_add_host() fails 2018-05-29 12:24:26 +02:00
sdhci-st.c mmc: sdhci-*: Don't emit error msg if sdhci_add_host() fails 2018-05-29 12:24:26 +02:00
sdhci-tegra.c mmc: sdhci-tegra: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY 2020-04-02 15:28:10 +02:00
sdhci-xenon-phy.c mmc: sdhci-xenon: Fix timeout checks 2019-02-12 19:47:10 +01:00
sdhci-xenon.c mmc: sdhci-xenon: fix annoying 1.8V regulator warning 2020-05-06 08:13:33 +02:00
sdhci-xenon.h mmc: sdhci-xenon: Fix clock resource by adding an optional bus clock 2017-10-04 10:50:36 +02:00
sdhci.c mmc: sdhci: do not enable card detect interrupt for gpio cd type 2020-07-22 09:32:04 +02:00
sdhci.h mmc: sdhci: Add a quirk for broken command queuing 2019-12-31 16:36:36 +01:00
sdricoh_cs.c mmc: sdricoh_cs: constify mmc_host_ops structures 2017-08-30 14:01:44 +02:00
sh_mmcif.c mmc: sh_mmcif: remove some cruft 2018-03-05 09:00:59 +01:00
sunxi-mmc.c mmc: sunxi: Filter out unsupported modes declared in the device tree 2019-02-20 10:25:46 +01:00
tifm_sd.c mmc: Convert timers to use timer_setup() 2017-11-02 15:20:28 +01:00
tmio_mmc_core.c mmc: tmio: Add MMC_CAP_ERASE to allow erase/discard/trim requests 2019-12-31 16:36:04 +01:00
tmio_mmc.c mmc: tmio: remove dma_ops from tmio_mmc_host_probe() argument 2018-01-18 09:08:56 +01:00
tmio_mmc.h mmc: tmio: fix access width of Block Count Register 2019-03-05 17:58:52 +01:00
toshsd.c mmc: toshsd: constify mmc_host_ops structures 2017-08-30 14:01:42 +02:00
toshsd.h mmc: add Toshiba PCI SD controller driver 2014-11-26 14:30:58 +01:00
usdhi6rol0.c mmc: usdhi6rol0: catch all errors when getting regulators 2017-10-30 11:50:37 +01:00
ushc.c mmc: ushc: handle highmem pages 2018-05-21 15:49:20 +02:00
via-sdmmc.c mmc: via-sdmmc: Respect the cmd->busy_timeout from the mmc core 2020-06-22 09:05:19 +02:00
vub300.c mmc: vub300: Use common code in __download_offload_pseudocode() 2017-11-02 15:20:29 +01:00
wbsd.c mmc: wbsd: handle highmem pages 2018-05-21 15:49:21 +02:00
wbsd.h
wmt-sdmmc.c mmc: host: simplify getting .drvdata 2018-05-02 15:08:48 +02:00