From: Greg Kroah-Hartman Date: Mon, 20 Feb 2017 16:25:44 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v4.4.51~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bca040c4ef9d0fa582c51e74fbc2b44d39cb0235;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: mmc-core-fix-multi-bit-bus-width-without-high-speed-mode.patch --- diff --git a/queue-4.4/mmc-core-fix-multi-bit-bus-width-without-high-speed-mode.patch b/queue-4.4/mmc-core-fix-multi-bit-bus-width-without-high-speed-mode.patch new file mode 100644 index 00000000000..9968502ce29 --- /dev/null +++ b/queue-4.4/mmc-core-fix-multi-bit-bus-width-without-high-speed-mode.patch @@ -0,0 +1,55 @@ +From 3d4ef329757cfd5e0b23cce97cdeca7e2df89c99 Mon Sep 17 00:00:00 2001 +From: Anssi Hannula +Date: Mon, 13 Feb 2017 13:46:41 +0200 +Subject: mmc: core: fix multi-bit bus width without high-speed mode + +From: Anssi Hannula + +commit 3d4ef329757cfd5e0b23cce97cdeca7e2df89c99 upstream. + +Commit 577fb13199b1 ("mmc: rework selection of bus speed mode") +refactored bus width selection code to mmc_select_bus_width(). + +However, it also altered the behavior to not call the selection code in +non-high-speed modes anymore. + +This causes 1-bit mode to always be used when the high-speed mode is not +enabled, even though 4-bit and 8-bit bus are valid bus widths in the +backwards-compatibility (legacy) mode as well (see e.g. 5.3.2 Bus Speed +Modes in JEDEC 84-B50). This results in a significant regression in +transfer speeds. + +Fix the code to allow 4-bit and 8-bit widths even without high-speed +mode, as before. + +Tested with a Zynq-7000 PicoZed 7020 board. + +Fixes: 577fb13199b1 ("mmc: rework selection of bus speed mode") +Signed-off-by: Anssi Hannula +Signed-off-by: Ulf Hansson +[anssi.hannula@bitwise.fi: backported for the different err variable + check on v4.4 and tested] +Signed-off-by: Greg Kroah-Hartman +--- + +Here is a trivial backport as the upstream commit did not apply cleanly +to 4.4-stable. + + drivers/mmc/core/mmc.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/mmc/core/mmc.c ++++ b/drivers/mmc/core/mmc.c +@@ -1581,10 +1581,10 @@ static int mmc_init_card(struct mmc_host + err = mmc_select_hs400(card); + if (err) + goto free_card; +- } else if (mmc_card_hs(card)) { ++ } else { + /* Select the desired bus width optionally */ + err = mmc_select_bus_width(card); +- if (!IS_ERR_VALUE(err)) { ++ if (!IS_ERR_VALUE(err) && mmc_card_hs(card)) { + err = mmc_select_hs_ddr(card); + if (err) + goto free_card; diff --git a/queue-4.4/series b/queue-4.4/series index be5c9826cf7..ed2003ff432 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -12,3 +12,4 @@ printk-use-rcuidle-console-tracepoint.patch ntb-ntb_transport-fix-debugfs_remove_recursive.patch ntb_transport-pick-an-unused-queue.patch bcache-make-gc-wakeup-sane-remove-set_task_state.patch +mmc-core-fix-multi-bit-bus-width-without-high-speed-mode.patch