--- /dev/null
+From 80ab8eae70e51d578ebbeb228e0f7a562471b8b7 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Fri, 10 Jan 2014 14:20:42 +0100
+Subject: ALSA: Enable CONFIG_ZONE_DMA for smaller PCI DMA masks
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 80ab8eae70e51d578ebbeb228e0f7a562471b8b7 upstream.
+
+The PCI devices with DMA masks smaller than 32bit should enable
+CONFIG_ZONE_DMA. Since the recent change of page allocator, page
+allocations via dma_alloc_coherent() with the limited DMA mask bits
+may fail more frequently, ended up with no available buffers, when
+CONFIG_ZONE_DMA isn't enabled. With CONFIG_ZONE_DMA, the system has
+much more chance to obtain such pages.
+
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=68221
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/Kconfig | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+--- a/sound/pci/Kconfig
++++ b/sound/pci/Kconfig
+@@ -30,6 +30,7 @@ config SND_ALS300
+ select SND_PCM
+ select SND_AC97_CODEC
+ select SND_OPL3_LIB
++ select ZONE_DMA
+ help
+ Say 'Y' or 'M' to include support for Avance Logic ALS300/ALS300+
+
+@@ -54,6 +55,7 @@ config SND_ALI5451
+ tristate "ALi M5451 PCI Audio Controller"
+ select SND_MPU401_UART
+ select SND_AC97_CODEC
++ select ZONE_DMA
+ help
+ Say Y here to include support for the integrated AC97 sound
+ device on motherboards using the ALi M5451 Audio Controller
+@@ -158,6 +160,7 @@ config SND_AZT3328
+ select SND_PCM
+ select SND_RAWMIDI
+ select SND_AC97_CODEC
++ select ZONE_DMA
+ help
+ Say Y here to include support for Aztech AZF3328 (PCI168)
+ soundcards.
+@@ -463,6 +466,7 @@ config SND_EMU10K1
+ select SND_HWDEP
+ select SND_RAWMIDI
+ select SND_AC97_CODEC
++ select ZONE_DMA
+ help
+ Say Y to include support for Sound Blaster PCI 512, Live!,
+ Audigy and E-mu APS (partially supported) soundcards.
+@@ -478,6 +482,7 @@ config SND_EMU10K1X
+ tristate "Emu10k1X (Dell OEM Version)"
+ select SND_AC97_CODEC
+ select SND_RAWMIDI
++ select ZONE_DMA
+ help
+ Say Y here to include support for the Dell OEM version of the
+ Sound Blaster Live!.
+@@ -511,6 +516,7 @@ config SND_ES1938
+ select SND_OPL3_LIB
+ select SND_MPU401_UART
+ select SND_AC97_CODEC
++ select ZONE_DMA
+ help
+ Say Y here to include support for soundcards based on ESS Solo-1
+ (ES1938, ES1946, ES1969) chips.
+@@ -522,6 +528,7 @@ config SND_ES1968
+ tristate "ESS ES1968/1978 (Maestro-1/2/2E)"
+ select SND_MPU401_UART
+ select SND_AC97_CODEC
++ select ZONE_DMA
+ help
+ Say Y here to include support for soundcards based on ESS Maestro
+ 1/2/2E chips.
+@@ -603,6 +610,7 @@ config SND_ICE1712
+ select SND_MPU401_UART
+ select SND_AC97_CODEC
+ select BITREVERSE
++ select ZONE_DMA
+ help
+ Say Y here to include support for soundcards based on the
+ ICE1712 (Envy24) chip.
+@@ -690,6 +698,7 @@ config SND_LX6464ES
+ config SND_MAESTRO3
+ tristate "ESS Allegro/Maestro3"
+ select SND_AC97_CODEC
++ select ZONE_DMA
+ help
+ Say Y here to include support for soundcards based on ESS Maestro 3
+ (Allegro) chips.
+@@ -786,6 +795,7 @@ config SND_SIS7019
+ tristate "SiS 7019 Audio Accelerator"
+ depends on X86 && !X86_64
+ select SND_AC97_CODEC
++ select ZONE_DMA
+ help
+ Say Y here to include support for the SiS 7019 Audio Accelerator.
+
+@@ -797,6 +807,7 @@ config SND_SONICVIBES
+ select SND_OPL3_LIB
+ select SND_MPU401_UART
+ select SND_AC97_CODEC
++ select ZONE_DMA
+ help
+ Say Y here to include support for soundcards based on the S3
+ SonicVibes chip.
+@@ -808,6 +819,7 @@ config SND_TRIDENT
+ tristate "Trident 4D-Wave DX/NX; SiS 7018"
+ select SND_MPU401_UART
+ select SND_AC97_CODEC
++ select ZONE_DMA
+ help
+ Say Y here to include support for soundcards based on Trident
+ 4D-Wave DX/NX or SiS 7018 chips.
--- /dev/null
+From 43a8e50a46a4e1dd1451e4a4ffa1f7695fb7d287 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Tue, 7 Jan 2014 18:11:44 +0100
+Subject: ALSA: hda - Don't create duplicated ctls for loopback paths
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 43a8e50a46a4e1dd1451e4a4ffa1f7695fb7d287 upstream.
+
+AD1986A mic pins (0x1d and 0x1f) share the same widget for controlling
+the loopback volume/mute, but the generic parser didn't check it.
+This ended up with the duplicated controls for the same effect.
+
+This patch adds the check of the duplication for avoiding it.
+
+After this fix, there will be only one control although it affects
+both paths; this remaining issue should be fixed later in a different
+patch.
+
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=66621
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/hda_generic.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/sound/pci/hda/hda_generic.c
++++ b/sound/pci/hda/hda_generic.c
+@@ -2796,9 +2796,11 @@ static bool look_for_mix_leaf_ctls(struc
+ if (num_conns < idx)
+ return false;
+ nid = list[idx];
+- if (!*mix_val && nid_has_volume(codec, nid, HDA_OUTPUT))
++ if (!*mix_val && nid_has_volume(codec, nid, HDA_OUTPUT) &&
++ !is_ctl_associated(codec, nid, HDA_OUTPUT, 0, NID_PATH_VOL_CTL))
+ *mix_val = HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_OUTPUT);
+- if (!*mute_val && nid_has_mute(codec, nid, HDA_OUTPUT))
++ if (!*mute_val && nid_has_mute(codec, nid, HDA_OUTPUT) &&
++ !is_ctl_associated(codec, nid, HDA_OUTPUT, 0, NID_PATH_MUTE_CTL))
+ *mute_val = HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_OUTPUT);
+
+ return *mix_val || *mute_val;
--- /dev/null
+From e7729a415315fcd9516912050d85d5aaebcededc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Adrien=20Verg=C3=A9?= <adrienverge@gmail.com>
+Date: Fri, 24 Jan 2014 14:56:14 -0500
+Subject: ALSA: hda - Fix silent output on MacBook Air 1,1
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Adrien Vergé <adrienverge@gmail.com>
+
+commit e7729a415315fcd9516912050d85d5aaebcededc upstream.
+
+Similarly to other Apple products, MBA 1,1 needs a specific quirk.
+Pin 0x18 must be set to VREF_50 to have sound output. This was no
+longer done since commit 1a97b7f, resulting in a mute built-in speaker.
+
+This patch corrects the regression by creating a fixup for the MBA 1,1.
+
+Fixes: 1a97b7f22774 ("ALSA: hda/realtek - Remove the last static quirks for ALC882")
+Tested-by: Adrien Vergé <adrienverge@gmail.com>
+Signed-off-by: Adrien Vergé <adrienverge@gmail.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_realtek.c | 19 ++++++++++++++++++-
+ 1 file changed, 18 insertions(+), 1 deletion(-)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -1763,6 +1763,7 @@ enum {
+ ALC889_FIXUP_DAC_ROUTE,
+ ALC889_FIXUP_MBP_VREF,
+ ALC889_FIXUP_IMAC91_VREF,
++ ALC889_FIXUP_MBA11_VREF,
+ ALC889_FIXUP_MBA21_VREF,
+ ALC882_FIXUP_INV_DMIC,
+ ALC882_FIXUP_NO_PRIMARY_HP,
+@@ -1892,6 +1893,16 @@ static void alc889_fixup_imac91_vref(str
+ alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids));
+ }
+
++/* Set VREF on speaker pins on mba11 */
++static void alc889_fixup_mba11_vref(struct hda_codec *codec,
++ const struct hda_fixup *fix, int action)
++{
++ static hda_nid_t nids[1] = { 0x18 };
++
++ if (action == HDA_FIXUP_ACT_INIT)
++ alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids));
++}
++
+ /* Set VREF on speaker pins on mba21 */
+ static void alc889_fixup_mba21_vref(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action)
+@@ -2096,6 +2107,12 @@ static const struct hda_fixup alc882_fix
+ .chained = true,
+ .chain_id = ALC882_FIXUP_GPIO1,
+ },
++ [ALC889_FIXUP_MBA11_VREF] = {
++ .type = HDA_FIXUP_FUNC,
++ .v.func = alc889_fixup_mba11_vref,
++ .chained = true,
++ .chain_id = ALC889_FIXUP_MBP_VREF,
++ },
+ [ALC889_FIXUP_MBA21_VREF] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc889_fixup_mba21_vref,
+@@ -2165,7 +2182,7 @@ static const struct snd_pci_quirk alc882
+ SND_PCI_QUIRK(0x106b, 0x2c00, "MacbookPro rev3", ALC889_FIXUP_MBP_VREF),
+ SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889_FIXUP_MBP_VREF),
+ SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD),
+- SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC889_FIXUP_MBP_VREF),
++ SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC889_FIXUP_MBA11_VREF),
+ SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC889_FIXUP_MBA21_VREF),
+ SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889_FIXUP_MBP_VREF),
+ SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF),
--- /dev/null
+From 770bd4bf2e664939a9dacd3d26ec9ff7a3933210 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Fri, 27 Dec 2013 00:13:08 +0200
+Subject: ALSA: rme9652: fix a missing comma in channel_map_9636_ds[]
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 770bd4bf2e664939a9dacd3d26ec9ff7a3933210 upstream.
+
+The lack of comma leads to the wrong channel for an SPDIF channel.
+Unfortunately this wasn't caught by compiler because it's still a
+valid expression.
+
+Reported-by: Alexander Aristov <aristov.alexander@gmail.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/rme9652/rme9652.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/pci/rme9652/rme9652.c
++++ b/sound/pci/rme9652/rme9652.c
+@@ -285,7 +285,7 @@ static char channel_map_9636_ds[26] = {
+ /* ADAT channels are remapped */
+ 1, 3, 5, 7, 9, 11, 13, 15,
+ /* channels 8 and 9 are S/PDIF */
+- 24, 25
++ 24, 25,
+ /* others don't exist */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
+ };
--- /dev/null
+From af8d1c63afcbf36eea06789c92e22d4af118d2fb Mon Sep 17 00:00:00 2001
+From: Gregory CLEMENT <gregory.clement@free-electrons.com>
+Date: Thu, 2 Jan 2014 15:08:59 +0100
+Subject: ARM: mvebu: Add support to get the ID and the revision of a SoC
+
+From: Gregory CLEMENT <gregory.clement@free-electrons.com>
+
+commit af8d1c63afcbf36eea06789c92e22d4af118d2fb upstream.
+
+All the mvebu SoCs have information related to their variant and
+revision that can be read from the PCI control register.
+
+This patch adds support for Armada XP and Armada 370. This reading of
+the revision and the ID are done before the PCI initialization to
+avoid any conflicts. Once these data are retrieved, the resources are
+freed to let the PCI subsystem use it.
+
+Fixes: 930ab3d403ae (i2c: mv64xxx: Add I2C Transaction Generator support)
+Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
+Acked-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Jason Cooper <jason@lakedaemon.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/mach-mvebu/Makefile | 2
+ arch/arm/mach-mvebu/mvebu-soc-id.c | 119 +++++++++++++++++++++++++++++++++++++
+ arch/arm/mach-mvebu/mvebu-soc-id.h | 32 +++++++++
+ 3 files changed, 152 insertions(+), 1 deletion(-)
+
+--- a/arch/arm/mach-mvebu/Makefile
++++ b/arch/arm/mach-mvebu/Makefile
+@@ -3,7 +3,7 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) :=
+
+ AFLAGS_coherency_ll.o := -Wa,-march=armv7-a
+
+-obj-y += system-controller.o
++obj-y += system-controller.o mvebu-soc-id.o
+ obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o
+ obj-$(CONFIG_ARCH_MVEBU) += coherency.o coherency_ll.o pmsu.o
+ obj-$(CONFIG_SMP) += platsmp.o headsmp.o
+--- /dev/null
++++ b/arch/arm/mach-mvebu/mvebu-soc-id.c
+@@ -0,0 +1,119 @@
++/*
++ * ID and revision information for mvebu SoCs
++ *
++ * Copyright (C) 2014 Marvell
++ *
++ * Gregory CLEMENT <gregory.clement@free-electrons.com>
++ *
++ * This file is licensed under the terms of the GNU General Public
++ * License version 2. This program is licensed "as is" without any
++ * warranty of any kind, whether express or implied.
++ *
++ * All the mvebu SoCs have information related to their variant and
++ * revision that can be read from the PCI control register. This is
++ * done before the PCI initialization to avoid any conflict. Once the
++ * ID and revision are retrieved, the mapping is freed.
++ */
++
++#define pr_fmt(fmt) "mvebu-soc-id: " fmt
++
++#include <linux/clk.h>
++#include <linux/init.h>
++#include <linux/io.h>
++#include <linux/kernel.h>
++#include <linux/of.h>
++#include <linux/of_address.h>
++#include "mvebu-soc-id.h"
++
++#define PCIE_DEV_ID_OFF 0x0
++#define PCIE_DEV_REV_OFF 0x8
++
++#define SOC_ID_MASK 0xFFFF0000
++#define SOC_REV_MASK 0xFF
++
++static u32 soc_dev_id;
++static u32 soc_rev;
++static bool is_id_valid;
++
++static const struct of_device_id mvebu_pcie_of_match_table[] = {
++ { .compatible = "marvell,armada-xp-pcie", },
++ { .compatible = "marvell,armada-370-pcie", },
++ {},
++};
++
++int mvebu_get_soc_id(u32 *dev, u32 *rev)
++{
++ if (is_id_valid) {
++ *dev = soc_dev_id;
++ *rev = soc_rev;
++ return 0;
++ } else
++ return -1;
++}
++
++static int __init mvebu_soc_id_init(void)
++{
++ struct device_node *np;
++ int ret = 0;
++ void __iomem *pci_base;
++ struct clk *clk;
++ struct device_node *child;
++
++ np = of_find_matching_node(NULL, mvebu_pcie_of_match_table);
++ if (!np)
++ return ret;
++
++ /*
++ * ID and revision are available from any port, so we
++ * just pick the first one
++ */
++ child = of_get_next_child(np, NULL);
++ if (child == NULL) {
++ pr_err("cannot get pci node\n");
++ ret = -ENOMEM;
++ goto clk_err;
++ }
++
++ clk = of_clk_get_by_name(child, NULL);
++ if (IS_ERR(clk)) {
++ pr_err("cannot get clock\n");
++ ret = -ENOMEM;
++ goto clk_err;
++ }
++
++ ret = clk_prepare_enable(clk);
++ if (ret) {
++ pr_err("cannot enable clock\n");
++ goto clk_err;
++ }
++
++ pci_base = of_iomap(child, 0);
++ if (IS_ERR(pci_base)) {
++ pr_err("cannot map registers\n");
++ ret = -ENOMEM;
++ goto res_ioremap;
++ }
++
++ /* SoC ID */
++ soc_dev_id = readl(pci_base + PCIE_DEV_ID_OFF) >> 16;
++
++ /* SoC revision */
++ soc_rev = readl(pci_base + PCIE_DEV_REV_OFF) & SOC_REV_MASK;
++
++ is_id_valid = true;
++
++ pr_info("MVEBU SoC ID=0x%X, Rev=0x%X\n", soc_dev_id, soc_rev);
++
++ iounmap(pci_base);
++
++res_ioremap:
++ clk_disable_unprepare(clk);
++
++clk_err:
++ of_node_put(child);
++ of_node_put(np);
++
++ return ret;
++}
++core_initcall(mvebu_soc_id_init);
++
+--- /dev/null
++++ b/arch/arm/mach-mvebu/mvebu-soc-id.h
+@@ -0,0 +1,32 @@
++/*
++ * Marvell EBU SoC ID and revision definitions.
++ *
++ * Copyright (C) 2014 Marvell Semiconductor
++ *
++ * This file is licensed under the terms of the GNU General Public
++ * License version 2. This program is licensed "as is" without any
++ * warranty of any kind, whether express or implied.
++ */
++
++#ifndef __LINUX_MVEBU_SOC_ID_H
++#define __LINUX_MVEBU_SOC_ID_H
++
++/* Armada XP ID */
++#define MV78230_DEV_ID 0x7823
++#define MV78260_DEV_ID 0x7826
++#define MV78460_DEV_ID 0x7846
++
++/* Armada XP Revision */
++#define MV78XX0_A0_REV 0x1
++#define MV78XX0_B0_REV 0x2
++
++#ifdef CONFIG_ARCH_MVEBU
++int mvebu_get_soc_id(u32 *dev, u32 *rev);
++#else
++static inline int mvebu_get_soc_id(u32 *dev, u32 *rev)
++{
++ return -1;
++}
++#endif
++
++#endif /* __LINUX_MVEBU_SOC_ID_H */
--- /dev/null
+From e20970ada3f699c113fe64b04492af083d11a7d8 Mon Sep 17 00:00:00 2001
+From: Lars-Peter Clausen <lars@metafoo.de>
+Date: Wed, 8 Jan 2014 11:22:25 +0100
+Subject: ASoC: adau1701: Fix ADAU1701_SEROCTL_WORD_LEN_16 constant
+
+From: Lars-Peter Clausen <lars@metafoo.de>
+
+commit e20970ada3f699c113fe64b04492af083d11a7d8 upstream.
+
+The driver defines ADAU1701_SEROCTL_WORD_LEN_16 as 0x10 while it should be b10,
+so 0x2. This patch fixes it.
+
+Reported-by: Magnus Reftel <magnus.reftel@lockless.no>
+Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
+Signed-off-by: Mark Brown <broonie@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/soc/codecs/adau1701.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/soc/codecs/adau1701.c
++++ b/sound/soc/codecs/adau1701.c
+@@ -64,7 +64,7 @@
+
+ #define ADAU1701_SEROCTL_WORD_LEN_24 0x0000
+ #define ADAU1701_SEROCTL_WORD_LEN_20 0x0001
+-#define ADAU1701_SEROCTL_WORD_LEN_16 0x0010
++#define ADAU1701_SEROCTL_WORD_LEN_16 0x0002
+ #define ADAU1701_SEROCTL_WORD_LEN_MASK 0x0003
+
+ #define ADAU1701_AUXNPOW_VBPD 0x40
--- /dev/null
+From 34354792432b6e0a3b156819a1a19716c50d3473 Mon Sep 17 00:00:00 2001
+From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
+Date: Tue, 21 Jan 2014 16:27:51 +0000
+Subject: ASoC: wm5110: Extend SYSCLK patch file for rev D
+
+From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
+
+commit 34354792432b6e0a3b156819a1a19716c50d3473 upstream.
+
+Latest evaluation of the the device has given some patch file additions
+for improved performance.
+
+Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
+Signed-off-by: Mark Brown <broonie@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/soc/codecs/wm5110.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 48 insertions(+)
+
+--- a/sound/soc/codecs/wm5110.c
++++ b/sound/soc/codecs/wm5110.c
+@@ -43,6 +43,54 @@ static const struct reg_default wm5110_s
+ { 0x3133, 0x1201 },
+ { 0x3183, 0x1501 },
+ { 0x31D3, 0x1401 },
++ { 0x0049, 0x01ea },
++ { 0x004a, 0x01f2 },
++ { 0x0057, 0x01e7 },
++ { 0x0058, 0x01fb },
++ { 0x33ce, 0xc4f5 },
++ { 0x33cf, 0x1361 },
++ { 0x33d0, 0x0402 },
++ { 0x33d1, 0x4700 },
++ { 0x33d2, 0x026d },
++ { 0x33d3, 0xff00 },
++ { 0x33d4, 0x026d },
++ { 0x33d5, 0x0101 },
++ { 0x33d6, 0xc4f5 },
++ { 0x33d7, 0x0361 },
++ { 0x33d8, 0x0402 },
++ { 0x33d9, 0x6701 },
++ { 0x33da, 0xc4f5 },
++ { 0x33db, 0x136f },
++ { 0x33dc, 0xc4f5 },
++ { 0x33dd, 0x134f },
++ { 0x33de, 0xc4f5 },
++ { 0x33df, 0x131f },
++ { 0x33e0, 0x026d },
++ { 0x33e1, 0x4f01 },
++ { 0x33e2, 0x026d },
++ { 0x33e3, 0xf100 },
++ { 0x33e4, 0x026d },
++ { 0x33e5, 0x0001 },
++ { 0x33e6, 0xc4f5 },
++ { 0x33e7, 0x0361 },
++ { 0x33e8, 0x0402 },
++ { 0x33e9, 0x6601 },
++ { 0x33ea, 0xc4f5 },
++ { 0x33eb, 0x136f },
++ { 0x33ec, 0xc4f5 },
++ { 0x33ed, 0x134f },
++ { 0x33ee, 0xc4f5 },
++ { 0x33ef, 0x131f },
++ { 0x33f0, 0x026d },
++ { 0x33f1, 0x4e01 },
++ { 0x33f2, 0x026d },
++ { 0x33f3, 0xf000 },
++ { 0x33f6, 0xc4f5 },
++ { 0x33f7, 0x1361 },
++ { 0x33f8, 0x0402 },
++ { 0x33f9, 0x4600 },
++ { 0x33fa, 0x026d },
++ { 0x33fb, 0xfe00 },
+ };
+
+ static int wm5110_sysclk_ev(struct snd_soc_dapm_widget *w,
--- /dev/null
+From 9013d64e661fc2a37a1742670202171c27fef4b5 Mon Sep 17 00:00:00 2001
+From: Lior Amsalem <alior@marvell.com>
+Date: Tue, 14 Jan 2014 20:09:57 +0100
+Subject: ata: sata_mv: fix disk hotplug for Armada 370/XP SoCs
+
+From: Lior Amsalem <alior@marvell.com>
+
+commit 9013d64e661fc2a37a1742670202171c27fef4b5 upstream.
+
+On Armada 370/XP SoCs, once a disk is removed from a SATA port, then the
+re-plug events are not detected by the sata_mv driver. This patch fixes
+the issue by updating the PHY speed in the LP_PHY_CTL register (0x58)
+according to the SControl speed.
+
+Note that this fix is only applied if the compatible string
+"marvell,armada-370-sata" is found in the SATA DT node.
+
+Fixes: 9ae6f740b49f ("arm: mach-mvebu: add support for Armada 370 and Armada XP with DT")
+Signed-off-by: Lior Amsalem <alior@marvell.com>
+Signed-off-by: Nadav Haklai <nadavh@marvell.com>
+Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
+Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Cc: Jason Cooper <jason@lakedaemon.net>
+Cc: Andrew Lunn <andrew@lunn.ch>
+Cc: Gregory Clement <gregory.clement@free-electrons.com>
+Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
+Acked-by: Jason Cooper <jason@lakedaemon.net>
+Signed-off-by: Tejun Heo <tj@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/ata/sata_mv.c | 24 ++++++++++++++++++++++++
+ 1 file changed, 24 insertions(+)
+
+--- a/drivers/ata/sata_mv.c
++++ b/drivers/ata/sata_mv.c
+@@ -304,6 +304,7 @@ enum {
+ MV5_LTMODE = 0x30,
+ MV5_PHY_CTL = 0x0C,
+ SATA_IFCFG = 0x050,
++ LP_PHY_CTL = 0x058,
+
+ MV_M2_PREAMP_MASK = 0x7e0,
+
+@@ -431,6 +432,7 @@ enum {
+ MV_HP_CUT_THROUGH = (1 << 10), /* can use EDMA cut-through */
+ MV_HP_FLAG_SOC = (1 << 11), /* SystemOnChip, no PCI */
+ MV_HP_QUIRK_LED_BLINK_EN = (1 << 12), /* is led blinking enabled? */
++ MV_HP_FIX_LP_PHY_CTL = (1 << 13), /* fix speed in LP_PHY_CTL ? */
+
+ /* Port private flags (pp_flags) */
+ MV_PP_FLAG_EDMA_EN = (1 << 0), /* is EDMA engine enabled? */
+@@ -1353,6 +1355,7 @@ static int mv_scr_write(struct ata_link
+
+ if (ofs != 0xffffffffU) {
+ void __iomem *addr = mv_ap_base(link->ap) + ofs;
++ struct mv_host_priv *hpriv = link->ap->host->private_data;
+ if (sc_reg_in == SCR_CONTROL) {
+ /*
+ * Workaround for 88SX60x1 FEr SATA#26:
+@@ -1369,6 +1372,18 @@ static int mv_scr_write(struct ata_link
+ */
+ if ((val & 0xf) == 1 || (readl(addr) & 0xf) == 1)
+ val |= 0xf000;
++
++ if (hpriv->hp_flags & MV_HP_FIX_LP_PHY_CTL) {
++ void __iomem *lp_phy_addr =
++ mv_ap_base(link->ap) + LP_PHY_CTL;
++ /*
++ * Set PHY speed according to SControl speed.
++ */
++ if ((val & 0xf0) == 0x10)
++ writelfl(0x7, lp_phy_addr);
++ else
++ writelfl(0x227, lp_phy_addr);
++ }
+ }
+ writelfl(val, addr);
+ return 0;
+@@ -4111,6 +4126,15 @@ static int mv_platform_probe(struct plat
+ if (rc)
+ goto err;
+
++ /*
++ * To allow disk hotplug on Armada 370/XP SoCs, the PHY speed must be
++ * updated in the LP_PHY_CTL register.
++ */
++ if (pdev->dev.of_node &&
++ of_device_is_compatible(pdev->dev.of_node,
++ "marvell,armada-370-sata"))
++ hpriv->hp_flags |= MV_HP_FIX_LP_PHY_CTL;
++
+ /* initialize adapter */
+ rc = mv_init_host(host);
+ if (rc)
--- /dev/null
+From b1f5c73bd5a4752efb7d7af019034044b08aafe9 Mon Sep 17 00:00:00 2001
+From: Simon Guinot <simon.guinot@sequanux.org>
+Date: Tue, 14 Jan 2014 20:04:39 +0100
+Subject: ata: sata_mv: introduce compatible string "marvell, armada-370-sata"
+
+From: Simon Guinot <simon.guinot@sequanux.org>
+
+commit b1f5c73bd5a4752efb7d7af019034044b08aafe9 upstream.
+
+The sata_mv driver supports the SATA IP found in several Marvell SoCs.
+As some new SATA registers have been introduced with the Armada 370/XP
+SoCs, a way to identify them is needed.
+
+This patch introduces a new compatible string for the SATA IP found in
+Armada 370/XP SoCs.
+
+Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
+Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Cc: Jason Cooper <jason@lakedaemon.net>
+Cc: Andrew Lunn <andrew@lunn.ch>
+Cc: Gregory Clement <gregory.clement@free-electrons.com>
+Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
+Cc: Lior Amsalem <alior@marvell.com>
+Acked-by: Jason Cooper <jason@lakedaemon.net>
+Signed-off-by: Tejun Heo <tj@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ Documentation/devicetree/bindings/ata/marvell.txt | 2 +-
+ drivers/ata/sata_mv.c | 1 +
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+--- a/Documentation/devicetree/bindings/ata/marvell.txt
++++ b/Documentation/devicetree/bindings/ata/marvell.txt
+@@ -1,7 +1,7 @@
+ * Marvell Orion SATA
+
+ Required Properties:
+-- compatibility : "marvell,orion-sata"
++- compatibility : "marvell,orion-sata" or "marvell,armada-370-sata"
+ - reg : Address range of controller
+ - interrupts : Interrupt controller is using
+ - nr-ports : Number of SATA ports in use.
+--- a/drivers/ata/sata_mv.c
++++ b/drivers/ata/sata_mv.c
+@@ -4216,6 +4216,7 @@ static int mv_platform_resume(struct pla
+
+ #ifdef CONFIG_OF
+ static struct of_device_id mv_sata_dt_ids[] = {
++ { .compatible = "marvell,armada-370-sata", },
+ { .compatible = "marvell,orion-sata", },
+ {},
+ };
--- /dev/null
+From ef71ec00002d92a08eb27e9d036e3d48835b6597 Mon Sep 17 00:00:00 2001
+From: Kent Overstreet <kmo@daterainc.com>
+Date: Tue, 17 Dec 2013 17:51:02 -0800
+Subject: bcache: Data corruption fix
+
+From: Kent Overstreet <kmo@daterainc.com>
+
+commit ef71ec00002d92a08eb27e9d036e3d48835b6597 upstream.
+
+The code that handles overlapping extents that we've just read back in from disk
+was depending on the behaviour of the code that handles overlapping extents as
+we're inserting into a btree node in the case of an insert that forced an
+existing extent to be split: on insert, if we had to split we'd also insert a
+new extent to represent the top part of the old extent - and then that new
+extent would get written out.
+
+The code that read the extents back in thus not bother with splitting extents -
+if it saw an extent that ovelapped in the middle of an older extent, it would
+trim the old extent to only represent the bottom part, assuming that the
+original insert would've inserted a new extent to represent the top part.
+
+I still haven't figured out _how_ it can happen, but I'm now pretty convinced
+(and testing has confirmed) that there's some kind of an obscure corner case
+(probably involving extent merging, and multiple overwrites in different sets)
+that breaks this. The fix is to change the mergesort fixup code to split extents
+itself when required.
+
+Signed-off-by: Kent Overstreet <kmo@daterainc.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/bcache/bset.c | 26 ++++++++++++++++++++++----
+ 1 file changed, 22 insertions(+), 4 deletions(-)
+
+--- a/drivers/md/bcache/bset.c
++++ b/drivers/md/bcache/bset.c
+@@ -927,7 +927,7 @@ static void sort_key_next(struct btree_i
+ *i = iter->data[--iter->used];
+ }
+
+-static void btree_sort_fixup(struct btree_iter *iter)
++static struct bkey *btree_sort_fixup(struct btree_iter *iter, struct bkey *tmp)
+ {
+ while (iter->used > 1) {
+ struct btree_iter_set *top = iter->data, *i = top + 1;
+@@ -955,9 +955,22 @@ static void btree_sort_fixup(struct btre
+ } else {
+ /* can't happen because of comparison func */
+ BUG_ON(!bkey_cmp(&START_KEY(top->k), &START_KEY(i->k)));
+- bch_cut_back(&START_KEY(i->k), top->k);
++
++ if (bkey_cmp(i->k, top->k) < 0) {
++ bkey_copy(tmp, top->k);
++
++ bch_cut_back(&START_KEY(i->k), tmp);
++ bch_cut_front(i->k, top->k);
++ heap_sift(iter, 0, btree_iter_cmp);
++
++ return tmp;
++ } else {
++ bch_cut_back(&START_KEY(i->k), top->k);
++ }
+ }
+ }
++
++ return NULL;
+ }
+
+ static void btree_mergesort(struct btree *b, struct bset *out,
+@@ -965,15 +978,20 @@ static void btree_mergesort(struct btree
+ bool fixup, bool remove_stale)
+ {
+ struct bkey *k, *last = NULL;
++ BKEY_PADDED(k) tmp;
+ bool (*bad)(struct btree *, const struct bkey *) = remove_stale
+ ? bch_ptr_bad
+ : bch_ptr_invalid;
+
+ while (!btree_iter_end(iter)) {
+ if (fixup && !b->level)
+- btree_sort_fixup(iter);
++ k = btree_sort_fixup(iter, &tmp.k);
++ else
++ k = NULL;
++
++ if (!k)
++ k = bch_btree_iter_next(iter);
+
+- k = bch_btree_iter_next(iter);
+ if (bad(b, k))
+ continue;
+
--- /dev/null
+From 09c455aaa8f47a94d5bafaa23d58365768210507 Mon Sep 17 00:00:00 2001
+From: Theodore Ts'o <tytso@mit.edu>
+Date: Tue, 7 Jan 2014 12:58:19 -0500
+Subject: ext4: avoid clearing beyond i_blocks when truncating an inline data file
+
+From: Theodore Ts'o <tytso@mit.edu>
+
+commit 09c455aaa8f47a94d5bafaa23d58365768210507 upstream.
+
+A missing cast means that when we are truncating a file which is less
+than 60 bytes, we don't clear the correct area of memory, and in fact
+we can end up truncating the next inode in the inode table, or worse
+yet, some other kernel data structure.
+
+Addresses-Coverity-Id: #751987
+
+Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/ext4/inline.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+--- a/fs/ext4/inline.c
++++ b/fs/ext4/inline.c
+@@ -1957,9 +1957,11 @@ void ext4_inline_data_truncate(struct in
+ }
+
+ /* Clear the content within i_blocks. */
+- if (i_size < EXT4_MIN_INLINE_DATA_SIZE)
+- memset(ext4_raw_inode(&is.iloc)->i_block + i_size, 0,
+- EXT4_MIN_INLINE_DATA_SIZE - i_size);
++ if (i_size < EXT4_MIN_INLINE_DATA_SIZE) {
++ void *p = (void *) ext4_raw_inode(&is.iloc)->i_block;
++ memset(p + i_size, 0,
++ EXT4_MIN_INLINE_DATA_SIZE - i_size);
++ }
+
+ EXT4_I(inode)->i_inline_size = i_size <
+ EXT4_MIN_INLINE_DATA_SIZE ?
--- /dev/null
+From b0ad4ff35d479a46a3b995a299db9aeb097acfce Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 13 Jan 2014 12:32:44 +0100
+Subject: hp_accel: Add a new PnP ID HPQ6007 for new HP laptops
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit b0ad4ff35d479a46a3b995a299db9aeb097acfce upstream.
+
+The DriveGuard chips on the new HP laptops are with a new PnP ID
+"HPQ6007". It should be compatible with older chips.
+
+Acked-by: Éric Piel <eric.piel@tremplin-utc.net>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/platform/x86/hp_accel.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/platform/x86/hp_accel.c
++++ b/drivers/platform/x86/hp_accel.c
+@@ -77,6 +77,7 @@ static inline void delayed_sysfs_set(str
+ static struct acpi_device_id lis3lv02d_device_ids[] = {
+ {"HPQ0004", 0}, /* HP Mobile Data Protection System PNP */
+ {"HPQ6000", 0}, /* HP Mobile Data Protection System PNP */
++ {"HPQ6007", 0}, /* HP Mobile Data Protection System PNP */
+ {"", 0},
+ };
+ MODULE_DEVICE_TABLE(acpi, lis3lv02d_device_ids);
--- /dev/null
+From ecd75ad514d73efc1bbcc5f10a13566c3ace5f53 Mon Sep 17 00:00:00 2001
+From: Tejun Heo <tj@kernel.org>
+Date: Thu, 16 Jan 2014 09:47:17 -0500
+Subject: libata: disable LPM for some WD SATA-I devices
+
+From: Tejun Heo <tj@kernel.org>
+
+commit ecd75ad514d73efc1bbcc5f10a13566c3ace5f53 upstream.
+
+For some reason, some early WD drives spin up and down drives
+erratically when the link is put into slumber mode which can reduce
+the life expectancy of the device significantly. Unfortunately, we
+don't have full list of devices and given the nature of the issue it'd
+be better to err on the side of false positives than the other way
+around. Let's disable LPM on all WD devices which match one of the
+known problematic model prefixes and are SATA-I.
+
+As horkage list doesn't support matching SATA capabilities, this is
+implemented as two horkages - WD_BROKEN_LPM and NOLPM. The former is
+set for the known prefixes and sets the latter if the matched device
+is SATA-I.
+
+Note that this isn't optimal as this disables all LPM operations and
+partial link power state reportedly works fine on these; however, the
+way LPM is implemented in libata makes it difficult to precisely map
+libata LPM setting to specific link power state. Well, these devices
+are already fairly outdated. Let's just disable whole LPM for now.
+
+Signed-off-by: Tejun Heo <tj@kernel.org>
+Reported-and-tested-by: Nikos Barkas <levelwol@gmail.com>
+Reported-and-tested-by: Ioannis Barkas <risc4all@yahoo.com>
+References: https://bugzilla.kernel.org/show_bug.cgi?id=57211
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/ata/libata-core.c | 27 +++++++++++++++++++++++++++
+ drivers/ata/libata-scsi.c | 18 +++++++++++++++---
+ include/linux/libata.h | 2 ++
+ 3 files changed, 44 insertions(+), 3 deletions(-)
+
+--- a/drivers/ata/libata-core.c
++++ b/drivers/ata/libata-core.c
+@@ -2199,6 +2199,16 @@ int ata_dev_configure(struct ata_device
+ if (rc)
+ return rc;
+
++ /* some WD SATA-1 drives have issues with LPM, turn on NOLPM for them */
++ if ((dev->horkage & ATA_HORKAGE_WD_BROKEN_LPM) &&
++ (id[ATA_ID_SATA_CAPABILITY] & 0xe) == 0x2)
++ dev->horkage |= ATA_HORKAGE_NOLPM;
++
++ if (dev->horkage & ATA_HORKAGE_NOLPM) {
++ ata_dev_warn(dev, "LPM support broken, forcing max_power\n");
++ dev->link->ap->target_lpm_policy = ATA_LPM_MAX_POWER;
++ }
++
+ /* let ACPI work its magic */
+ rc = ata_acpi_on_devcfg(dev);
+ if (rc)
+@@ -4189,6 +4199,23 @@ static const struct ata_blacklist_entry
+ { "PIONEER DVD-RW DVR-212D", NULL, ATA_HORKAGE_NOSETXFER },
+ { "PIONEER DVD-RW DVR-216D", NULL, ATA_HORKAGE_NOSETXFER },
+
++ /*
++ * Some WD SATA-I drives spin up and down erratically when the link
++ * is put into the slumber mode. We don't have full list of the
++ * affected devices. Disable LPM if the device matches one of the
++ * known prefixes and is SATA-1. As a side effect LPM partial is
++ * lost too.
++ *
++ * https://bugzilla.kernel.org/show_bug.cgi?id=57211
++ */
++ { "WDC WD800JD-*", NULL, ATA_HORKAGE_WD_BROKEN_LPM },
++ { "WDC WD1200JD-*", NULL, ATA_HORKAGE_WD_BROKEN_LPM },
++ { "WDC WD1600JD-*", NULL, ATA_HORKAGE_WD_BROKEN_LPM },
++ { "WDC WD2000JD-*", NULL, ATA_HORKAGE_WD_BROKEN_LPM },
++ { "WDC WD2500JD-*", NULL, ATA_HORKAGE_WD_BROKEN_LPM },
++ { "WDC WD3000JD-*", NULL, ATA_HORKAGE_WD_BROKEN_LPM },
++ { "WDC WD3200JD-*", NULL, ATA_HORKAGE_WD_BROKEN_LPM },
++
+ /* End Marker */
+ { }
+ };
+--- a/drivers/ata/libata-scsi.c
++++ b/drivers/ata/libata-scsi.c
+@@ -112,12 +112,14 @@ static const char *ata_lpm_policy_names[
+ [ATA_LPM_MIN_POWER] = "min_power",
+ };
+
+-static ssize_t ata_scsi_lpm_store(struct device *dev,
++static ssize_t ata_scsi_lpm_store(struct device *device,
+ struct device_attribute *attr,
+ const char *buf, size_t count)
+ {
+- struct Scsi_Host *shost = class_to_shost(dev);
++ struct Scsi_Host *shost = class_to_shost(device);
+ struct ata_port *ap = ata_shost_to_port(shost);
++ struct ata_link *link;
++ struct ata_device *dev;
+ enum ata_lpm_policy policy;
+ unsigned long flags;
+
+@@ -133,10 +135,20 @@ static ssize_t ata_scsi_lpm_store(struct
+ return -EINVAL;
+
+ spin_lock_irqsave(ap->lock, flags);
++
++ ata_for_each_link(link, ap, EDGE) {
++ ata_for_each_dev(dev, &ap->link, ENABLED) {
++ if (dev->horkage & ATA_HORKAGE_NOLPM) {
++ count = -EOPNOTSUPP;
++ goto out_unlock;
++ }
++ }
++ }
++
+ ap->target_lpm_policy = policy;
+ ata_port_schedule_eh(ap);
++out_unlock:
+ spin_unlock_irqrestore(ap->lock, flags);
+-
+ return count;
+ }
+
+--- a/include/linux/libata.h
++++ b/include/linux/libata.h
+@@ -400,6 +400,8 @@ enum {
+ ATA_HORKAGE_DUMP_ID = (1 << 16), /* dump IDENTIFY data */
+ ATA_HORKAGE_MAX_SEC_LBA48 = (1 << 17), /* Set max sects to 65535 */
+ ATA_HORKAGE_ATAPI_DMADIR = (1 << 18), /* device requires dmadir */
++ ATA_HORKAGE_NOLPM = (1 << 20), /* don't use LPM */
++ ATA_HORKAGE_WD_BROKEN_LPM = (1 << 21), /* some WDs have broken LPM */
+
+ /* DMA mask for user DMA control: User visible values; DO NOT
+ renumber */
--- /dev/null
+From 74142ffc0b52cfe6f9d2f6f34a5f3eedbfe3ce51 Mon Sep 17 00:00:00 2001
+From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
+Date: Fri, 20 Dec 2013 10:35:07 +0100
+Subject: mfd: max77686: Fix regmap resource leak on driver remove
+
+From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
+
+commit 74142ffc0b52cfe6f9d2f6f34a5f3eedbfe3ce51 upstream.
+
+The regmap used by max77686 MFD driver was not freed with regmap_exit()
+on driver exit. This lead to leak of resources.
+
+Replace regmap_init_i2c() call in driver probe with initialization of
+managed register map so the regmap will be properly freed by the device
+management code.
+
+Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
+Signed-off-by: Lee Jones <lee.jones@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mfd/max77686.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/mfd/max77686.c
++++ b/drivers/mfd/max77686.c
+@@ -102,7 +102,7 @@ static int max77686_i2c_probe(struct i2c
+ max77686->irq_gpio = pdata->irq_gpio;
+ max77686->irq = i2c->irq;
+
+- max77686->regmap = regmap_init_i2c(i2c, &max77686_regmap_config);
++ max77686->regmap = devm_regmap_init_i2c(i2c, &max77686_regmap_config);
+ if (IS_ERR(max77686->regmap)) {
+ ret = PTR_ERR(max77686->regmap);
+ dev_err(max77686->dev, "Failed to allocate register map: %d\n",
--- /dev/null
+From d6a484520c5572a4170fa915109ccfc0c38f5008 Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Wed, 27 Nov 2013 17:43:43 +0100
+Subject: parport: parport_pc: remove double PCI ID for NetMos
+
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+
+commit d6a484520c5572a4170fa915109ccfc0c38f5008 upstream.
+
+In commit 85747f ("PATCH] parport: add NetMOS 9805 support") Max added
+the PCI ID for NetMOS 9805 based on a Debian bug report from 2k4 which
+was at the v2.4.26 time frame. The patch made into 2.6.14.
+Shortly before that patch akpm merged commit 296d3c783b ("[PATCH] Support
+NetMOS based PCI cards providing serial and parallel ports") which made
+into v2.6.9-rc1.
+Now we have two different entries for the same PCI id.
+I have here the NetMos 9805 which claims to support SPP/EPP/ECP mode.
+This patch takes Max's entry for titan_1284p1 (base != -1 specifies the
+ioport for ECP mode) and replaces akpm's entry for netmos_9805 which
+specified -1 (=none). Both share the same PCI-ID (my card has subsystem
+0x1000 / 0x0020 so it should match PCI_ANY).
+
+While here I also drop the entry for titan_1284p2 which is the same as
+netmos_9815.
+
+Cc: Maximilian Attems <maks@stro.at>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/parport/parport_pc.c | 10 ++--------
+ 1 file changed, 2 insertions(+), 8 deletions(-)
+
+--- a/drivers/parport/parport_pc.c
++++ b/drivers/parport/parport_pc.c
+@@ -2596,8 +2596,6 @@ enum parport_pc_pci_cards {
+ syba_2p_epp,
+ syba_1p_ecp,
+ titan_010l,
+- titan_1284p1,
+- titan_1284p2,
+ avlab_1p,
+ avlab_2p,
+ oxsemi_952,
+@@ -2656,8 +2654,6 @@ static struct parport_pc_pci {
+ /* syba_2p_epp AP138B */ { 2, { { 0, 0x078 }, { 0, 0x178 }, } },
+ /* syba_1p_ecp W83787 */ { 1, { { 0, 0x078 }, } },
+ /* titan_010l */ { 1, { { 3, -1 }, } },
+- /* titan_1284p1 */ { 1, { { 0, 1 }, } },
+- /* titan_1284p2 */ { 2, { { 0, 1 }, { 2, 3 }, } },
+ /* avlab_1p */ { 1, { { 0, 1}, } },
+ /* avlab_2p */ { 2, { { 0, 1}, { 2, 3 },} },
+ /* The Oxford Semi cards are unusual: 954 doesn't support ECP,
+@@ -2673,8 +2669,8 @@ static struct parport_pc_pci {
+ /* netmos_9705 */ { 1, { { 0, -1 }, } },
+ /* netmos_9715 */ { 2, { { 0, 1 }, { 2, 3 },} },
+ /* netmos_9755 */ { 2, { { 0, 1 }, { 2, 3 },} },
+- /* netmos_9805 */ { 1, { { 0, -1 }, } },
+- /* netmos_9815 */ { 2, { { 0, -1 }, { 2, -1 }, } },
++ /* netmos_9805 */ { 1, { { 0, 1 }, } },
++ /* netmos_9815 */ { 2, { { 0, 1 }, { 2, 3 }, } },
+ /* netmos_9901 */ { 1, { { 0, -1 }, } },
+ /* netmos_9865 */ { 1, { { 0, -1 }, } },
+ /* quatech_sppxp100 */ { 1, { { 0, 1 }, } },
+@@ -2718,8 +2714,6 @@ static const struct pci_device_id parpor
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, syba_1p_ecp },
+ { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_010L,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, titan_010l },
+- { 0x9710, 0x9805, 0x1000, 0x0010, 0, 0, titan_1284p1 },
+- { 0x9710, 0x9815, 0x1000, 0x0020, 0, 0, titan_1284p2 },
+ /* PCI_VENDOR_ID_AVLAB/Intek21 has another bunch of cards ...*/
+ /* AFAVLAB_TK9902 */
+ { 0x14db, 0x2120, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1p},
--- /dev/null
+From ad85ace07a05062ef6b59c35a5e80b6eaee1eee6 Mon Sep 17 00:00:00 2001
+From: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
+Date: Fri, 20 Dec 2013 13:41:47 -0500
+Subject: perf kvm: Fix kvm report without guestmount.
+
+From: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
+
+commit ad85ace07a05062ef6b59c35a5e80b6eaee1eee6 upstream.
+
+Currently, if we use perf kvm --guestkallsyms --guestmodules report, we
+can not get the perf information from perf data file. All sample are
+shown as unknown.
+
+Reproducing steps:
+ # perf kvm --guestkallsyms /tmp/kallsyms --guestmodules /tmp/modules record -a sleep 1
+ [ perf record: Woken up 1 times to write data ]
+ [ perf record: Captured and wrote 0.624 MB perf.data.guest (~27260 samples) ]
+ # perf kvm --guestkallsyms /tmp/kallsyms --guestmodules /tmp/modules report |grep %
+ 100.00% [guest/6471] [unknown] [g] 0xffffffff8164f330
+
+This bug was introduced by 207b57926 (perf kvm: Fix regression with guest machine creation).
+In original code, it uses perf_session__find_machine(), it means we deliver symbol to machine
+which has the same pid, if no machine found, deliver it to *default* guest. But if we use
+perf_session__findnew_machine() here, if no machine was found, new machine with pid will be built
+and added. Then the default guest which with pid == 0 will never get a symbol.
+
+And because the new machine initialized here has no kernel map created, the symbol delivered to
+it will be marked as "unknown".
+
+This patch here is to revert commit 207b57926 and fix the SEGFAULT bug in another way.
+
+Verification steps:
+ # ./perf kvm --guestkallsyms /home/kallsyms --guestmodules /home/modules record -a sleep 1
+ [ perf record: Woken up 1 times to write data ]
+ [ perf record: Captured and wrote 0.651 MB perf.data.guest (~28437 samples) ]
+ # ./perf kvm --guestkallsyms /home/kallsyms --guestmodules /home/modules report |grep %
+ 22.64% :6471 [guest.kernel.kallsyms] [g] update_rq_clock.part.70
+ 19.99% :6471 [guest.kernel.kallsyms] [g] d_free
+ 18.46% :6471 [guest.kernel.kallsyms] [g] bio_phys_segments
+ 16.25% :6471 [guest.kernel.kallsyms] [g] dequeue_task
+ 12.78% :6471 [guest.kernel.kallsyms] [g] __switch_to
+ 7.91% :6471 [guest.kernel.kallsyms] [g] scheduler_tick
+ 1.75% :6471 [guest.kernel.kallsyms] [g] native_apic_mem_write
+ 0.21% :6471 [guest.kernel.kallsyms] [g] apic_timer_interrupt
+
+Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
+Acked-by: David Ahern <dsahern@gmail.com>
+Cc: David Ahern <dsahern@gmail.com>
+Link: http://lkml.kernel.org/r/1387564907-3045-1-git-send-email-yangds.fnst@cn.fujitsu.com
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/perf/util/session.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- a/tools/perf/util/session.c
++++ b/tools/perf/util/session.c
+@@ -811,6 +811,7 @@ static struct machine *
+ union perf_event *event)
+ {
+ const u8 cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK;
++ struct machine *machine;
+
+ if (perf_guest &&
+ ((cpumode == PERF_RECORD_MISC_GUEST_KERNEL) ||
+@@ -822,7 +823,11 @@ static struct machine *
+ else
+ pid = event->ip.pid;
+
+- return perf_session__findnew_machine(session, pid);
++ machine = perf_session__find_machine(session, pid);
++ if (!machine)
++ machine = perf_session__findnew_machine(session,
++ DEFAULT_GUEST_KERNEL_ID);
++ return machine;
+ }
+
+ return &session->machines.host;
--- /dev/null
+From fa8cf57c923e86a693a85aff1df579245a27cbb3 Mon Sep 17 00:00:00 2001
+From: Chen-Yu Tsai <wens@csie.org>
+Date: Thu, 16 Jan 2014 14:34:23 +0800
+Subject: pinctrl: sunxi: Honor GPIO output initial vaules
+
+From: Chen-Yu Tsai <wens@csie.org>
+
+commit fa8cf57c923e86a693a85aff1df579245a27cbb3 upstream.
+
+Some GPIO users, such as fixed-regulator, request GPIO output with
+initial value of 1. This was ignored by sunxi driver.
+
+Signed-off-by: Chen-Yu Tsai <wens@csie.org>
+Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/pinctrl/pinctrl-sunxi.c | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+--- a/drivers/pinctrl/pinctrl-sunxi.c
++++ b/drivers/pinctrl/pinctrl-sunxi.c
+@@ -1754,12 +1754,6 @@ static int sunxi_pinctrl_gpio_get(struct
+ return val;
+ }
+
+-static int sunxi_pinctrl_gpio_direction_output(struct gpio_chip *chip,
+- unsigned offset, int value)
+-{
+- return pinctrl_gpio_direction_output(chip->base + offset);
+-}
+-
+ static void sunxi_pinctrl_gpio_set(struct gpio_chip *chip,
+ unsigned offset, int value)
+ {
+@@ -1770,6 +1764,13 @@ static void sunxi_pinctrl_gpio_set(struc
+ writel((value & DATA_PINS_MASK) << index, pctl->membase + reg);
+ }
+
++static int sunxi_pinctrl_gpio_direction_output(struct gpio_chip *chip,
++ unsigned offset, int value)
++{
++ sunxi_pinctrl_gpio_set(chip, offset, value);
++ return pinctrl_gpio_direction_output(chip->base + offset);
++}
++
+ static int sunxi_pinctrl_gpio_of_xlate(struct gpio_chip *gc,
+ const struct of_phandle_args *gpiospec,
+ u32 *flags)
--- /dev/null
+From d5a1c7e3fc38d9c7d629e1e47f32f863acbdec3d Mon Sep 17 00:00:00 2001
+From: Borislav Petkov <bp@alien8.de>
+Date: Sat, 20 Jul 2013 19:00:23 +0200
+Subject: rtc-cmos: Add an alarm disable quirk
+
+From: Borislav Petkov <bp@alien8.de>
+
+commit d5a1c7e3fc38d9c7d629e1e47f32f863acbdec3d upstream.
+
+41c7f7424259f ("rtc: Disable the alarm in the hardware (v2)") added the
+functionality to disable the RTC wake alarm when shutting down the box.
+
+However, there are at least two b0rked BIOSes we know about:
+
+https://bugzilla.novell.com/show_bug.cgi?id=812592
+https://bugzilla.novell.com/show_bug.cgi?id=805740
+
+where, when wakeup alarm is enabled in the BIOS, the machine reboots
+automatically right after shutdown, regardless of what wakeup time is
+programmed.
+
+Bisecting the issue lead to this patch so disable its functionality with
+a DMI quirk only for those boxes.
+
+Cc: Brecht Machiels <brecht@mos6581.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: John Stultz <john.stultz@linaro.org>
+Cc: Rabin Vincent <rabin.vincent@stericsson.com>
+Signed-off-by: Borislav Petkov <bp@suse.de>
+[jstultz: Changed variable name for clarity, added extra dmi entry]
+Tested-by: Brecht Machiels <brecht@mos6581.org>
+Tested-by: Borislav Petkov <bp@suse.de>
+Signed-off-by: John Stultz <john.stultz@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/rtc/rtc-cmos.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 51 insertions(+), 1 deletion(-)
+
+--- a/drivers/rtc/rtc-cmos.c
++++ b/drivers/rtc/rtc-cmos.c
+@@ -34,11 +34,11 @@
+ #include <linux/interrupt.h>
+ #include <linux/spinlock.h>
+ #include <linux/platform_device.h>
+-#include <linux/mod_devicetable.h>
+ #include <linux/log2.h>
+ #include <linux/pm.h>
+ #include <linux/of.h>
+ #include <linux/of_platform.h>
++#include <linux/dmi.h>
+
+ /* this is for "generic access to PC-style RTC" using CMOS_READ/CMOS_WRITE */
+ #include <asm-generic/rtc.h>
+@@ -377,6 +377,51 @@ static int cmos_set_alarm(struct device
+ return 0;
+ }
+
++/*
++ * Do not disable RTC alarm on shutdown - workaround for b0rked BIOSes.
++ */
++static bool alarm_disable_quirk;
++
++static int __init set_alarm_disable_quirk(const struct dmi_system_id *id)
++{
++ alarm_disable_quirk = true;
++ pr_info("rtc-cmos: BIOS has alarm-disable quirk. ");
++ pr_info("RTC alarms disabled\n");
++ return 0;
++}
++
++static const struct dmi_system_id rtc_quirks[] __initconst = {
++ /* https://bugzilla.novell.com/show_bug.cgi?id=805740 */
++ {
++ .callback = set_alarm_disable_quirk,
++ .ident = "IBM Truman",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "4852570"),
++ },
++ },
++ /* https://bugzilla.novell.com/show_bug.cgi?id=812592 */
++ {
++ .callback = set_alarm_disable_quirk,
++ .ident = "Gigabyte GA-990XA-UD3",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR,
++ "Gigabyte Technology Co., Ltd."),
++ DMI_MATCH(DMI_PRODUCT_NAME, "GA-990XA-UD3"),
++ },
++ },
++ /* http://permalink.gmane.org/gmane.linux.kernel/1604474 */
++ {
++ .callback = set_alarm_disable_quirk,
++ .ident = "Toshiba Satellite L300",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L300"),
++ },
++ },
++ {}
++};
++
+ static int cmos_alarm_irq_enable(struct device *dev, unsigned int enabled)
+ {
+ struct cmos_rtc *cmos = dev_get_drvdata(dev);
+@@ -385,6 +430,9 @@ static int cmos_alarm_irq_enable(struct
+ if (!is_valid_irq(cmos->irq))
+ return -EINVAL;
+
++ if (alarm_disable_quirk)
++ return 0;
++
+ spin_lock_irqsave(&rtc_lock, flags);
+
+ if (enabled)
+@@ -1163,6 +1211,8 @@ static int __init cmos_init(void)
+ platform_driver_registered = true;
+ }
+
++ dmi_check_system(rtc_quirks);
++
+ if (retval == 0)
+ return 0;
+
--- /dev/null
+From 75ea799df4cb07e505c91b4abaa87bc28aad3e66 Mon Sep 17 00:00:00 2001
+From: Stephen Warren <swarren@nvidia.com>
+Date: Thu, 23 Jan 2014 15:55:19 -0800
+Subject: rtc: max8907: weekday encoding fixes
+
+From: Stephen Warren <swarren@nvidia.com>
+
+commit 75ea799df4cb07e505c91b4abaa87bc28aad3e66 upstream.
+
+The current MAX8907 driver has two issues related to weekday value
+handling:
+
+1)
+
+The HW WEEKDAY register has range 0..6 rather than 1..7 as documented.
+Note that I validated the actual HW range by observing the HW register
+roll from 6->0 rather than 6->7->1 as would otherwise be expected.
+
+This matches Linux's tm_wday range of 0..6.
+
+When the CMOS RAM content is lost, the date returned from the device is
+2007-01-01 00:00:00, which is a Monday. The WEEKDAY register reads 1 in
+this case. This matches the numbering in Linux's tm_wday field.
+
+Hence we should write Linux's tm_wday value to the register without
+modifying it. Hence, remove the +1/-1 calculations for WEEKDAY/tm_wday.
+
+2)
+
+There's no need to make alarms match on the WEEKDAY register, since the
+other fields together uniquely define the alarm date/time. Ignoring the
+WEEKDAY value in the match isolates the driver from any incorrect value in
+the current time copy of the WEEKDAY register.
+
+Each change individually, or both together, solves an issue that I
+observed; "hwclock -r" would time out waiting for its alarm to fire if the
+CMOS RAM content had been lost, and hence the WEEKDAY register value
+mismatched what the driver expected it to be. "hwclock -w" would solve
+this by over-writing the HW default WEEKDAY register value with what the
+driver expected.
+
+Signed-off-by: Stephen Warren <swarren@nvidia.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/rtc/rtc-max8907.c | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+--- a/drivers/rtc/rtc-max8907.c
++++ b/drivers/rtc/rtc-max8907.c
+@@ -51,7 +51,7 @@ static irqreturn_t max8907_irq_handler(i
+ {
+ struct max8907_rtc *rtc = data;
+
+- regmap_update_bits(rtc->regmap, MAX8907_REG_ALARM0_CNTL, 0x7f, 0);
++ regmap_write(rtc->regmap, MAX8907_REG_ALARM0_CNTL, 0);
+
+ rtc_update_irq(rtc->rtc_dev, 1, RTC_IRQF | RTC_AF);
+
+@@ -64,7 +64,7 @@ static void regs_to_tm(u8 *regs, struct
+ bcd2bin(regs[RTC_YEAR1]) - 1900;
+ tm->tm_mon = bcd2bin(regs[RTC_MONTH] & 0x1f) - 1;
+ tm->tm_mday = bcd2bin(regs[RTC_DATE] & 0x3f);
+- tm->tm_wday = (regs[RTC_WEEKDAY] & 0x07) - 1;
++ tm->tm_wday = (regs[RTC_WEEKDAY] & 0x07);
+ if (regs[RTC_HOUR] & HOUR_12) {
+ tm->tm_hour = bcd2bin(regs[RTC_HOUR] & 0x01f);
+ if (tm->tm_hour == 12)
+@@ -88,7 +88,7 @@ static void tm_to_regs(struct rtc_time *
+ regs[RTC_YEAR1] = bin2bcd(low);
+ regs[RTC_MONTH] = bin2bcd(tm->tm_mon + 1);
+ regs[RTC_DATE] = bin2bcd(tm->tm_mday);
+- regs[RTC_WEEKDAY] = tm->tm_wday + 1;
++ regs[RTC_WEEKDAY] = tm->tm_wday;
+ regs[RTC_HOUR] = bin2bcd(tm->tm_hour);
+ regs[RTC_MIN] = bin2bcd(tm->tm_min);
+ regs[RTC_SEC] = bin2bcd(tm->tm_sec);
+@@ -153,7 +153,7 @@ static int max8907_rtc_set_alarm(struct
+ tm_to_regs(&alrm->time, regs);
+
+ /* Disable alarm while we update the target time */
+- ret = regmap_update_bits(rtc->regmap, MAX8907_REG_ALARM0_CNTL, 0x7f, 0);
++ ret = regmap_write(rtc->regmap, MAX8907_REG_ALARM0_CNTL, 0);
+ if (ret < 0)
+ return ret;
+
+@@ -163,8 +163,7 @@ static int max8907_rtc_set_alarm(struct
+ return ret;
+
+ if (alrm->enabled)
+- ret = regmap_update_bits(rtc->regmap, MAX8907_REG_ALARM0_CNTL,
+- 0x7f, 0x7f);
++ ret = regmap_write(rtc->regmap, MAX8907_REG_ALARM0_CNTL, 0x77);
+
+ return ret;
+ }
serial-8250-enable-uart_bug_nomsr-for-tegra.patch
kvm-s390-fix-diagnose-code-extraction.patch
s390-uapi-fix-struct-statfs64-definition.patch
+parport-parport_pc-remove-double-pci-id-for-netmos.patch
+rtc-cmos-add-an-alarm-disable-quirk.patch
+rtc-max8907-weekday-encoding-fixes.patch
+pinctrl-sunxi-honor-gpio-output-initial-vaules.patch
+perf-kvm-fix-kvm-report-without-guestmount.patch
+mfd-max77686-fix-regmap-resource-leak-on-driver-remove.patch
+asoc-adau1701-fix-adau1701_seroctl_word_len_16-constant.patch
+asoc-wm5110-extend-sysclk-patch-file-for-rev-d.patch
+alsa-rme9652-fix-a-missing-comma-in-channel_map_9636_ds.patch
+alsa-hda-don-t-create-duplicated-ctls-for-loopback-paths.patch
+alsa-enable-config_zone_dma-for-smaller-pci-dma-masks.patch
+alsa-hda-fix-silent-output-on-macbook-air-1-1.patch
+tpm-tpm_i2c_stm_st33-check-return-code-of-get_burstcount.patch
+tpm-tpm_ppi-do-not-compare-strcmp-a-b-1.patch
+ata-sata_mv-introduce-compatible-string-marvell-armada-370-sata.patch
+ata-sata_mv-fix-disk-hotplug-for-armada-370-xp-socs.patch
+libata-disable-lpm-for-some-wd-sata-i-devices.patch
+ext4-avoid-clearing-beyond-i_blocks-when-truncating-an-inline-data-file.patch
+vfs-is-mounted-should-be-testing-mnt_ns-for-null-or-error.patch
+bcache-data-corruption-fix.patch
+hp_accel-add-a-new-pnp-id-hpq6007-for-new-hp-laptops.patch
+arm-mvebu-add-support-to-get-the-id-and-the-revision-of-a-soc.patch
--- /dev/null
+From 85c5e0d451125c6ddb78663972e40af810b83644 Mon Sep 17 00:00:00 2001
+From: Peter Huewe <PeterHuewe@gmx.de>
+Date: Wed, 30 Oct 2013 00:54:20 +0100
+Subject: tpm/tpm_i2c_stm_st33: Check return code of get_burstcount
+
+From: Peter Huewe <PeterHuewe@gmx.de>
+
+commit 85c5e0d451125c6ddb78663972e40af810b83644 upstream.
+
+The 'get_burstcount' function can in some circumstances 'return -EBUSY' which
+in tpm_stm_i2c_send is stored in an 'u32 burstcnt'
+thus converting the signed value into an unsigned value, resulting
+in 'burstcnt' being huge.
+Changing the type to u32 only does not solve the problem as the signed
+value is converted to an unsigned in I2C_WRITE_DATA, resulting in the
+same effect.
+
+Thus
+-> Change type of burstcnt to u32 (the return type of get_burstcount)
+-> Add a check for the return value of 'get_burstcount' and propagate a
+potential error.
+
+This makes also sense in the 'I2C_READ_DATA' case, where the there is no
+signed/unsigned conversion.
+
+found by coverity
+Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/char/tpm/tpm_i2c_stm_st33.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- a/drivers/char/tpm/tpm_i2c_stm_st33.c
++++ b/drivers/char/tpm/tpm_i2c_stm_st33.c
+@@ -410,6 +410,8 @@ static int recv_data(struct tpm_chip *ch
+ &chip->vendor.read_queue)
+ == 0) {
+ burstcnt = get_burstcount(chip);
++ if (burstcnt < 0)
++ return burstcnt;
+ len = min_t(int, burstcnt, count - size);
+ I2C_READ_DATA(client, TPM_DATA_FIFO, buf + size, len);
+ size += len;
+@@ -451,7 +453,8 @@ static irqreturn_t tpm_ioserirq_handler(
+ static int tpm_stm_i2c_send(struct tpm_chip *chip, unsigned char *buf,
+ size_t len)
+ {
+- u32 status, burstcnt = 0, i, size;
++ u32 status, i, size;
++ int burstcnt = 0;
+ int ret;
+ u8 data;
+ struct i2c_client *client;
+@@ -482,6 +485,8 @@ static int tpm_stm_i2c_send(struct tpm_c
+
+ for (i = 0; i < len - 1;) {
+ burstcnt = get_burstcount(chip);
++ if (burstcnt < 0)
++ return burstcnt;
+ size = min_t(int, len - i - 1, burstcnt);
+ ret = I2C_WRITE_DATA(client, TPM_DATA_FIFO, buf, size);
+ if (ret < 0)
--- /dev/null
+From 747d35bd9bb4ae6bd74b19baa5bbe32f3e0cee11 Mon Sep 17 00:00:00 2001
+From: Peter Huewe <PeterHuewe@gmx.de>
+Date: Wed, 30 Oct 2013 20:46:55 +0100
+Subject: tpm/tpm_ppi: Do not compare strcmp(a,b) == -1
+
+From: Peter Huewe <PeterHuewe@gmx.de>
+
+commit 747d35bd9bb4ae6bd74b19baa5bbe32f3e0cee11 upstream.
+
+Depending on the implementation strcmp might return the difference between
+two strings not only -1,0,1 consequently
+ if (strcmp (a,b) == -1)
+might lead to taking the wrong branch
+
+-> compare with < 0 instead,
+which in any case is more canonical.
+
+Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/char/tpm/tpm_ppi.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/char/tpm/tpm_ppi.c
++++ b/drivers/char/tpm/tpm_ppi.c
+@@ -172,7 +172,7 @@ static ssize_t tpm_store_ppi_request(str
+ * is updated with function index from SUBREQ to SUBREQ2 since PPI
+ * version 1.1
+ */
+- if (strcmp(version, "1.1") == -1)
++ if (strcmp(version, "1.1") < 0)
+ params[2].integer.value = TPM_PPI_FN_SUBREQ;
+ else
+ params[2].integer.value = TPM_PPI_FN_SUBREQ2;
+@@ -182,7 +182,7 @@ static ssize_t tpm_store_ppi_request(str
+ * string/package type. For PPI version 1.0 and 1.1, use buffer type
+ * for compatibility, and use package type since 1.2 according to spec.
+ */
+- if (strcmp(version, "1.2") == -1) {
++ if (strcmp(version, "1.2") < 0) {
+ params[3].type = ACPI_TYPE_BUFFER;
+ params[3].buffer.length = sizeof(req);
+ sscanf(buf, "%d", &req);
+@@ -248,7 +248,7 @@ static ssize_t tpm_show_ppi_transition_a
+ * (e.g. Capella with PPI 1.0) need integer/string/buffer type, so for
+ * compatibility, define params[3].type as buffer, if PPI version < 1.2
+ */
+- if (strcmp(version, "1.2") == -1) {
++ if (strcmp(version, "1.2") < 0) {
+ params[3].type = ACPI_TYPE_BUFFER;
+ params[3].buffer.length = 0;
+ params[3].buffer.pointer = NULL;
+@@ -390,7 +390,7 @@ static ssize_t show_ppi_operations(char
+ kfree(output.pointer);
+ output.length = ACPI_ALLOCATE_BUFFER;
+ output.pointer = NULL;
+- if (strcmp(version, "1.2") == -1)
++ if (strcmp(version, "1.2") < 0)
+ return -EPERM;
+
+ params[2].integer.value = TPM_PPI_FN_GETOPR;
--- /dev/null
+From 260a459d2e39761fbd39803497205ce1690bc7b1 Mon Sep 17 00:00:00 2001
+From: "Eric W. Biederman" <ebiederm@xmission.com>
+Date: Mon, 20 Jan 2014 15:26:15 -0800
+Subject: vfs: Is mounted should be testing mnt_ns for NULL or error.
+
+From: "Eric W. Biederman" <ebiederm@xmission.com>
+
+commit 260a459d2e39761fbd39803497205ce1690bc7b1 upstream.
+
+A bug was introduced with the is_mounted helper function in
+commit f7a99c5b7c8bd3d3f533c8b38274e33f3da9096e
+Author: Al Viro <viro@zeniv.linux.org.uk>
+Date: Sat Jun 9 00:59:08 2012 -0400
+
+ get rid of ->mnt_longterm
+
+ it's enough to set ->mnt_ns of internal vfsmounts to something
+ distinct from all struct mnt_namespace out there; then we can
+ just use the check for ->mnt_ns != NULL in the fast path of
+ mntput_no_expire()
+
+ Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
+
+The intent was to test if the real_mount(vfsmount)->mnt_ns was
+NULL_OR_ERR but the code is actually testing real_mount(vfsmount)
+and always returning true.
+
+The result is d_absolute_path returning paths it should be hiding.
+
+Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
+Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/mount.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/mount.h
++++ b/fs/mount.h
+@@ -73,7 +73,7 @@ static inline int mnt_has_parent(struct
+ static inline int is_mounted(struct vfsmount *mnt)
+ {
+ /* neither detached nor internal? */
+- return !IS_ERR_OR_NULL(real_mount(mnt));
++ return !IS_ERR_OR_NULL(real_mount(mnt)->mnt_ns);
+ }
+
+ extern struct mount *__lookup_mnt(struct vfsmount *, struct dentry *, int);