]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Revert "mmc: sdhci-tegra: drop ->get_ro() implementation"
authorDmitry Osipenko <digetx@gmail.com>
Thu, 8 Aug 2019 22:24:30 +0000 (01:24 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Sep 2019 08:23:42 +0000 (10:23 +0200)
commitcb82fa2d124aa1581428e89150dfe9d077ac5a60
tree1dac5364e229563d99f8d07db87114929c8dddc6
parent31f4eb72692c5c9b0242ef17c16f5ed910a99768
Revert "mmc: sdhci-tegra: drop ->get_ro() implementation"

commit 0f686ca933597cfcc0636253fc1740423c062ec7 upstream.

The WRITE_PROTECT bit is always in a "protected mode" on Tegra and
WP-GPIO state need to be used instead. In a case of the GPIO absence,
write-enable should be assumed. External SD is writable once again as
a result of this patch because the offending commit changed behaviour for
the case of a missing WP-GPIO to fall back to WRITE_PROTECT bit-checking,
which is incorrect for Tegra.

Cc: stable@vger.kernel.org # v5.1+
Fixes: e8391453e27f ("mmc: sdhci-tegra: drop ->get_ro() implementation")
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/host/sdhci-tegra.c