From: Greg Kroah-Hartman Date: Mon, 5 Jan 2015 19:39:18 +0000 (-0800) Subject: 3.17-stable patches X-Git-Tag: v3.10.64~32 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4d90a0062010ebc5113d322cff83d42177a80604;p=thirdparty%2Fkernel%2Fstable-queue.git 3.17-stable patches added patches: md-bitmap-always-wait-for-writes-on-unplug.patch mfd-tc6393xb-fail-ohci-suspend-if-full-state-restore-is-required.patch mfd-twl4030-power-fix-regression-with-missing-compatible-flag.patch mmc-block-add-newline-to-sysfs-display-of-force_ro.patch mmc-dw_mmc-avoid-write-to-cdthrctl-on-older-versions.patch mmc-omap_hsmmc-fix-uhs-card-with-ddr50-support.patch mmc-sdhci-pci-o2micro-fix-dell-e5440-issue.patch --- diff --git a/queue-3.17/md-bitmap-always-wait-for-writes-on-unplug.patch b/queue-3.17/md-bitmap-always-wait-for-writes-on-unplug.patch new file mode 100644 index 00000000000..f5ad107cded --- /dev/null +++ b/queue-3.17/md-bitmap-always-wait-for-writes-on-unplug.patch @@ -0,0 +1,62 @@ +From 4b5060ddae2b03c5387321fafc089d242225697a Mon Sep 17 00:00:00 2001 +From: NeilBrown +Date: Tue, 9 Sep 2014 14:13:51 +1000 +Subject: md/bitmap: always wait for writes on unplug. + +From: NeilBrown + +commit 4b5060ddae2b03c5387321fafc089d242225697a upstream. + +If two threads call bitmap_unplug at the same time, then +one might schedule all the writes, and the other might +decide that it doesn't need to wait. But really it does. + +It rarely hurts to wait when it isn't absolutely necessary, +and the current code doesn't really focus on 'absolutely necessary' +anyway. So just wait always. + +This can potentially lead to data corruption if a crash happens +at an awkward time and data was written before the bitmap was +updated. It is very unlikely, but this should go to -stable +just to be safe. Appropriate for any -stable. + +Signed-off-by: NeilBrown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/bitmap.c | 16 ++++++---------- + 1 file changed, 6 insertions(+), 10 deletions(-) + +--- a/drivers/md/bitmap.c ++++ b/drivers/md/bitmap.c +@@ -879,7 +879,6 @@ void bitmap_unplug(struct bitmap *bitmap + { + unsigned long i; + int dirty, need_write; +- int wait = 0; + + if (!bitmap || !bitmap->storage.filemap || + test_bit(BITMAP_STALE, &bitmap->flags)) +@@ -897,16 +896,13 @@ void bitmap_unplug(struct bitmap *bitmap + clear_page_attr(bitmap, i, BITMAP_PAGE_PENDING); + write_page(bitmap, bitmap->storage.filemap[i], 0); + } +- if (dirty) +- wait = 1; +- } +- if (wait) { /* if any writes were performed, we need to wait on them */ +- if (bitmap->storage.file) +- wait_event(bitmap->write_wait, +- atomic_read(&bitmap->pending_writes)==0); +- else +- md_super_wait(bitmap->mddev); + } ++ if (bitmap->storage.file) ++ wait_event(bitmap->write_wait, ++ atomic_read(&bitmap->pending_writes)==0); ++ else ++ md_super_wait(bitmap->mddev); ++ + if (test_bit(BITMAP_WRITE_ERROR, &bitmap->flags)) + bitmap_file_kick(bitmap); + } diff --git a/queue-3.17/mfd-tc6393xb-fail-ohci-suspend-if-full-state-restore-is-required.patch b/queue-3.17/mfd-tc6393xb-fail-ohci-suspend-if-full-state-restore-is-required.patch new file mode 100644 index 00000000000..12e1782b18a --- /dev/null +++ b/queue-3.17/mfd-tc6393xb-fail-ohci-suspend-if-full-state-restore-is-required.patch @@ -0,0 +1,55 @@ +From 1a5fb99de4850cba710d91becfa2c65653048589 Mon Sep 17 00:00:00 2001 +From: Dmitry Eremin-Solenikov +Date: Fri, 24 Oct 2014 21:19:57 +0400 +Subject: mfd: tc6393xb: Fail ohci suspend if full state restore is required + +From: Dmitry Eremin-Solenikov + +commit 1a5fb99de4850cba710d91becfa2c65653048589 upstream. + +Some boards with TC6393XB chip require full state restore during system +resume thanks to chip's VCC being cut off during suspend (Sharp SL-6000 +tosa is one of them). Failing to do so would result in ohci Oops on +resume due to internal memory contentes being changed. Fail ohci suspend +on tc6393xb is full state restore is required. + +Recommended workaround is to unbind tmio-ohci driver before suspend and +rebind it after resume. + +Signed-off-by: Dmitry Eremin-Solenikov +Signed-off-by: Lee Jones +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mfd/tc6393xb.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +--- a/drivers/mfd/tc6393xb.c ++++ b/drivers/mfd/tc6393xb.c +@@ -263,6 +263,17 @@ static int tc6393xb_ohci_disable(struct + return 0; + } + ++static int tc6393xb_ohci_suspend(struct platform_device *dev) ++{ ++ struct tc6393xb_platform_data *tcpd = dev_get_platdata(dev->dev.parent); ++ ++ /* We can't properly store/restore OHCI state, so fail here */ ++ if (tcpd->resume_restore) ++ return -EBUSY; ++ ++ return tc6393xb_ohci_disable(dev); ++} ++ + static int tc6393xb_fb_enable(struct platform_device *dev) + { + struct tc6393xb *tc6393xb = dev_get_drvdata(dev->dev.parent); +@@ -403,7 +414,7 @@ static struct mfd_cell tc6393xb_cells[] + .num_resources = ARRAY_SIZE(tc6393xb_ohci_resources), + .resources = tc6393xb_ohci_resources, + .enable = tc6393xb_ohci_enable, +- .suspend = tc6393xb_ohci_disable, ++ .suspend = tc6393xb_ohci_suspend, + .resume = tc6393xb_ohci_enable, + .disable = tc6393xb_ohci_disable, + }, diff --git a/queue-3.17/mfd-twl4030-power-fix-regression-with-missing-compatible-flag.patch b/queue-3.17/mfd-twl4030-power-fix-regression-with-missing-compatible-flag.patch new file mode 100644 index 00000000000..5e3a7c8b601 --- /dev/null +++ b/queue-3.17/mfd-twl4030-power-fix-regression-with-missing-compatible-flag.patch @@ -0,0 +1,39 @@ +From 1b9b46d05f887aec418b3a5f4f55abf79316fcda Mon Sep 17 00:00:00 2001 +From: Tony Lindgren +Date: Sun, 2 Nov 2014 10:09:38 -0800 +Subject: mfd: twl4030-power: Fix regression with missing compatible flag + +From: Tony Lindgren + +commit 1b9b46d05f887aec418b3a5f4f55abf79316fcda upstream. + +Commit e7cd1d1eb16f ("mfd: twl4030-power: Add generic reset +configuration") accidentally removed the compatible flag for +"ti,twl4030-power" that should be there as documented in the +binding. + +If "ti,twl4030-power" only the poweroff configuration is done +by the driver. + +Fixes: e7cd1d1eb16f ("mfd: twl4030-power: Add generic reset configuration") +Reported-by: "Dr. H. Nikolaus Schaller" +Signed-off-by: Tony Lindgren +Signed-off-by: Lee Jones +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mfd/twl4030-power.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/mfd/twl4030-power.c ++++ b/drivers/mfd/twl4030-power.c +@@ -828,6 +828,9 @@ static struct twl4030_power_data osc_off + + static struct of_device_id twl4030_power_of_match[] = { + { ++ .compatible = "ti,twl4030-power", ++ }, ++ { + .compatible = "ti,twl4030-power-reset", + .data = &omap3_reset, + }, diff --git a/queue-3.17/mmc-block-add-newline-to-sysfs-display-of-force_ro.patch b/queue-3.17/mmc-block-add-newline-to-sysfs-display-of-force_ro.patch new file mode 100644 index 00000000000..6cd0dffe722 --- /dev/null +++ b/queue-3.17/mmc-block-add-newline-to-sysfs-display-of-force_ro.patch @@ -0,0 +1,32 @@ +From 0031a98a85e9fca282624bfc887f9531b2768396 Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Mon, 22 Sep 2014 10:12:51 +0300 +Subject: mmc: block: add newline to sysfs display of force_ro + +From: Baruch Siach + +commit 0031a98a85e9fca282624bfc887f9531b2768396 upstream. + +Make force_ro consistent with other sysfs entries. + +Fixes: 371a689f64b0d ('mmc: MMC boot partitions support') +Cc: Andrei Warkentin +Signed-off-by: Baruch Siach +Signed-off-by: Ulf Hansson +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mmc/card/block.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/mmc/card/block.c ++++ b/drivers/mmc/card/block.c +@@ -260,7 +260,7 @@ static ssize_t force_ro_show(struct devi + int ret; + struct mmc_blk_data *md = mmc_blk_get(dev_to_disk(dev)); + +- ret = snprintf(buf, PAGE_SIZE, "%d", ++ ret = snprintf(buf, PAGE_SIZE, "%d\n", + get_disk_ro(dev_to_disk(dev)) ^ + md->read_only); + mmc_blk_put(md); diff --git a/queue-3.17/mmc-dw_mmc-avoid-write-to-cdthrctl-on-older-versions.patch b/queue-3.17/mmc-dw_mmc-avoid-write-to-cdthrctl-on-older-versions.patch new file mode 100644 index 00000000000..afd5ba96ed4 --- /dev/null +++ b/queue-3.17/mmc-dw_mmc-avoid-write-to-cdthrctl-on-older-versions.patch @@ -0,0 +1,44 @@ +From 66dfd10173159cafa9cb0d39936b8daeaab8e3e0 Mon Sep 17 00:00:00 2001 +From: James Hogan +Date: Mon, 17 Nov 2014 17:49:05 +0000 +Subject: mmc: dw_mmc: avoid write to CDTHRCTL on older versions + +From: James Hogan + +commit 66dfd10173159cafa9cb0d39936b8daeaab8e3e0 upstream. + +Commit f1d2736c8156 (mmc: dw_mmc: control card read threshold) added +dw_mci_ctrl_rd_thld() with an unconditional write to the CDTHRCTL +register at offset 0x100. However before version 240a, the FIFO region +started at 0x100, so the write messes with the FIFO and completely +breaks the driver. + +If the version id < 240A, return early from dw_mci_ctl_rd_thld() so as +not to hit this problem. + +Fixes: f1d2736c8156 (mmc: dw_mmc: control card read threshold) +Signed-off-by: James Hogan +Acked-by: Jaehoon Chung +Signed-off-by: Ulf Hansson +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mmc/host/dw_mmc.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/mmc/host/dw_mmc.c ++++ b/drivers/mmc/host/dw_mmc.c +@@ -624,6 +624,13 @@ static void dw_mci_ctrl_rd_thld(struct d + + WARN_ON(!(data->flags & MMC_DATA_READ)); + ++ /* ++ * CDTHRCTL doesn't exist prior to 240A (in fact that register offset is ++ * in the FIFO region, so we really shouldn't access it). ++ */ ++ if (host->verid < DW_MMC_240A) ++ return; ++ + if (host->timing != MMC_TIMING_MMC_HS200 && + host->timing != MMC_TIMING_UHS_SDR104) + goto disable; diff --git a/queue-3.17/mmc-omap_hsmmc-fix-uhs-card-with-ddr50-support.patch b/queue-3.17/mmc-omap_hsmmc-fix-uhs-card-with-ddr50-support.patch new file mode 100644 index 00000000000..e0e0980c6aa --- /dev/null +++ b/queue-3.17/mmc-omap_hsmmc-fix-uhs-card-with-ddr50-support.patch @@ -0,0 +1,43 @@ +From 903101a83949d6fc77c092cef07e9c1e10c07e46 Mon Sep 17 00:00:00 2001 +From: Ulf Hansson +Date: Tue, 25 Nov 2014 13:05:13 +0100 +Subject: mmc: omap_hsmmc: Fix UHS card with DDR50 support + +From: Ulf Hansson + +commit 903101a83949d6fc77c092cef07e9c1e10c07e46 upstream. + +The commit, mmc: omap: clarify DDR timing mode between SD-UHS and eMMC, +switched omap_hsmmc to support MMC DDR mode instead of UHS DDR50 mode. + +Add UHS DDR50 mode again and this time let's also keep the MMC DDR mode. + +Fixes: 5438ad95a57c (mmc: omap: clarify DDR timing mode between SD-UHS and eMMC) +Reported-by: Kishon Vijay Abraham I +Signed-off-by: Ulf Hansson +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mmc/host/omap_hsmmc.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/mmc/host/omap_hsmmc.c ++++ b/drivers/mmc/host/omap_hsmmc.c +@@ -609,6 +609,7 @@ static void omap_hsmmc_set_clock(struct + */ + if ((mmc_slot(host).features & HSMMC_HAS_HSPE_SUPPORT) && + (ios->timing != MMC_TIMING_MMC_DDR52) && ++ (ios->timing != MMC_TIMING_UHS_DDR50) && + ((OMAP_HSMMC_READ(host->base, CAPA) & HSS) == HSS)) { + regval = OMAP_HSMMC_READ(host->base, HCTL); + if (clkdiv && (clk_get_rate(host->fclk)/clkdiv) > 25000000) +@@ -628,7 +629,8 @@ static void omap_hsmmc_set_bus_width(str + u32 con; + + con = OMAP_HSMMC_READ(host->base, CON); +- if (ios->timing == MMC_TIMING_MMC_DDR52) ++ if (ios->timing == MMC_TIMING_MMC_DDR52 || ++ ios->timing == MMC_TIMING_UHS_DDR50) + con |= DDR; /* configure in DDR mode */ + else + con &= ~DDR; diff --git a/queue-3.17/mmc-sdhci-pci-o2micro-fix-dell-e5440-issue.patch b/queue-3.17/mmc-sdhci-pci-o2micro-fix-dell-e5440-issue.patch new file mode 100644 index 00000000000..b0d67c8af18 --- /dev/null +++ b/queue-3.17/mmc-sdhci-pci-o2micro-fix-dell-e5440-issue.patch @@ -0,0 +1,31 @@ +From 6380ea099cdd46d7377b6fbec0291cf2aa387bad Mon Sep 17 00:00:00 2001 +From: Peter Guo +Date: Wed, 24 Sep 2014 04:29:04 +0200 +Subject: mmc: sdhci-pci-o2micro: Fix Dell E5440 issue + +From: Peter Guo + +commit 6380ea099cdd46d7377b6fbec0291cf2aa387bad upstream. + +Fix Dell E5440 when reboot Linux, can't find o2micro sd host chip issue. + +Fixes: 01acf6917aed (mmc: sdhci-pci: add support of O2Micro/BayHubTech SD hosts) +Signed-off-by: Peter Guo +Signed-off-by: Ulf Hansson +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mmc/host/sdhci-pci-o2micro.c | 2 -- + 1 file changed, 2 deletions(-) + +--- a/drivers/mmc/host/sdhci-pci-o2micro.c ++++ b/drivers/mmc/host/sdhci-pci-o2micro.c +@@ -127,8 +127,6 @@ void sdhci_pci_o2_fujin2_pci_init(struct + return; + scratch_32 &= ~((1 << 21) | (1 << 30)); + +- /* Set RTD3 function disabled */ +- scratch_32 |= ((1 << 29) | (1 << 28)); + pci_write_config_dword(chip->pdev, O2_SD_FUNC_REG3, scratch_32); + + /* Set L1 Entrance Timer */