From: Greg Kroah-Hartman Date: Mon, 27 Oct 2014 08:54:51 +0000 (+0800) Subject: 3.14-stable patches X-Git-Tag: v3.10.59~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=07414f2802580958fa23a439de5657b0ce4b1f5e;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: alsa-alc283-codec-avoid-pop-noise-on-headphones-during-suspend-resume.patch alsa-emu10k1-fix-deadlock-in-synth-voice-lookup.patch alsa-hda-hdmi-fix-missing-eld-change-event-on-plug-unplug.patch alsa-pcm-use-the-same-dma-mmap-codepath-both-for-arm-and-arm64.patch alsa-usb-audio-add-support-for-steinberg-ur22-usb-interface.patch arm-at91-dt-fix-typo-regarding-can0_clk.patch arm-at91-fix-at91sam9263ek-dt-mmc-pinmuxing-settings.patch arm-at91-pmc-don-t-forget-to-write-pmc_pcdr-register-to-disable-clocks.patch arm-mvebu-netgear-rn102-use-hardware-bch-ecc.patch arm-mvebu-netgear-rn104-use-hardware-bch-ecc.patch arm-mvebu-netgear-rn2120-use-hardware-bch-ecc.patch arm64-compat-fix-compat-types-affecting-struct.patch ecryptfs-avoid-to-access-null-pointer-when-write-metadata-in-xattr.patch xfs-ensure-wb_sync_all-writeback-handles-partial-pages-correctly.patch --- diff --git a/queue-3.14/alsa-alc283-codec-avoid-pop-noise-on-headphones-during-suspend-resume.patch b/queue-3.14/alsa-alc283-codec-avoid-pop-noise-on-headphones-during-suspend-resume.patch new file mode 100644 index 00000000000..9ca7ba00106 --- /dev/null +++ b/queue-3.14/alsa-alc283-codec-avoid-pop-noise-on-headphones-during-suspend-resume.patch @@ -0,0 +1,32 @@ +From b450b17c156e264bc44a198046d3ebaaef5a041d Mon Sep 17 00:00:00 2001 +From: Harsha Priya +Date: Thu, 9 Oct 2014 11:04:56 +0000 +Subject: ALSA: ALC283 codec - Avoid pop noise on headphones during suspend/resume + +From: Harsha Priya + +commit b450b17c156e264bc44a198046d3ebaaef5a041d upstream. + +This patch sets the headphones mode to default before suspending +which helps avoid the pop noise on headphones + +Signed-off-by: Harsha Priya +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -2926,6 +2926,9 @@ static void alc283_shutup(struct hda_cod + + alc_write_coef_idx(codec, 0x43, 0x9004); + ++ /*depop hp during suspend*/ ++ alc_write_coef_idx(codec, 0x06, 0x2100); ++ + snd_hda_codec_write(codec, hp_pin, 0, + AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); + diff --git a/queue-3.14/alsa-emu10k1-fix-deadlock-in-synth-voice-lookup.patch b/queue-3.14/alsa-emu10k1-fix-deadlock-in-synth-voice-lookup.patch new file mode 100644 index 00000000000..5c91701b25a --- /dev/null +++ b/queue-3.14/alsa-emu10k1-fix-deadlock-in-synth-voice-lookup.patch @@ -0,0 +1,63 @@ +From 95926035b187cc9fee6fb61385b7da9c28123f74 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 13 Oct 2014 23:18:02 +0200 +Subject: ALSA: emu10k1: Fix deadlock in synth voice lookup + +From: Takashi Iwai + +commit 95926035b187cc9fee6fb61385b7da9c28123f74 upstream. + +The emu10k1 voice allocator takes voice_lock spinlock. When there is +no empty stream available, it tries to release a voice used by synth, +and calls get_synth_voice. The callback function, +snd_emu10k1_synth_get_voice(), however, also takes the voice_lock, +thus it deadlocks. + +The fix is simply removing the voice_lock holds in +snd_emu10k1_synth_get_voice(), as this is always called in the +spinlock context. + +Reported-and-tested-by: Arthur Marsh +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/emu10k1/emu10k1_callback.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +--- a/sound/pci/emu10k1/emu10k1_callback.c ++++ b/sound/pci/emu10k1/emu10k1_callback.c +@@ -85,6 +85,8 @@ snd_emu10k1_ops_setup(struct snd_emux *e + * get more voice for pcm + * + * terminate most inactive voice and give it as a pcm voice. ++ * ++ * voice_lock is already held. + */ + int + snd_emu10k1_synth_get_voice(struct snd_emu10k1 *hw) +@@ -92,12 +94,10 @@ snd_emu10k1_synth_get_voice(struct snd_e + struct snd_emux *emu; + struct snd_emux_voice *vp; + struct best_voice best[V_END]; +- unsigned long flags; + int i; + + emu = hw->synth; + +- spin_lock_irqsave(&emu->voice_lock, flags); + lookup_voices(emu, hw, best, 1); /* no OFF voices */ + for (i = 0; i < V_END; i++) { + if (best[i].voice >= 0) { +@@ -113,11 +113,9 @@ snd_emu10k1_synth_get_voice(struct snd_e + vp->emu->num_voices--; + vp->ch = -1; + vp->state = SNDRV_EMUX_ST_OFF; +- spin_unlock_irqrestore(&emu->voice_lock, flags); + return ch; + } + } +- spin_unlock_irqrestore(&emu->voice_lock, flags); + + /* not found */ + return -ENOMEM; diff --git a/queue-3.14/alsa-hda-hdmi-fix-missing-eld-change-event-on-plug-unplug.patch b/queue-3.14/alsa-hda-hdmi-fix-missing-eld-change-event-on-plug-unplug.patch new file mode 100644 index 00000000000..cbef1baef1b --- /dev/null +++ b/queue-3.14/alsa-hda-hdmi-fix-missing-eld-change-event-on-plug-unplug.patch @@ -0,0 +1,62 @@ +From 6acce400d9daf1353fbf497302670c90a3205e1d Mon Sep 17 00:00:00 2001 +From: Anssi Hannula +Date: Sun, 19 Oct 2014 19:25:19 +0300 +Subject: ALSA: hda - hdmi: Fix missing ELD change event on plug/unplug + +From: Anssi Hannula + +commit 6acce400d9daf1353fbf497302670c90a3205e1d upstream. + +The ELD ALSA control change event is sent by hdmi_present_sense() when +eld_changed is true. + +Currently, it is only true when the ELD buffer contents have been +modified. However, the user-visible ELD controls also change to a +zero-length value and back when eld_valid is unset/set, and no event is +currently sent in such cases (such as when unplugging or replugging a +sink). + +Fix the code to always set eld_changed if eld_valid value is changed, +and therefore to always send the change event when the user-visible +value changes. + +Signed-off-by: Anssi Hannula +Cc: David Henningsson +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_hdmi.c | 15 +++++++++------ + 1 file changed, 9 insertions(+), 6 deletions(-) + +--- a/sound/pci/hda/patch_hdmi.c ++++ b/sound/pci/hda/patch_hdmi.c +@@ -1557,19 +1557,22 @@ static bool hdmi_present_sense(struct hd + } + } + +- if (pin_eld->eld_valid && !eld->eld_valid) { +- update_eld = true; ++ if (pin_eld->eld_valid != eld->eld_valid) + eld_changed = true; +- } ++ ++ if (pin_eld->eld_valid && !eld->eld_valid) ++ update_eld = true; ++ + if (update_eld) { + bool old_eld_valid = pin_eld->eld_valid; + pin_eld->eld_valid = eld->eld_valid; +- eld_changed = pin_eld->eld_size != eld->eld_size || ++ if (pin_eld->eld_size != eld->eld_size || + memcmp(pin_eld->eld_buffer, eld->eld_buffer, +- eld->eld_size) != 0; +- if (eld_changed) ++ eld->eld_size) != 0) { + memcpy(pin_eld->eld_buffer, eld->eld_buffer, + eld->eld_size); ++ eld_changed = true; ++ } + pin_eld->eld_size = eld->eld_size; + pin_eld->info = eld->info; + diff --git a/queue-3.14/alsa-pcm-use-the-same-dma-mmap-codepath-both-for-arm-and-arm64.patch b/queue-3.14/alsa-pcm-use-the-same-dma-mmap-codepath-both-for-arm-and-arm64.patch new file mode 100644 index 00000000000..c2273f8fc2a --- /dev/null +++ b/queue-3.14/alsa-pcm-use-the-same-dma-mmap-codepath-both-for-arm-and-arm64.patch @@ -0,0 +1,38 @@ +From a011e213f3700233ed2a676f1ef0a74a052d7162 Mon Sep 17 00:00:00 2001 +From: Anatol Pomozov +Date: Fri, 17 Oct 2014 12:43:34 -0700 +Subject: ALSA: pcm: use the same dma mmap codepath both for arm and arm64 + +From: Anatol Pomozov + +commit a011e213f3700233ed2a676f1ef0a74a052d7162 upstream. + +This avoids following kernel crash when try to playback on arm64 + +[ 107.497203] [] snd_pcm_mmap_data_fault+0x90/0xd4 +[ 107.503405] [] __do_fault+0xb0/0x498 +[ 107.508565] [] handle_mm_fault+0x224/0x7b0 +[ 107.514246] [] do_page_fault+0x11c/0x310 +[ 107.519738] [] do_mem_abort+0x38/0x98 + +Tested: backported to 3.14 and tried to playback on arm64 machine + +Signed-off-by: Anatol Pomozov +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/core/pcm_native.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/core/pcm_native.c ++++ b/sound/core/pcm_native.c +@@ -3189,7 +3189,7 @@ static const struct vm_operations_struct + + #ifndef ARCH_HAS_DMA_MMAP_COHERENT + /* This should be defined / handled globally! */ +-#ifdef CONFIG_ARM ++#if defined(CONFIG_ARM) || defined(CONFIG_ARM64) + #define ARCH_HAS_DMA_MMAP_COHERENT + #endif + #endif diff --git a/queue-3.14/alsa-usb-audio-add-support-for-steinberg-ur22-usb-interface.patch b/queue-3.14/alsa-usb-audio-add-support-for-steinberg-ur22-usb-interface.patch new file mode 100644 index 00000000000..fdfad5aaaa2 --- /dev/null +++ b/queue-3.14/alsa-usb-audio-add-support-for-steinberg-ur22-usb-interface.patch @@ -0,0 +1,70 @@ +From f0b127fbfdc8756eba7437ab668f3169280bd358 Mon Sep 17 00:00:00 2001 +From: Vlad Catoi +Date: Sat, 18 Oct 2014 17:45:41 -0500 +Subject: ALSA: usb-audio: Add support for Steinberg UR22 USB interface + +From: Vlad Catoi + +commit f0b127fbfdc8756eba7437ab668f3169280bd358 upstream. + +Adding support for Steinberg UR22 USB interface via quirks table patch + +See Ubuntu bug report: +https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1317244 +Also see threads: +http://linux-audio.4202.n7.nabble.com/Support-for-Steinberg-UR22-Yamaha-USB-chipset-0499-1509-tc82888.html#a82917 +http://www.steinberg.net/forums/viewtopic.php?t=62290 + +Tested by at least 4 people judging by the threads. +Did not test MIDI interface, but audio output and capture both are +functional. Built 3.17 kernel with this driver on Ubuntu 14.04 & tested with mpg123 +Patch applied to 3.13 Ubuntu kernel works well enough for daily use. + +Signed-off-by: Vlad Catoi +Acked-by: Clemens Ladisch +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/usb/quirks-table.h | 30 ++++++++++++++++++++++++++++++ + 1 file changed, 30 insertions(+) + +--- a/sound/usb/quirks-table.h ++++ b/sound/usb/quirks-table.h +@@ -385,6 +385,36 @@ YAMAHA_DEVICE(0x105d, NULL), + } + }, + { ++ USB_DEVICE(0x0499, 0x1509), ++ .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { ++ /* .vendor_name = "Yamaha", */ ++ /* .product_name = "Steinberg UR22", */ ++ .ifnum = QUIRK_ANY_INTERFACE, ++ .type = QUIRK_COMPOSITE, ++ .data = (const struct snd_usb_audio_quirk[]) { ++ { ++ .ifnum = 1, ++ .type = QUIRK_AUDIO_STANDARD_INTERFACE ++ }, ++ { ++ .ifnum = 2, ++ .type = QUIRK_AUDIO_STANDARD_INTERFACE ++ }, ++ { ++ .ifnum = 3, ++ .type = QUIRK_MIDI_YAMAHA ++ }, ++ { ++ .ifnum = 4, ++ .type = QUIRK_IGNORE_INTERFACE ++ }, ++ { ++ .ifnum = -1 ++ } ++ } ++ } ++}, ++{ + USB_DEVICE(0x0499, 0x150a), + .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { + /* .vendor_name = "Yamaha", */ diff --git a/queue-3.14/arm-at91-dt-fix-typo-regarding-can0_clk.patch b/queue-3.14/arm-at91-dt-fix-typo-regarding-can0_clk.patch new file mode 100644 index 00000000000..5dff2175219 --- /dev/null +++ b/queue-3.14/arm-at91-dt-fix-typo-regarding-can0_clk.patch @@ -0,0 +1,32 @@ +From 0a51d644c20f5c88fd3a659119d1903f74927082 Mon Sep 17 00:00:00 2001 +From: David Dueck +Date: Wed, 17 Sep 2014 10:33:32 +0200 +Subject: ARM: at91/dt: Fix typo regarding can0_clk + +From: David Dueck + +commit 0a51d644c20f5c88fd3a659119d1903f74927082 upstream. + +Otherwise the clock for can0 will never get enabled. + +Signed-off-by: David Dueck +Signed-off-by: Anthony Harivel +Acked-by: Boris Brezillon +Signed-off-by: Nicolas Ferre +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/sama5d3_can.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/sama5d3_can.dtsi ++++ b/arch/arm/boot/dts/sama5d3_can.dtsi +@@ -40,7 +40,7 @@ + atmel,clk-output-range = <0 66000000>; + }; + +- can1_clk: can0_clk { ++ can1_clk: can1_clk { + #clock-cells = <0>; + reg = <41>; + atmel,clk-output-range = <0 66000000>; diff --git a/queue-3.14/arm-at91-fix-at91sam9263ek-dt-mmc-pinmuxing-settings.patch b/queue-3.14/arm-at91-fix-at91sam9263ek-dt-mmc-pinmuxing-settings.patch new file mode 100644 index 00000000000..3da795251f4 --- /dev/null +++ b/queue-3.14/arm-at91-fix-at91sam9263ek-dt-mmc-pinmuxing-settings.patch @@ -0,0 +1,45 @@ +From b65e0fb3d046cc65d0a3c45d43de351fb363271b Mon Sep 17 00:00:00 2001 +From: Andreas Henriksson +Date: Tue, 23 Sep 2014 17:12:52 +0200 +Subject: ARM: at91: fix at91sam9263ek DT mmc pinmuxing settings + +From: Andreas Henriksson + +commit b65e0fb3d046cc65d0a3c45d43de351fb363271b upstream. + +As discovered on a custom board similar to at91sam9263ek and basing +its devicetree on that one apparently the pin muxing doesn't get +set up properly. This was discovered since the custom boards u-boot +does funky stuff with the pin muxing and leaved it set to SPI +which made the MMC driver not work under Linux. +The fix is simply to define the given configuration as the default. +This probably worked by pure luck before, but it's better to +make the muxing explicitly set. + +Signed-off-by: Andreas Henriksson +Acked-by: Boris Brezillon +Signed-off-by: Nicolas Ferre +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/at91sam9263.dtsi | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/arm/boot/dts/at91sam9263.dtsi ++++ b/arch/arm/boot/dts/at91sam9263.dtsi +@@ -535,6 +535,7 @@ + compatible = "atmel,hsmci"; + reg = <0xfff80000 0x600>; + interrupts = <10 IRQ_TYPE_LEVEL_HIGH 0>; ++ pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; +@@ -544,6 +545,7 @@ + compatible = "atmel,hsmci"; + reg = <0xfff84000 0x600>; + interrupts = <11 IRQ_TYPE_LEVEL_HIGH 0>; ++ pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; diff --git a/queue-3.14/arm-at91-pmc-don-t-forget-to-write-pmc_pcdr-register-to-disable-clocks.patch b/queue-3.14/arm-at91-pmc-don-t-forget-to-write-pmc_pcdr-register-to-disable-clocks.patch new file mode 100644 index 00000000000..65531b3d812 --- /dev/null +++ b/queue-3.14/arm-at91-pmc-don-t-forget-to-write-pmc_pcdr-register-to-disable-clocks.patch @@ -0,0 +1,31 @@ +From cfa1950e6c6b72251e80adc736af3c3d2907ab0e Mon Sep 17 00:00:00 2001 +From: Ludovic Desroches +Date: Mon, 22 Sep 2014 15:51:33 +0200 +Subject: ARM: at91/PMC: don't forget to write PMC_PCDR register to disable clocks + +From: Ludovic Desroches + +commit cfa1950e6c6b72251e80adc736af3c3d2907ab0e upstream. + +When introducing support for sama5d3, the write to PMC_PCDR register has +been accidentally removed. + +Reported-by: Nathalie Cyrille +Signed-off-by: Ludovic Desroches +Signed-off-by: Nicolas Ferre +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mach-at91/clock.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/arm/mach-at91/clock.c ++++ b/arch/arm/mach-at91/clock.c +@@ -962,6 +962,7 @@ static int __init at91_clock_reset(void) + } + + at91_pmc_write(AT91_PMC_SCDR, scdr); ++ at91_pmc_write(AT91_PMC_PCDR, pcdr); + if (cpu_is_sama5d3()) + at91_pmc_write(AT91_PMC_PCDR1, pcdr1); + diff --git a/queue-3.14/arm-mvebu-netgear-rn102-use-hardware-bch-ecc.patch b/queue-3.14/arm-mvebu-netgear-rn102-use-hardware-bch-ecc.patch new file mode 100644 index 00000000000..2eae4c57adf --- /dev/null +++ b/queue-3.14/arm-mvebu-netgear-rn102-use-hardware-bch-ecc.patch @@ -0,0 +1,44 @@ +From ace8578182dc347b043c0825b9873f62fdaa5b77 Mon Sep 17 00:00:00 2001 +From: "klightspeed@killerwolves.net" +Date: Wed, 10 Sep 2014 18:55:41 +1000 +Subject: ARM: mvebu: Netgear RN102: Use Hardware BCH ECC + +From: "klightspeed@killerwolves.net" + +commit ace8578182dc347b043c0825b9873f62fdaa5b77 upstream. + +The bootloader on the Netgear ReadyNAS RN102 uses Hardware BCH ECC +(strength = 4), while the pxa3xx NAND driver by default uses +Hamming ECC (strength = 1). + +This patch changes the ECC mode on these machines to match that +of the bootloader and of the stock firmware. That way, it is +now possible to update the kernel from userland (e.g. using +standard tools from mtd-utils package); u-boot will happily +load and boot it. + +Fixes: 92beaccd8b49 ("ARM: mvebu: Enable NAND controller in ReadyNAS 102 .dts file") +Signed-off-by: Ben Peddell +Acked-by: Ezequiel Garcia +Tested-by: Arnaud Ebalard +Link: https://lkml.kernel.org/r/1410339341-3372-1-git-send-email-klightspeed@killerwolves.net +Signed-off-by: Jason Cooper +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/armada-370-netgear-rn102.dts | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/arch/arm/boot/dts/armada-370-netgear-rn102.dts ++++ b/arch/arm/boot/dts/armada-370-netgear-rn102.dts +@@ -144,6 +144,10 @@ + marvell,nand-enable-arbiter; + nand-on-flash-bbt; + ++ /* Use Hardware BCH ECC */ ++ nand-ecc-strength = <4>; ++ nand-ecc-step-size = <512>; ++ + partition@0 { + label = "u-boot"; + reg = <0x0000000 0x180000>; /* 1.5MB */ diff --git a/queue-3.14/arm-mvebu-netgear-rn104-use-hardware-bch-ecc.patch b/queue-3.14/arm-mvebu-netgear-rn104-use-hardware-bch-ecc.patch new file mode 100644 index 00000000000..59405ed304a --- /dev/null +++ b/queue-3.14/arm-mvebu-netgear-rn104-use-hardware-bch-ecc.patch @@ -0,0 +1,46 @@ +From 225b94cdf719d0bc522a354bdafc18e5da5ff83b Mon Sep 17 00:00:00 2001 +From: Arnaud Ebalard +Date: Sat, 6 Sep 2014 22:49:25 +0200 +Subject: ARM: mvebu: Netgear RN104: Use Hardware BCH ECC + +From: Arnaud Ebalard + +commit 225b94cdf719d0bc522a354bdafc18e5da5ff83b upstream. + +The bootloader on the Netgear ReadyNAS RN104 uses Hardware BCH +ECC (strength = 4), while the pxa3xx NAND driver by default uses +Hamming ECC (strength = 1). + +This patch changes the ECC mode on these machines to match that +of the bootloader and of the stock firmware. That way, it is +now possible to update the kernel from userland (e.g. using +standard tools from mtd-utils package); u-boot will happily +load and boot it. + +The issue was initially reported and fixed by Ben Pedell for +RN102. The RN104 shares the same Hynix H27U1G8F2BTR NAND +flash and setup. This patch is based on Ben's fix for RN102. + +Fixes: 0373a558bd79 ("ARM: mvebu: Enable NAND controller in ReadyNAS 104 .dts file") +Signed-off-by: Arnaud Ebalard +Link: https://lkml.kernel.org/r/920c7e7169dc6aaaa3eb4bced2336d38e77b8864.1410035142.git.arno@natisbad.org +Signed-off-by: Jason Cooper +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/armada-370-netgear-rn104.dts | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/arch/arm/boot/dts/armada-370-netgear-rn104.dts ++++ b/arch/arm/boot/dts/armada-370-netgear-rn104.dts +@@ -146,6 +146,10 @@ + marvell,nand-enable-arbiter; + nand-on-flash-bbt; + ++ /* Use Hardware BCH ECC */ ++ nand-ecc-strength = <4>; ++ nand-ecc-step-size = <512>; ++ + partition@0 { + label = "u-boot"; + reg = <0x0000000 0x180000>; /* 1.5MB */ diff --git a/queue-3.14/arm-mvebu-netgear-rn2120-use-hardware-bch-ecc.patch b/queue-3.14/arm-mvebu-netgear-rn2120-use-hardware-bch-ecc.patch new file mode 100644 index 00000000000..70ef35fb1fc --- /dev/null +++ b/queue-3.14/arm-mvebu-netgear-rn2120-use-hardware-bch-ecc.patch @@ -0,0 +1,46 @@ +From 500abb6ccb9e3f8d638a7f422443a8549245ef90 Mon Sep 17 00:00:00 2001 +From: Arnaud Ebalard +Date: Sat, 6 Sep 2014 22:49:38 +0200 +Subject: ARM: mvebu: Netgear RN2120: Use Hardware BCH ECC + +From: Arnaud Ebalard + +commit 500abb6ccb9e3f8d638a7f422443a8549245ef90 upstream. + +The bootloader on the Netgear ReadyNAS RN2120 uses Hardware BCH +ECC (strength = 4), while the pxa3xx NAND driver by default uses +Hamming ECC (strength = 1). + +This patch changes the ECC mode on these machines to match that +of the bootloader and of the stock firmware. That way, it is +now possible to update the kernel from userland (e.g. using +standard tools from mtd-utils package); u-boot will happily +load and boot it. + +The issue was initially reported and fixed by Ben Pedell for +RN102. The RN2120 shares the same Hynix H27U1G8F2BTR NAND +flash and setup. This patch is based on Ben's fix for RN102. + +Fixes: ad51eddd95ad ("ARM: mvebu: Enable NAND controller in ReadyNAS 2120 .dts file") +Signed-off-by: Arnaud Ebalard +Link: https://lkml.kernel.org/r/61f6a1b7ad0adc57a0e201b9680bc2e5f214a317.1410035142.git.arno@natisbad.org +Signed-off-by: Jason Cooper +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/armada-xp-netgear-rn2120.dts | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts ++++ b/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts +@@ -224,6 +224,10 @@ + marvell,nand-enable-arbiter; + nand-on-flash-bbt; + ++ /* Use Hardware BCH ECC */ ++ nand-ecc-strength = <4>; ++ nand-ecc-step-size = <512>; ++ + partition@0 { + label = "u-boot"; + reg = <0x0000000 0x180000>; /* 1.5MB */ diff --git a/queue-3.14/arm64-compat-fix-compat-types-affecting-struct.patch b/queue-3.14/arm64-compat-fix-compat-types-affecting-struct.patch new file mode 100644 index 00000000000..ba5d6a31110 --- /dev/null +++ b/queue-3.14/arm64-compat-fix-compat-types-affecting-struct.patch @@ -0,0 +1,40 @@ +From 971a5b6fe634bb7b617d8c5f25b6a3ddbc600194 Mon Sep 17 00:00:00 2001 +From: Victor Kamensky +Date: Tue, 14 Oct 2014 06:55:05 +0100 +Subject: arm64: compat: fix compat types affecting struct + compat_elf_prpsinfo + +From: Victor Kamensky + +commit 971a5b6fe634bb7b617d8c5f25b6a3ddbc600194 upstream. + +The compat_elf_prpsinfo structure does not match the arch/arm struct +elf_pspsinfo definition. As result NT_PRPSINFO note in core file +created by arm64 kernel for aarch32 (compat) process has wrong size. +So gdb cannot display command that caused process crash. + +Fix is to change size of __compat_uid_t, __compat_gid_t so it would +match size of similar fields in arch/arm case. + +Signed-off-by: Victor Kamensky +Acked-by: Arnd Bergmann +Signed-off-by: Catalin Marinas +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm64/include/asm/compat.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/arm64/include/asm/compat.h ++++ b/arch/arm64/include/asm/compat.h +@@ -37,8 +37,8 @@ typedef s32 compat_ssize_t; + typedef s32 compat_time_t; + typedef s32 compat_clock_t; + typedef s32 compat_pid_t; +-typedef u32 __compat_uid_t; +-typedef u32 __compat_gid_t; ++typedef u16 __compat_uid_t; ++typedef u16 __compat_gid_t; + typedef u16 __compat_uid16_t; + typedef u16 __compat_gid16_t; + typedef u32 __compat_uid32_t; diff --git a/queue-3.14/ecryptfs-avoid-to-access-null-pointer-when-write-metadata-in-xattr.patch b/queue-3.14/ecryptfs-avoid-to-access-null-pointer-when-write-metadata-in-xattr.patch new file mode 100644 index 00000000000..29dc375b980 --- /dev/null +++ b/queue-3.14/ecryptfs-avoid-to-access-null-pointer-when-write-metadata-in-xattr.patch @@ -0,0 +1,87 @@ +From 35425ea2492175fd39f6116481fe98b2b3ddd4ca Mon Sep 17 00:00:00 2001 +From: Chao Yu +Date: Thu, 24 Jul 2014 17:25:42 +0800 +Subject: ecryptfs: avoid to access NULL pointer when write metadata in xattr + +From: Chao Yu + +commit 35425ea2492175fd39f6116481fe98b2b3ddd4ca upstream. + +Christopher Head 2014-06-28 05:26:20 UTC described: +"I tried to reproduce this on 3.12.21. Instead, when I do "echo hello > foo" +in an ecryptfs mount with ecryptfs_xattr specified, I get a kernel crash: + +BUG: unable to handle kernel NULL pointer dereference at (null) +IP: [] fsstack_copy_attr_all+0x2/0x61 +PGD d7840067 PUD b2c3c067 PMD 0 +Oops: 0002 [#1] SMP +Modules linked in: nvidia(PO) +CPU: 3 PID: 3566 Comm: bash Tainted: P O 3.12.21-gentoo-r1 #2 +Hardware name: ASUSTek Computer Inc. G60JX/G60JX, BIOS 206 03/15/2010 +task: ffff8801948944c0 ti: ffff8800bad70000 task.ti: ffff8800bad70000 +RIP: 0010:[] [] fsstack_copy_attr_all+0x2/0x61 +RSP: 0018:ffff8800bad71c10 EFLAGS: 00010246 +RAX: 00000000000181a4 RBX: ffff880198648480 RCX: 0000000000000000 +RDX: 0000000000000004 RSI: ffff880172010450 RDI: 0000000000000000 +RBP: ffff880198490e40 R08: 0000000000000000 R09: 0000000000000000 +R10: ffff880172010450 R11: ffffea0002c51e80 R12: 0000000000002000 +R13: 000000000000001a R14: 0000000000000000 R15: ffff880198490e40 +FS: 00007ff224caa700(0000) GS:ffff88019fcc0000(0000) knlGS:0000000000000000 +CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 +CR2: 0000000000000000 CR3: 00000000bb07f000 CR4: 00000000000007e0 +Stack: +ffffffff811826e8 ffff8800a39d8000 0000000000000000 000000000000001a +ffff8800a01d0000 ffff8800a39d8000 ffffffff81185fd5 ffffffff81082c2c +00000001a39d8000 53d0abbc98490e40 0000000000000037 ffff8800a39d8220 +Call Trace: +[] ? ecryptfs_setxattr+0x40/0x52 +[] ? ecryptfs_write_metadata+0x1b3/0x223 +[] ? should_resched+0x5/0x23 +[] ? ecryptfs_initialize_file+0xaf/0xd4 +[] ? ecryptfs_create+0xf4/0x142 +[] ? vfs_create+0x48/0x71 +[] ? do_last.isra.68+0x559/0x952 +[] ? link_path_walk+0xbd/0x458 +[] ? path_openat+0x224/0x472 +[] ? do_filp_open+0x2b/0x6f +[] ? __alloc_fd+0xd6/0xe7 +[] ? do_sys_open+0x65/0xe9 +[] ? system_call_fastpath+0x16/0x1b +RIP [] fsstack_copy_attr_all+0x2/0x61 +RSP +CR2: 0000000000000000 +---[ end trace df9dba5f1ddb8565 ]---" + +If we create a file when we mount with ecryptfs_xattr_metadata option, we will +encounter a crash in this path: +->ecryptfs_create + ->ecryptfs_initialize_file + ->ecryptfs_write_metadata + ->ecryptfs_write_metadata_to_xattr + ->ecryptfs_setxattr + ->fsstack_copy_attr_all +It's because our dentry->d_inode used in fsstack_copy_attr_all is NULL, and it +will be initialized when ecryptfs_initialize_file finish. + +So we should skip copying attr from lower inode when the value of ->d_inode is +invalid. + +Signed-off-by: Chao Yu +Signed-off-by: Tyler Hicks +Signed-off-by: Greg Kroah-Hartman + +--- + fs/ecryptfs/inode.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/ecryptfs/inode.c ++++ b/fs/ecryptfs/inode.c +@@ -1039,7 +1039,7 @@ ecryptfs_setxattr(struct dentry *dentry, + } + + rc = vfs_setxattr(lower_dentry, name, value, size, flags); +- if (!rc) ++ if (!rc && dentry->d_inode) + fsstack_copy_attr_all(dentry->d_inode, lower_dentry->d_inode); + out: + return rc; diff --git a/queue-3.14/series b/queue-3.14/series index 9212ef3c244..2f7ff4e4ea4 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -55,3 +55,17 @@ futex-ensure-get_futex_key_refs-always-implies-a-barrier.patch powerpc-iommu-ddw-fix-endianness.patch ima-provide-flag-to-identify-new-empty-files.patch spi-dw-mid-terminate-ongoing-transfers-at-exit.patch +arm64-compat-fix-compat-types-affecting-struct.patch +alsa-pcm-use-the-same-dma-mmap-codepath-both-for-arm-and-arm64.patch +alsa-emu10k1-fix-deadlock-in-synth-voice-lookup.patch +alsa-alc283-codec-avoid-pop-noise-on-headphones-during-suspend-resume.patch +alsa-usb-audio-add-support-for-steinberg-ur22-usb-interface.patch +alsa-hda-hdmi-fix-missing-eld-change-event-on-plug-unplug.patch +arm-at91-dt-fix-typo-regarding-can0_clk.patch +arm-at91-fix-at91sam9263ek-dt-mmc-pinmuxing-settings.patch +arm-at91-pmc-don-t-forget-to-write-pmc_pcdr-register-to-disable-clocks.patch +arm-mvebu-netgear-rn104-use-hardware-bch-ecc.patch +arm-mvebu-netgear-rn2120-use-hardware-bch-ecc.patch +arm-mvebu-netgear-rn102-use-hardware-bch-ecc.patch +ecryptfs-avoid-to-access-null-pointer-when-write-metadata-in-xattr.patch +xfs-ensure-wb_sync_all-writeback-handles-partial-pages-correctly.patch diff --git a/queue-3.14/xfs-ensure-wb_sync_all-writeback-handles-partial-pages-correctly.patch b/queue-3.14/xfs-ensure-wb_sync_all-writeback-handles-partial-pages-correctly.patch new file mode 100644 index 00000000000..67e82896604 --- /dev/null +++ b/queue-3.14/xfs-ensure-wb_sync_all-writeback-handles-partial-pages-correctly.patch @@ -0,0 +1,74 @@ +From 0d085a529b427d97710e6a41f8a4f23e1757cd12 Mon Sep 17 00:00:00 2001 +From: Dave Chinner +Date: Tue, 23 Sep 2014 15:36:27 +1000 +Subject: xfs: ensure WB_SYNC_ALL writeback handles partial pages correctly + +From: Dave Chinner + +commit 0d085a529b427d97710e6a41f8a4f23e1757cd12 upstream. + +XFS has been having trouble with stray delayed allocation extents +beyond EOF for a long time. Recent changes to the collapse range +code has triggered erroneous EBUSY errors on page invalidtion for +block size smaller than page size filesystems. These +have been caused by dirty buffers beyond EOF on a partial page which +do not get written to disk during a sync. + +The issue is that write-ahead in xfs_cluster_write() finds such a +partial page and handles it by leaving the page dirty but pushing it +into a writeback state. This used to work just fine, as the +write_cache_pages() code would then find the dirty partial page in +the next mapping tree lookup as the dirty tag is still set. + +Unfortunately, when we moved to a mark and sweep approach to +writeback to fix other writeback sync issues, we broken this. THe +act of marking the page as under writeback now clears the TOWRITE +tag in the radix tree, even though the page is still dirty. This +causes the TOWRITE tag to be cleared, and hence the next lookup on +the mapping tree does not find the dirty partial page and so doesn't +try to write it again. + +This same writeback bug was found recently in ext4 and fixed in +commit 1c8349a ("ext4: fix data integrity sync in ordered mode") +without communication to the wider filesystem community. We can use +exactly the same fix here so the TOWRITE flag is not cleared on +partial page writes. + +cc: stable@vger.kernel.org # dependent on 1c8349a17137b93f0a83f276c764a6df1b9a116e +Root-cause-found-by: Brian Foster +Signed-off-by: Dave Chinner +Reviewed-by: Brian Foster +Signed-off-by: Dave Chinner +Signed-off-by: Greg Kroah-Hartman + +--- + fs/xfs/xfs_aops.c | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +--- a/fs/xfs/xfs_aops.c ++++ b/fs/xfs/xfs_aops.c +@@ -434,10 +434,22 @@ xfs_start_page_writeback( + { + ASSERT(PageLocked(page)); + ASSERT(!PageWriteback(page)); +- if (clear_dirty) ++ ++ /* ++ * if the page was not fully cleaned, we need to ensure that the higher ++ * layers come back to it correctly. That means we need to keep the page ++ * dirty, and for WB_SYNC_ALL writeback we need to ensure the ++ * PAGECACHE_TAG_TOWRITE index mark is not removed so another attempt to ++ * write this page in this writeback sweep will be made. ++ */ ++ if (clear_dirty) { + clear_page_dirty_for_io(page); +- set_page_writeback(page); ++ set_page_writeback(page); ++ } else ++ set_page_writeback_keepwrite(page); ++ + unlock_page(page); ++ + /* If no buffers on the page are to be written, finish it here */ + if (!buffers) + end_page_writeback(page);