--- /dev/null
+From 586b2a4befad88cd87b372a1cea01e58c6811ea9 Mon Sep 17 00:00:00 2001
+From: Linus Walleij <linus.walleij@linaro.org>
+Date: Tue, 2 Jan 2018 08:57:17 +0100
+Subject: ARM: dts: Delete bogus reference to the charlcd
+
+From: Linus Walleij <linus.walleij@linaro.org>
+
+commit 586b2a4befad88cd87b372a1cea01e58c6811ea9 upstream.
+
+The EB MP board probably has a character LCD but the board manual does
+not really state which IRQ it has assigned to this device. The invalid
+assignment was a mistake by me during submission of the DTSI where I was
+looking for the reference, didn't find it and didn't fill it in.
+
+Delete this for now: it can probably be fixed but that requires access
+to the actual board for some trial-and-error experiments.
+
+Reported-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Olof Johansson <olof@lixom.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/arm-realview-eb-mp.dtsi | 5 -----
+ 1 file changed, 5 deletions(-)
+
+--- a/arch/arm/boot/dts/arm-realview-eb-mp.dtsi
++++ b/arch/arm/boot/dts/arm-realview-eb-mp.dtsi
+@@ -150,11 +150,6 @@
+ interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+-&charlcd {
+- interrupt-parent = <&intc>;
+- interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
+-};
+-
+ &serial0 {
+ interrupt-parent = <&intc>;
+ interrupts = <0 4 IRQ_TYPE_LEVEL_HIGH>;
--- /dev/null
+From 5628a8ca14149ba4226e3bdce3a04c3b688435ad Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Thu, 21 Dec 2017 22:30:07 +0100
+Subject: ARM: dts: exynos: fix RTC interrupt for exynos5410
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+commit 5628a8ca14149ba4226e3bdce3a04c3b688435ad upstream.
+
+According to the comment added to exynos_dt_pmu_match[] in commit
+8b283c025443 ("ARM: exynos4/5: convert pmu wakeup to stacked domains"),
+the RTC is not able to wake up the system through the PMU on Exynos5410,
+unlike Exynos5420.
+
+However, when the RTC DT node got added, it was a straight copy of
+the Exynos5420 node, which now causes a warning from dtc.
+
+This removes the incorrect interrupt-parent, which should get the
+interrupt working and avoid the warning.
+
+Fixes: e1e146b1b062 ("ARM: dts: exynos: Add RTC and I2C to Exynos5410")
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/exynos5410.dtsi | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/arch/arm/boot/dts/exynos5410.dtsi
++++ b/arch/arm/boot/dts/exynos5410.dtsi
+@@ -333,7 +333,6 @@
+ &rtc {
+ clocks = <&clock CLK_RTC>;
+ clock-names = "rtc";
+- interrupt-parent = <&pmu_system_controller>;
+ status = "disabled";
+ };
+
--- /dev/null
+From ae72e95b5e4ded145bfc6926ad9457b74e3af41a Mon Sep 17 00:00:00 2001
+From: Matthias Brugger <matthias.bgg@gmail.com>
+Date: Fri, 1 Dec 2017 13:07:08 +0100
+Subject: arm: dts: mt2701: Add reset-cells
+
+From: Matthias Brugger <matthias.bgg@gmail.com>
+
+commit ae72e95b5e4ded145bfc6926ad9457b74e3af41a upstream.
+
+The hifsys and ethsys needs the definition of the reset-cells
+property. Fix this.
+
+Reviewed-by: Rob Herring <robh@kernel.org>
+Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/mt2701.dtsi | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/arch/arm/boot/dts/mt2701.dtsi
++++ b/arch/arm/boot/dts/mt2701.dtsi
+@@ -593,6 +593,7 @@
+ compatible = "mediatek,mt2701-hifsys", "syscon";
+ reg = <0 0x1a000000 0 0x1000>;
+ #clock-cells = <1>;
++ #reset-cells = <1>;
+ };
+
+ usb0: usb@1a1c0000 {
+@@ -677,6 +678,7 @@
+ compatible = "mediatek,mt2701-ethsys", "syscon";
+ reg = <0 0x1b000000 0 0x1000>;
+ #clock-cells = <1>;
++ #reset-cells = <1>;
+ };
+
+ eth: ethernet@1b100000 {
--- /dev/null
+From 76a09ce214addb8ddc0f6d50dc1106a5f829e713 Mon Sep 17 00:00:00 2001
+From: Matthias Brugger <matthias.bgg@gmail.com>
+Date: Fri, 1 Dec 2017 13:07:07 +0100
+Subject: arm: dts: mt7623: Update ethsys binding
+
+From: Matthias Brugger <matthias.bgg@gmail.com>
+
+commit 76a09ce214addb8ddc0f6d50dc1106a5f829e713 upstream.
+
+The ethsys binding misses the reset-cells, this patch
+adds this property.
+
+Reviewed-by: Rob Herring <robh@kernel.org>
+Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/mt7623.dtsi | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm/boot/dts/mt7623.dtsi
++++ b/arch/arm/boot/dts/mt7623.dtsi
+@@ -753,6 +753,7 @@
+ "syscon";
+ reg = <0 0x1b000000 0 0x1000>;
+ #clock-cells = <1>;
++ #reset-cells = <1>;
+ };
+
+ eth: ethernet@1b100000 {
--- /dev/null
+From 5c1037196b9ee75897c211972de370ed1336ec8f Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Wed, 10 Jan 2018 17:10:11 +0100
+Subject: ARM: dts: s5pv210: add interrupt-parent for ohci
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+commit 5c1037196b9ee75897c211972de370ed1336ec8f upstream.
+
+The ohci-hcd node has an interrupt number but no interrupt-parent,
+leading to a warning with current dtc versions:
+
+arch/arm/boot/dts/s5pv210-aquila.dtb: Warning (interrupts_property): Missing interrupt-parent for /soc/ohci@ec300000
+arch/arm/boot/dts/s5pv210-goni.dtb: Warning (interrupts_property): Missing interrupt-parent for /soc/ohci@ec300000
+arch/arm/boot/dts/s5pv210-smdkc110.dtb: Warning (interrupts_property): Missing interrupt-parent for /soc/ohci@ec300000
+arch/arm/boot/dts/s5pv210-smdkv210.dtb: Warning (interrupts_property): Missing interrupt-parent for /soc/ohci@ec300000
+arch/arm/boot/dts/s5pv210-torbreck.dtb: Warning (interrupts_property): Missing interrupt-parent for /soc/ohci@ec300000
+
+As seen from the related exynos dts files, the ohci and ehci controllers
+always share one interrupt number, and the number is the same here as
+well, so setting the same interrupt-parent is the reasonable solution
+here.
+
+Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/s5pv210.dtsi | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm/boot/dts/s5pv210.dtsi
++++ b/arch/arm/boot/dts/s5pv210.dtsi
+@@ -463,6 +463,7 @@
+ compatible = "samsung,exynos4210-ohci";
+ reg = <0xec300000 0x100>;
+ interrupts = <23>;
++ interrupt-parent = <&vic1>;
+ clocks = <&clocks CLK_USB_HOST>;
+ clock-names = "usbhost";
+ #address-cells = <1>;
--- /dev/null
+From 3343647813fdf0f2409fbf5816ee3e0622168079 Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Wed, 10 Jan 2018 15:40:37 +0100
+Subject: ARM: pxa/tosa-bt: add MODULE_LICENSE tag
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+commit 3343647813fdf0f2409fbf5816ee3e0622168079 upstream.
+
+Without this tag, we get a build warning:
+
+WARNING: modpost: missing MODULE_LICENSE() in arch/arm/mach-pxa/tosa-bt.o
+
+For completeness, I'm also adding author and description fields.
+
+Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/mach-pxa/tosa-bt.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/arch/arm/mach-pxa/tosa-bt.c
++++ b/arch/arm/mach-pxa/tosa-bt.c
+@@ -132,3 +132,7 @@ static struct platform_driver tosa_bt_dr
+ },
+ };
+ module_platform_driver(tosa_bt_driver);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Dmitry Baryshkov");
++MODULE_DESCRIPTION("Bluetooth built-in chip control");
--- /dev/null
+From b0ab681285aa66064f2de5b74191c0cabba381ff Mon Sep 17 00:00:00 2001
+From: Bjorn Andersson <bjorn.andersson@linaro.org>
+Date: Tue, 7 Nov 2017 19:45:01 -0800
+Subject: arm64: dts: msm8916: Add missing #phy-cells
+
+From: Bjorn Andersson <bjorn.andersson@linaro.org>
+
+commit b0ab681285aa66064f2de5b74191c0cabba381ff upstream.
+
+Add a missing #phy-cells to the dsi-phy, to silence dtc warning.
+
+Cc: Archit Taneja <architt@codeaurora.org>
+Fixes: 305410ffd1b2 ("arm64: dts: msm8916: Add display support")
+Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
+Reviewed-by: Archit Taneja <architt@codeaurora.org>
+Signed-off-by: Andy Gross <andy.gross@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm64/boot/dts/qcom/msm8916.dtsi | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
++++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
+@@ -901,6 +901,7 @@
+ "dsi_phy_regulator";
+
+ #clock-cells = <1>;
++ #phy-cells = <0>;
+
+ clocks = <&gcc GCC_MDSS_AHB_CLK>;
+ clock-names = "iface_clk";
--- /dev/null
+From 5c256045b87b8aa8e5bc9d2e2fdc0802351c1f99 Mon Sep 17 00:00:00 2001
+From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
+Date: Fri, 5 Jan 2018 14:55:33 -0600
+Subject: ASoC: acpi: fix machine driver selection based on quirk
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
+
+commit 5c256045b87b8aa8e5bc9d2e2fdc0802351c1f99 upstream.
+
+The ACPI/machine-driver code refactoring introduced in 4.13 introduced
+a regression for cases where we need a DMI-based quirk to select the
+machine driver (the BIOS reports an invalid HID). The fix is just to
+make sure the results of the quirk are actually used.
+
+Fixes: 54746dabf770 ('ASoC: Improve machine driver selection based on quirk data')
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96691
+Tested-by: Nicole Færber <nicole.faerber@dpin.de>
+Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Cc: stable@vger.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/soc/intel/common/sst-match-acpi.c | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+--- a/sound/soc/intel/common/sst-match-acpi.c
++++ b/sound/soc/intel/common/sst-match-acpi.c
+@@ -83,11 +83,9 @@ struct sst_acpi_mach *sst_acpi_find_mach
+
+ for (mach = machines; mach->id[0]; mach++) {
+ if (sst_acpi_check_hid(mach->id) == true) {
+- if (mach->machine_quirk == NULL)
+- return mach;
+-
+- if (mach->machine_quirk(mach) != NULL)
+- return mach;
++ if (mach->machine_quirk)
++ mach = mach->machine_quirk(mach);
++ return mach;
+ }
+ }
+ return NULL;
--- /dev/null
+From 05e89fb576f580ac95e7a5d00bdb34830b09671a Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Wed, 11 Oct 2017 15:47:54 +0200
+Subject: Bluetooth: BT_HCIUART now depends on SERIAL_DEV_BUS
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+commit 05e89fb576f580ac95e7a5d00bdb34830b09671a upstream.
+
+It is no longer possible to build BT_HCIUART into the kernel
+when SERIAL_DEV_BUS is a loadable module, even if none of the
+SERIAL_DEV_BUS based implementations are selected:
+
+drivers/bluetooth/hci_ldisc.o: In function `hci_uart_set_flow_control':
+hci_ldisc.c:(.text+0xb40): undefined reference to `serdev_device_set_flow_control'
+hci_ldisc.c:(.text+0xb5c): undefined reference to `serdev_device_set_tiocm'
+
+This adds a dependency to avoid the broken configuration.
+
+Fixes: 7841d554809b ("Bluetooth: hci_uart_set_flow_control: Fix NULL deref when using serdev")
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/bluetooth/Kconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/bluetooth/Kconfig
++++ b/drivers/bluetooth/Kconfig
+@@ -66,6 +66,7 @@ config BT_HCIBTSDIO
+
+ config BT_HCIUART
+ tristate "HCI UART driver"
++ depends on SERIAL_DEV_BUS || !SERIAL_DEV_BUS
+ depends on TTY
+ help
+ Bluetooth HCI UART driver.
+@@ -80,7 +81,6 @@ config BT_HCIUART
+ config BT_HCIUART_SERDEV
+ bool
+ depends on SERIAL_DEV_BUS && BT_HCIUART
+- depends on SERIAL_DEV_BUS=y || SERIAL_DEV_BUS=BT_HCIUART
+ default y
+
+ config BT_HCIUART_H4
--- /dev/null
+From 16c3ada89cff9a8c2a0eea34ffa1aa20af3f6008 Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Thu, 30 Nov 2017 06:08:05 -0500
+Subject: media: r820t: fix r820t_write_reg for KASAN
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+commit 16c3ada89cff9a8c2a0eea34ffa1aa20af3f6008 upstream.
+
+With CONFIG_KASAN, we get an overly long stack frame due to inlining
+the register access functions:
+
+drivers/media/tuners/r820t.c: In function 'generic_set_freq.isra.7':
+drivers/media/tuners/r820t.c:1334:1: error: the frame size of 2880 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
+
+This is caused by a gcc bug that has now been fixed in gcc-8.
+To work around the problem, we can pass the register data
+through a local variable that older gcc versions can optimize
+out as well.
+
+Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715
+
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/tuners/r820t.c | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+--- a/drivers/media/tuners/r820t.c
++++ b/drivers/media/tuners/r820t.c
+@@ -396,9 +396,11 @@ static int r820t_write(struct r820t_priv
+ return 0;
+ }
+
+-static int r820t_write_reg(struct r820t_priv *priv, u8 reg, u8 val)
++static inline int r820t_write_reg(struct r820t_priv *priv, u8 reg, u8 val)
+ {
+- return r820t_write(priv, reg, &val, 1);
++ u8 tmp = val; /* work around GCC PR81715 with asan-stack=1 */
++
++ return r820t_write(priv, reg, &tmp, 1);
+ }
+
+ static int r820t_read_cache_reg(struct r820t_priv *priv, int reg)
+@@ -411,17 +413,18 @@ static int r820t_read_cache_reg(struct r
+ return -EINVAL;
+ }
+
+-static int r820t_write_reg_mask(struct r820t_priv *priv, u8 reg, u8 val,
++static inline int r820t_write_reg_mask(struct r820t_priv *priv, u8 reg, u8 val,
+ u8 bit_mask)
+ {
++ u8 tmp = val;
+ int rc = r820t_read_cache_reg(priv, reg);
+
+ if (rc < 0)
+ return rc;
+
+- val = (rc & ~bit_mask) | (val & bit_mask);
++ tmp = (rc & ~bit_mask) | (tmp & bit_mask);
+
+- return r820t_write(priv, reg, &val, 1);
++ return r820t_write(priv, reg, &tmp, 1);
+ }
+
+ static int r820t_read(struct r820t_priv *priv, u8 reg, u8 *val, int len)
--- /dev/null
+From dd3f6983b4a468efca9e8caa0e2b4aa20946d801 Mon Sep 17 00:00:00 2001
+From: yangbo lu <yangbo.lu@nxp.com>
+Date: Thu, 21 Sep 2017 16:43:31 +0800
+Subject: mmc: sdhci-of-esdhc: disable SD clock for clock value 0
+
+From: yangbo lu <yangbo.lu@nxp.com>
+
+commit dd3f6983b4a468efca9e8caa0e2b4aa20946d801 upstream.
+
+SD clock should be disabled for clock value 0. It's not
+right to just return. This may cause failure of signal
+voltage switching.
+
+Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
+Acked-by: Adrian Hunter <adrian.hunter@intel.com>
+Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
+Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mmc/host/sdhci-of-esdhc.c | 58 +++++++++++++++++++-------------------
+ 1 file changed, 30 insertions(+), 28 deletions(-)
+
+--- a/drivers/mmc/host/sdhci-of-esdhc.c
++++ b/drivers/mmc/host/sdhci-of-esdhc.c
+@@ -458,6 +458,33 @@ static unsigned int esdhc_of_get_min_clo
+ return clock / 256 / 16;
+ }
+
++static void esdhc_clock_enable(struct sdhci_host *host, bool enable)
++{
++ u32 val;
++ ktime_t timeout;
++
++ val = sdhci_readl(host, ESDHC_SYSTEM_CONTROL);
++
++ if (enable)
++ val |= ESDHC_CLOCK_SDCLKEN;
++ else
++ val &= ~ESDHC_CLOCK_SDCLKEN;
++
++ sdhci_writel(host, val, ESDHC_SYSTEM_CONTROL);
++
++ /* Wait max 20 ms */
++ timeout = ktime_add_ms(ktime_get(), 20);
++ val = ESDHC_CLOCK_STABLE;
++ while (!(sdhci_readl(host, ESDHC_PRSSTAT) & val)) {
++ if (ktime_after(ktime_get(), timeout)) {
++ pr_err("%s: Internal clock never stabilised.\n",
++ mmc_hostname(host->mmc));
++ break;
++ }
++ udelay(10);
++ }
++}
++
+ static void esdhc_of_set_clock(struct sdhci_host *host, unsigned int clock)
+ {
+ struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+@@ -469,8 +496,10 @@ static void esdhc_of_set_clock(struct sd
+
+ host->mmc->actual_clock = 0;
+
+- if (clock == 0)
++ if (clock == 0) {
++ esdhc_clock_enable(host, false);
+ return;
++ }
+
+ /* Workaround to start pre_div at 2 for VNN < VENDOR_V_23 */
+ if (esdhc->vendor_ver < VENDOR_V_23)
+@@ -558,33 +587,6 @@ static void esdhc_pltfm_set_bus_width(st
+ sdhci_writel(host, ctrl, ESDHC_PROCTL);
+ }
+
+-static void esdhc_clock_enable(struct sdhci_host *host, bool enable)
+-{
+- u32 val;
+- ktime_t timeout;
+-
+- val = sdhci_readl(host, ESDHC_SYSTEM_CONTROL);
+-
+- if (enable)
+- val |= ESDHC_CLOCK_SDCLKEN;
+- else
+- val &= ~ESDHC_CLOCK_SDCLKEN;
+-
+- sdhci_writel(host, val, ESDHC_SYSTEM_CONTROL);
+-
+- /* Wait max 20 ms */
+- timeout = ktime_add_ms(ktime_get(), 20);
+- val = ESDHC_CLOCK_STABLE;
+- while (!(sdhci_readl(host, ESDHC_PRSSTAT) & val)) {
+- if (ktime_after(ktime_get(), timeout)) {
+- pr_err("%s: Internal clock never stabilised.\n",
+- mmc_hostname(host->mmc));
+- break;
+- }
+- udelay(10);
+- }
+-}
+-
+ static void esdhc_reset(struct sdhci_host *host, u8 mask)
+ {
+ sdhci_reset(host, mask);
--- /dev/null
+From 97618aca1440b5addc5c3d78659d3e176be23b80 Mon Sep 17 00:00:00 2001
+From: "yinbo.zhu" <yinbo.zhu@nxp.com>
+Date: Wed, 8 Nov 2017 17:09:50 +0800
+Subject: mmc: sdhci-of-esdhc: fix eMMC couldn't work after kexec
+
+From: yinbo.zhu <yinbo.zhu@nxp.com>
+
+commit 97618aca1440b5addc5c3d78659d3e176be23b80 upstream.
+
+The bit eSDHC_TBCTL[TB_EN] couldn't be reset by eSDHC_SYSCTL[RSTA] which is
+used to reset for all. The driver should make sure it's cleared before card
+initialization, otherwise the initialization would fail.
+
+Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
+Acked-by: Adrian Hunter <adrian.hunter@intel.com>
+Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
+Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mmc/host/sdhci-of-esdhc.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/mmc/host/sdhci-of-esdhc.c
++++ b/drivers/mmc/host/sdhci-of-esdhc.c
+@@ -785,6 +785,10 @@ static void esdhc_init(struct platform_d
+ pltfm_host = sdhci_priv(host);
+ esdhc = sdhci_pltfm_priv(pltfm_host);
+
++ val = sdhci_readl(host, ESDHC_TBCTL);
++ val &= ~ESDHC_TB_EN;
++ sdhci_writel(host, val, ESDHC_TBCTL);
++
+ host_ver = sdhci_readw(host, SDHCI_HOST_VERSION);
+ esdhc->vendor_ver = (host_ver & SDHCI_VENDOR_VER_MASK) >>
+ SDHCI_VENDOR_VER_SHIFT;
--- /dev/null
+From f2bc600008bd6f7f5d0b6b56238d14f95cd454d2 Mon Sep 17 00:00:00 2001
+From: "yinbo.zhu" <yinbo.zhu@nxp.com>
+Date: Fri, 1 Dec 2017 15:09:34 +0800
+Subject: mmc: sdhci-of-esdhc: fix the mmc error after sleep on ls1046ardb
+
+From: yinbo.zhu <yinbo.zhu@nxp.com>
+
+commit f2bc600008bd6f7f5d0b6b56238d14f95cd454d2 upstream.
+
+When system wakes up from sleep on ls1046ardb, the SD operation fails
+with mmc error messages since ESDHC_TB_EN bit couldn't be cleaned by
+eSDHC_SYSCTL[RSTA]. It's proper to clean this bit in esdhc_reset()
+rather than in probe.
+
+Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
+Acked-by: Yangbo Lu <yangbo.lu@nxp.com>
+Acked-by: Adrian Hunter <adrian.hunter@intel.com>
+Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
+Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mmc/host/sdhci-of-esdhc.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+--- a/drivers/mmc/host/sdhci-of-esdhc.c
++++ b/drivers/mmc/host/sdhci-of-esdhc.c
+@@ -589,10 +589,18 @@ static void esdhc_pltfm_set_bus_width(st
+
+ static void esdhc_reset(struct sdhci_host *host, u8 mask)
+ {
++ u32 val;
++
+ sdhci_reset(host, mask);
+
+ sdhci_writel(host, host->ier, SDHCI_INT_ENABLE);
+ sdhci_writel(host, host->ier, SDHCI_SIGNAL_ENABLE);
++
++ if (mask & SDHCI_RESET_ALL) {
++ val = sdhci_readl(host, ESDHC_TBCTL);
++ val &= ~ESDHC_TB_EN;
++ sdhci_writel(host, val, ESDHC_TBCTL);
++ }
+ }
+
+ /* The SCFG, Supplemental Configuration Unit, provides SoC specific
+@@ -785,10 +793,6 @@ static void esdhc_init(struct platform_d
+ pltfm_host = sdhci_priv(host);
+ esdhc = sdhci_pltfm_priv(pltfm_host);
+
+- val = sdhci_readl(host, ESDHC_TBCTL);
+- val &= ~ESDHC_TB_EN;
+- sdhci_writel(host, val, ESDHC_TBCTL);
+-
+ host_ver = sdhci_readw(host, SDHCI_HOST_VERSION);
+ esdhc->vendor_ver = (host_ver & SDHCI_VENDOR_VER_MASK) >>
+ SDHCI_VENDOR_VER_SHIFT;
--- /dev/null
+From 31747eda41ef3c30c09c5c096b380bf54013746a Mon Sep 17 00:00:00 2001
+From: Amir Goldstein <amir73il@gmail.com>
+Date: Sun, 14 Jan 2018 18:35:40 +0200
+Subject: ovl: hash directory inodes for fsnotify
+
+From: Amir Goldstein <amir73il@gmail.com>
+
+commit 31747eda41ef3c30c09c5c096b380bf54013746a upstream.
+
+fsnotify pins a watched directory inode in cache, but if directory dentry
+is released, new lookup will allocate a new dentry and a new inode.
+Directory events will be notified on the new inode, while fsnotify listener
+is watching the old pinned inode.
+
+Hash all directory inodes to reuse the pinned inode on lookup. Pure upper
+dirs are hashes by real upper inode, merge and lower dirs are hashed by
+real lower inode.
+
+The reference to lower inode was being held by the lower dentry object
+in the overlay dentry (oe->lowerstack[0]). Releasing the overlay dentry
+may drop lower inode refcount to zero. Add a refcount on behalf of the
+overlay inode to prevent that.
+
+As a by-product, hashing directory inodes also detects multiple
+redirected dirs to the same lower dir and uncovered redirected dir
+target on and returns -ESTALE on lookup.
+
+The reported issue dates back to initial version of overlayfs, but this
+patch depends on ovl_inode code that was introduced in kernel v4.13.
+
+Cc: <stable@vger.kernel.org> #v4.13
+Reported-by: Niklas Cassel <niklas.cassel@axis.com>
+Signed-off-by: Amir Goldstein <amir73il@gmail.com>
+Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
+Tested-by: Niklas Cassel <niklas.cassel@axis.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/overlayfs/inode.c | 37 +++++++++++++++++++++++++++----------
+ fs/overlayfs/super.c | 1 +
+ fs/overlayfs/util.c | 4 ++--
+ 3 files changed, 30 insertions(+), 12 deletions(-)
+
+--- a/fs/overlayfs/inode.c
++++ b/fs/overlayfs/inode.c
+@@ -579,6 +579,16 @@ static int ovl_inode_set(struct inode *i
+ static bool ovl_verify_inode(struct inode *inode, struct dentry *lowerdentry,
+ struct dentry *upperdentry)
+ {
++ if (S_ISDIR(inode->i_mode)) {
++ /* Real lower dir moved to upper layer under us? */
++ if (!lowerdentry && ovl_inode_lower(inode))
++ return false;
++
++ /* Lookup of an uncovered redirect origin? */
++ if (!upperdentry && ovl_inode_upper(inode))
++ return false;
++ }
++
+ /*
+ * Allow non-NULL lower inode in ovl_inode even if lowerdentry is NULL.
+ * This happens when finding a copied up overlay inode for a renamed
+@@ -606,6 +616,8 @@ struct inode *ovl_get_inode(struct dentr
+ struct inode *inode;
+ /* Already indexed or could be indexed on copy up? */
+ bool indexed = (index || (ovl_indexdir(dentry->d_sb) && !upperdentry));
++ struct dentry *origin = indexed ? lowerdentry : NULL;
++ bool is_dir;
+
+ if (WARN_ON(upperdentry && indexed && !lowerdentry))
+ return ERR_PTR(-EIO);
+@@ -614,15 +626,19 @@ struct inode *ovl_get_inode(struct dentr
+ realinode = d_inode(lowerdentry);
+
+ /*
+- * Copy up origin (lower) may exist for non-indexed upper, but we must
+- * not use lower as hash key in that case.
+- * Hash inodes that are or could be indexed by origin inode and
+- * non-indexed upper inodes that could be hard linked by upper inode.
++ * Copy up origin (lower) may exist for non-indexed non-dir upper, but
++ * we must not use lower as hash key in that case.
++ * Hash non-dir that is or could be indexed by origin inode.
++ * Hash dir that is or could be merged by origin inode.
++ * Hash pure upper and non-indexed non-dir by upper inode.
+ */
+- if (!S_ISDIR(realinode->i_mode) && (upperdentry || indexed)) {
+- struct inode *key = d_inode(indexed ? lowerdentry :
+- upperdentry);
+- unsigned int nlink;
++ is_dir = S_ISDIR(realinode->i_mode);
++ if (is_dir)
++ origin = lowerdentry;
++
++ if (upperdentry || origin) {
++ struct inode *key = d_inode(origin ?: upperdentry);
++ unsigned int nlink = is_dir ? 1 : realinode->i_nlink;
+
+ inode = iget5_locked(dentry->d_sb, (unsigned long) key,
+ ovl_inode_test, ovl_inode_set, key);
+@@ -643,8 +659,9 @@ struct inode *ovl_get_inode(struct dentr
+ goto out;
+ }
+
+- nlink = ovl_get_nlink(lowerdentry, upperdentry,
+- realinode->i_nlink);
++ /* Recalculate nlink for non-dir due to indexing */
++ if (!is_dir)
++ nlink = ovl_get_nlink(lowerdentry, upperdentry, nlink);
+ set_nlink(inode, nlink);
+ } else {
+ inode = new_inode(dentry->d_sb);
+--- a/fs/overlayfs/super.c
++++ b/fs/overlayfs/super.c
+@@ -200,6 +200,7 @@ static void ovl_destroy_inode(struct ino
+ struct ovl_inode *oi = OVL_I(inode);
+
+ dput(oi->__upperdentry);
++ iput(oi->lower);
+ kfree(oi->redirect);
+ ovl_dir_cache_free(inode);
+ mutex_destroy(&oi->lock);
+--- a/fs/overlayfs/util.c
++++ b/fs/overlayfs/util.c
+@@ -253,7 +253,7 @@ void ovl_inode_init(struct inode *inode,
+ if (upperdentry)
+ OVL_I(inode)->__upperdentry = upperdentry;
+ if (lowerdentry)
+- OVL_I(inode)->lower = d_inode(lowerdentry);
++ OVL_I(inode)->lower = igrab(d_inode(lowerdentry));
+
+ ovl_copyattr(d_inode(upperdentry ?: lowerdentry), inode);
+ }
+@@ -269,7 +269,7 @@ void ovl_inode_update(struct inode *inod
+ */
+ smp_wmb();
+ OVL_I(inode)->__upperdentry = upperdentry;
+- if (!S_ISDIR(upperinode->i_mode) && inode_unhashed(inode)) {
++ if (inode_unhashed(inode)) {
+ inode->i_private = upperinode;
+ __insert_inode_hash(inode, (unsigned long) upperinode);
+ }
--- /dev/null
+From 81b6c999897919d5a16fedc018fe375dbab091c5 Mon Sep 17 00:00:00 2001
+From: Hannes Reinecke <hare@suse.de>
+Date: Wed, 13 Dec 2017 14:21:37 +0100
+Subject: scsi: core: check for device state in __scsi_remove_target()
+
+From: Hannes Reinecke <hare@suse.de>
+
+commit 81b6c999897919d5a16fedc018fe375dbab091c5 upstream.
+
+As it turned out device_get() doesn't use kref_get_unless_zero(), so we
+will be always getting a device pointer. Consequently, we need to check
+for the device state in __scsi_remove_target() to avoid tripping over
+deleted objects.
+
+Fixes: fbce4d97fd43 ("scsi: fixup kernel warning during rmmod()")
+Reported-by: Jason Yan <yanaijie@huawei.com>
+Signed-off-by: Hannes Reinecke <hare@suse.com>
+Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
+Reviewed-by: Ewan D. Milne <emilne@redhat.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Cc: Max Ivanov <ivanov.maxim@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/scsi/scsi_sysfs.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/scsi/scsi_sysfs.c
++++ b/drivers/scsi/scsi_sysfs.c
+@@ -1383,7 +1383,10 @@ static void __scsi_remove_target(struct
+ * check.
+ */
+ if (sdev->channel != starget->channel ||
+- sdev->id != starget->id ||
++ sdev->id != starget->id)
++ continue;
++ if (sdev->sdev_state == SDEV_DEL ||
++ sdev->sdev_state == SDEV_CANCEL ||
+ !get_device(&sdev->sdev_gendev))
+ continue;
+ spin_unlock_irqrestore(shost->host_lock, flags);
mvpp2-fix-multicast-address-filter.patch
usb-move-usb_uhci_big_endian_-out-of-usb_support.patch
x86-mm-mm-hwpoison-don-t-unconditionally-unmap-kernel-1-1-pages.patch
+scsi-core-check-for-device-state-in-__scsi_remove_target.patch
+bluetooth-bt_hciuart-now-depends-on-serial_dev_bus.patch
+arm-dts-exynos-fix-rtc-interrupt-for-exynos5410.patch
+arm-pxa-tosa-bt-add-module_license-tag.patch
+arm64-dts-msm8916-add-missing-phy-cells.patch
+arm-dts-s5pv210-add-interrupt-parent-for-ohci.patch
+arm-dts-mt7623-update-ethsys-binding.patch
+arm-dts-mt2701-add-reset-cells.patch
+arm-dts-delete-bogus-reference-to-the-charlcd.patch
+media-r820t-fix-r820t_write_reg-for-kasan.patch
+mmc-sdhci-of-esdhc-disable-sd-clock-for-clock-value-0.patch
+mmc-sdhci-of-esdhc-fix-emmc-couldn-t-work-after-kexec.patch
+mmc-sdhci-of-esdhc-fix-the-mmc-error-after-sleep-on-ls1046ardb.patch
+asoc-acpi-fix-machine-driver-selection-based-on-quirk.patch
+ovl-hash-directory-inodes-for-fsnotify.patch