Skip to contentSkip to conversation

Revert "mmc: tmio: remove workaround for NON_REMOVABLE"

PATCH In review Wolfram Sang 2 participants 2 messages Nov 21, 2019

Subsystems (2)
lore
Share & tools
lore

Wolfram Sang

author maintainer
#0 lore raw

PATCH 1/1 Revert "mmc: tmio: remove workaround for NON_REMOVABLE"

This reverts commit 7a7dab237027939cb95dc07c4647b80bad5fbbde. We found out that there is still a race with RuntimePM. This can lead to a hang when accessing the eMMC in some situations. Revert this change until the RPM issue is fixed.

---
 drivers/mmc/host/tmio_mmc_core.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/mmc/host/tmio_mmc_core.c +9 -0
index 75f16ff65ac5..c4a1d49fbea4 100644
@@ -1209,6 +1209,15 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host)
 	if (!_host->reset)
 		_host->reset = tmio_mmc_reset;
 
+	/*
+	 * On Gen2+, eMMC with NONREMOVABLE currently fails because native
+	 * hotplug gets disabled. It seems RuntimePM related yet we need further
+	 * research. Since we are planning a PM overhaul anyway, let's enforce
+	 * for now the device being active by enabling native hotplug always.
+	 */
+	if (pdata->flags & TMIO_MMC_MIN_RCAR2)
+		_host->native_hotplug = true;
+
 	/*
 	 * While using internal tmio hardware logic for card detection, we need
 	 * to ensure it stays powered for it to work.
Signature · 1 line
2.20.1
#1 lore raw
Quoted 7 lines · Wolfram Sang

This reverts commit 7a7dab237027939cb95dc07c4647b80bad5fbbde. We found out that there is still a race with RuntimePM. This can lead to a hang when accessing the eMMC in some situations. Revert this change until the RPM issue is fixed.

Applied for next, adding a reported/tested-by from Geert, thanks!

Let's revisit this after v5.5-rc1.

Kind regards
Uffe

Quoted 27 lines
---
 drivers/mmc/host/tmio_mmc_core.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/mmc/host/tmio_mmc_core.c +9 -1
index 75f16ff65ac5..c4a1d49fbea4 100644
@@ -1209,6 +1209,15 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host)
        if (!_host->reset)
                _host->reset = tmio_mmc_reset;
 
+       /*
+        * On Gen2+, eMMC with NONREMOVABLE currently fails because native
+        * hotplug gets disabled. It seems RuntimePM related yet we need further
+        * research. Since we are planning a PM overhaul anyway, let's enforce
+        * for now the device being active by enabling native hotplug always.
+        */
+       if (pdata->flags & TMIO_MMC_MIN_RCAR2)
+               _host->native_hotplug = true;
+
        /*
         * While using internal tmio hardware logic for card detection, we need
         * to ensure it stays powered for it to work.
--

2.20.1