From: Greg Kroah-Hartman Date: Tue, 31 Dec 2013 05:29:40 +0000 (-0800) Subject: 3.12-stable patches X-Git-Tag: v3.4.76~72 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f5d6cc23a7834b32967902e48960ca8918c7f41d;p=thirdparty%2Fkernel%2Fstable-queue.git 3.12-stable patches added patches: alsa-add-sndrv_pcm_state_paused-case-in-wait_for_avail-function.patch asoc-tegra-fix-uninitialized-variables-in-set_fmt.patch asoc-wm5110-correct-hpout3-dapm-route-typo.patch asoc-wm8904-fix-dsp-mode-b-configuration.patch asoc-wm_adsp-add-small-delay-while-polling-dsp-ram-start.patch kexec-migrate-to-reboot-cpu.patch staging-comedi-8255_pci-fix-for-newer-pci-dio48h.patch staging-comedi-drivers-fix-return-value-of-comedi_load_firmware.patch --- diff --git a/queue-3.12/alsa-add-sndrv_pcm_state_paused-case-in-wait_for_avail-function.patch b/queue-3.12/alsa-add-sndrv_pcm_state_paused-case-in-wait_for_avail-function.patch new file mode 100644 index 00000000000..795fff73c46 --- /dev/null +++ b/queue-3.12/alsa-add-sndrv_pcm_state_paused-case-in-wait_for_avail-function.patch @@ -0,0 +1,33 @@ +From ed697e1aaf7237b1a62af39f64463b05c262808d Mon Sep 17 00:00:00 2001 +From: JongHo Kim +Date: Tue, 17 Dec 2013 23:02:24 +0900 +Subject: ALSA: Add SNDRV_PCM_STATE_PAUSED case in wait_for_avail function + +From: JongHo Kim + +commit ed697e1aaf7237b1a62af39f64463b05c262808d upstream. + +When the process is sleeping at the SNDRV_PCM_STATE_PAUSED +state from the wait_for_avail function, the sleep process will be woken by +timeout(10 seconds). Even if the sleep process wake up by timeout, by this +patch, the process will continue with sleep and wait for the other state. + +Signed-off-by: JongHo Kim +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/core/pcm_lib.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/sound/core/pcm_lib.c ++++ b/sound/core/pcm_lib.c +@@ -1937,6 +1937,8 @@ static int wait_for_avail(struct snd_pcm + case SNDRV_PCM_STATE_DISCONNECTED: + err = -EBADFD; + goto _endloop; ++ case SNDRV_PCM_STATE_PAUSED: ++ continue; + } + if (!tout) { + snd_printd("%s write error (DMA or IRQ trouble?)\n", diff --git a/queue-3.12/asoc-tegra-fix-uninitialized-variables-in-set_fmt.patch b/queue-3.12/asoc-tegra-fix-uninitialized-variables-in-set_fmt.patch new file mode 100644 index 00000000000..07b7f7c47f5 --- /dev/null +++ b/queue-3.12/asoc-tegra-fix-uninitialized-variables-in-set_fmt.patch @@ -0,0 +1,102 @@ +From 241bf43321a10815225f477bba96a42285a2da73 Mon Sep 17 00:00:00 2001 +From: Stephen Warren +Date: Fri, 6 Dec 2013 13:34:50 -0700 +Subject: ASoC: tegra: fix uninitialized variables in set_fmt + +From: Stephen Warren + +commit 241bf43321a10815225f477bba96a42285a2da73 upstream. + +In tegra*_i2s_set_fmt(), in the (fmt == SND_SOC_DAIFMT_CBM_CFM) case, +"val" is never assigned to, but left uninitialized. The other case does +initialized it. Fix this by initializing val at the start of the +function, and only ever ORing into it. + +Update the handling of "mask" so it works the same way for consistency. + +Update tegra20_spdif.c to use the same code-style for consistency, even +though it doesn't happen to suffer from the same problem at present. + +Signed-off-by: Stephen Warren +Reviewed-by: Thierry Reding +Signed-off-by: Mark Brown +Fixes: 0f163546a772 ("ASoC: tegra: use regmap more directly") +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/tegra/tegra20_i2s.c | 6 +++--- + sound/soc/tegra/tegra20_spdif.c | 10 +++++----- + sound/soc/tegra/tegra30_i2s.c | 6 +++--- + 3 files changed, 11 insertions(+), 11 deletions(-) + +--- a/sound/soc/tegra/tegra20_i2s.c ++++ b/sound/soc/tegra/tegra20_i2s.c +@@ -74,7 +74,7 @@ static int tegra20_i2s_set_fmt(struct sn + unsigned int fmt) + { + struct tegra20_i2s *i2s = snd_soc_dai_get_drvdata(dai); +- unsigned int mask, val; ++ unsigned int mask = 0, val = 0; + + switch (fmt & SND_SOC_DAIFMT_INV_MASK) { + case SND_SOC_DAIFMT_NB_NF: +@@ -83,10 +83,10 @@ static int tegra20_i2s_set_fmt(struct sn + return -EINVAL; + } + +- mask = TEGRA20_I2S_CTRL_MASTER_ENABLE; ++ mask |= TEGRA20_I2S_CTRL_MASTER_ENABLE; + switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { + case SND_SOC_DAIFMT_CBS_CFS: +- val = TEGRA20_I2S_CTRL_MASTER_ENABLE; ++ val |= TEGRA20_I2S_CTRL_MASTER_ENABLE; + break; + case SND_SOC_DAIFMT_CBM_CFM: + break; +--- a/sound/soc/tegra/tegra20_spdif.c ++++ b/sound/soc/tegra/tegra20_spdif.c +@@ -67,15 +67,15 @@ static int tegra20_spdif_hw_params(struc + { + struct device *dev = dai->dev; + struct tegra20_spdif *spdif = snd_soc_dai_get_drvdata(dai); +- unsigned int mask, val; ++ unsigned int mask = 0, val = 0; + int ret, spdifclock; + +- mask = TEGRA20_SPDIF_CTRL_PACK | +- TEGRA20_SPDIF_CTRL_BIT_MODE_MASK; ++ mask |= TEGRA20_SPDIF_CTRL_PACK | ++ TEGRA20_SPDIF_CTRL_BIT_MODE_MASK; + switch (params_format(params)) { + case SNDRV_PCM_FORMAT_S16_LE: +- val = TEGRA20_SPDIF_CTRL_PACK | +- TEGRA20_SPDIF_CTRL_BIT_MODE_16BIT; ++ val |= TEGRA20_SPDIF_CTRL_PACK | ++ TEGRA20_SPDIF_CTRL_BIT_MODE_16BIT; + break; + default: + return -EINVAL; +--- a/sound/soc/tegra/tegra30_i2s.c ++++ b/sound/soc/tegra/tegra30_i2s.c +@@ -117,7 +117,7 @@ static int tegra30_i2s_set_fmt(struct sn + unsigned int fmt) + { + struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai); +- unsigned int mask, val; ++ unsigned int mask = 0, val = 0; + + switch (fmt & SND_SOC_DAIFMT_INV_MASK) { + case SND_SOC_DAIFMT_NB_NF: +@@ -126,10 +126,10 @@ static int tegra30_i2s_set_fmt(struct sn + return -EINVAL; + } + +- mask = TEGRA30_I2S_CTRL_MASTER_ENABLE; ++ mask |= TEGRA30_I2S_CTRL_MASTER_ENABLE; + switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { + case SND_SOC_DAIFMT_CBS_CFS: +- val = TEGRA30_I2S_CTRL_MASTER_ENABLE; ++ val |= TEGRA30_I2S_CTRL_MASTER_ENABLE; + break; + case SND_SOC_DAIFMT_CBM_CFM: + break; diff --git a/queue-3.12/asoc-wm5110-correct-hpout3-dapm-route-typo.patch b/queue-3.12/asoc-wm5110-correct-hpout3-dapm-route-typo.patch new file mode 100644 index 00000000000..242eb7eb966 --- /dev/null +++ b/queue-3.12/asoc-wm5110-correct-hpout3-dapm-route-typo.patch @@ -0,0 +1,29 @@ +From 280484e708a3cc38fe6807718caa460e744c0b20 Mon Sep 17 00:00:00 2001 +From: Charles Keepax +Date: Tue, 17 Dec 2013 13:16:16 +0000 +Subject: ASoC: wm5110: Correct HPOUT3 DAPM route typo + +From: Charles Keepax + +commit 280484e708a3cc38fe6807718caa460e744c0b20 upstream. + +Reported-by: Kyung-Kwee Ryu +Signed-off-by: Charles Keepax +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/wm5110.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/soc/codecs/wm5110.c ++++ b/sound/soc/codecs/wm5110.c +@@ -1031,7 +1031,7 @@ static const struct snd_soc_dapm_route w + { "HPOUT2R", NULL, "OUT2R" }, + + { "HPOUT3L", NULL, "OUT3L" }, +- { "HPOUT3R", NULL, "OUT3L" }, ++ { "HPOUT3R", NULL, "OUT3R" }, + + { "SPKOUTLN", NULL, "OUT4L" }, + { "SPKOUTLP", NULL, "OUT4L" }, diff --git a/queue-3.12/asoc-wm8904-fix-dsp-mode-b-configuration.patch b/queue-3.12/asoc-wm8904-fix-dsp-mode-b-configuration.patch new file mode 100644 index 00000000000..4e38df935c0 --- /dev/null +++ b/queue-3.12/asoc-wm8904-fix-dsp-mode-b-configuration.patch @@ -0,0 +1,32 @@ +From f0199bc5e3a3ec13f9bc938556517ec430b36437 Mon Sep 17 00:00:00 2001 +From: Bo Shen +Date: Wed, 18 Dec 2013 11:26:23 +0800 +Subject: ASoC: wm8904: fix DSP mode B configuration + +From: Bo Shen + +commit f0199bc5e3a3ec13f9bc938556517ec430b36437 upstream. + +When wm8904 work in DSP mode B, we still need to configure it to +work in DSP mode. Or else, it will work in Right Justified mode. + +Signed-off-by: Bo Shen +Acked-by: Charles Keepax +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/wm8904.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/soc/codecs/wm8904.c ++++ b/sound/soc/codecs/wm8904.c +@@ -1443,7 +1443,7 @@ static int wm8904_set_fmt(struct snd_soc + + switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { + case SND_SOC_DAIFMT_DSP_B: +- aif1 |= WM8904_AIF_LRCLK_INV; ++ aif1 |= 0x3 | WM8904_AIF_LRCLK_INV; + case SND_SOC_DAIFMT_DSP_A: + aif1 |= 0x3; + break; diff --git a/queue-3.12/asoc-wm_adsp-add-small-delay-while-polling-dsp-ram-start.patch b/queue-3.12/asoc-wm_adsp-add-small-delay-while-polling-dsp-ram-start.patch new file mode 100644 index 00000000000..4a67e000b3d --- /dev/null +++ b/queue-3.12/asoc-wm_adsp-add-small-delay-while-polling-dsp-ram-start.patch @@ -0,0 +1,44 @@ +From 939fd1e8d9deff206f12bd9d4e54aa7a4bd0ffd6 Mon Sep 17 00:00:00 2001 +From: Charles Keepax +Date: Wed, 18 Dec 2013 09:25:49 +0000 +Subject: ASoC: wm_adsp: Add small delay while polling DSP RAM start + +From: Charles Keepax + +commit 939fd1e8d9deff206f12bd9d4e54aa7a4bd0ffd6 upstream. + +Some devices are getting very close to the limit whilst polling the RAM +start, this patch adds a small delay to this loop to give a longer +startup timeout. + +Signed-off-by: Charles Keepax +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/wm_adsp.c | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +--- a/sound/soc/codecs/wm_adsp.c ++++ b/sound/soc/codecs/wm_adsp.c +@@ -1466,13 +1466,17 @@ static int wm_adsp2_ena(struct wm_adsp * + return ret; + + /* Wait for the RAM to start, should be near instantaneous */ +- count = 0; +- do { ++ for (count = 0; count < 10; ++count) { + ret = regmap_read(dsp->regmap, dsp->base + ADSP2_STATUS1, + &val); + if (ret != 0) + return ret; +- } while (!(val & ADSP2_RAM_RDY) && ++count < 10); ++ ++ if (val & ADSP2_RAM_RDY) ++ break; ++ ++ msleep(1); ++ } + + if (!(val & ADSP2_RAM_RDY)) { + adsp_err(dsp, "Failed to start DSP RAM\n"); diff --git a/queue-3.12/kexec-migrate-to-reboot-cpu.patch b/queue-3.12/kexec-migrate-to-reboot-cpu.patch new file mode 100644 index 00000000000..14a23df7c15 --- /dev/null +++ b/queue-3.12/kexec-migrate-to-reboot-cpu.patch @@ -0,0 +1,73 @@ +From c97102ba96324da330078ad8619ba4dfe840dbe3 Mon Sep 17 00:00:00 2001 +From: Vivek Goyal +Date: Wed, 18 Dec 2013 17:08:31 -0800 +Subject: kexec: migrate to reboot cpu + +From: Vivek Goyal + +commit c97102ba96324da330078ad8619ba4dfe840dbe3 upstream. + +Commit 1b3a5d02ee07 ("reboot: move arch/x86 reboot= handling to generic +kernel") moved reboot= handling to generic code. In the process it also +removed the code in native_machine_shutdown() which are moving reboot +process to reboot_cpu/cpu0. + +I guess that thought must have been that all reboot paths are calling +migrate_to_reboot_cpu(), so we don't need this special handling. But +kexec reboot path (kernel_kexec()) is not calling +migrate_to_reboot_cpu() so above change broke kexec. Now reboot can +happen on non-boot cpu and when INIT is sent in second kerneo to bring +up BP, it brings down the machine. + +So start calling migrate_to_reboot_cpu() in kexec reboot path to avoid +this problem. + +Bisected by WANG Chao. + +Reported-by: Matthew Whitehead +Reported-by: Dave Young +Signed-off-by: Vivek Goyal +Tested-by: Baoquan He +Tested-by: WANG Chao +Acked-by: H. Peter Anvin +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/reboot.h | 1 + + kernel/kexec.c | 1 + + kernel/reboot.c | 2 +- + 3 files changed, 3 insertions(+), 1 deletion(-) + +--- a/include/linux/reboot.h ++++ b/include/linux/reboot.h +@@ -43,6 +43,7 @@ extern int unregister_reboot_notifier(st + * Architecture-specific implementations of sys_reboot commands. + */ + ++extern void migrate_to_reboot_cpu(void); + extern void machine_restart(char *cmd); + extern void machine_halt(void); + extern void machine_power_off(void); +--- a/kernel/kexec.c ++++ b/kernel/kexec.c +@@ -1680,6 +1680,7 @@ int kernel_kexec(void) + { + kexec_in_progress = true; + kernel_restart_prepare(NULL); ++ migrate_to_reboot_cpu(); + printk(KERN_EMERG "Starting new kernel\n"); + machine_shutdown(); + } +--- a/kernel/reboot.c ++++ b/kernel/reboot.c +@@ -104,7 +104,7 @@ int unregister_reboot_notifier(struct no + } + EXPORT_SYMBOL(unregister_reboot_notifier); + +-static void migrate_to_reboot_cpu(void) ++void migrate_to_reboot_cpu(void) + { + /* The boot cpu is always logical cpu 0 */ + int cpu = reboot_cpu; diff --git a/queue-3.12/series b/queue-3.12/series index edf6c2253c3..02dfd413d74 100644 --- a/queue-3.12/series +++ b/queue-3.12/series @@ -7,3 +7,11 @@ powerpc-kvm-fix-rare-but-potential-deadlock-scene.patch tty-fix-hang-at-ldsem_down_read.patch n_tty-fix-apparent-order-of-echoed-output.patch tty-pmac_zilog-check-existence-of-ports-in-pmz_console_init.patch +staging-comedi-8255_pci-fix-for-newer-pci-dio48h.patch +staging-comedi-drivers-fix-return-value-of-comedi_load_firmware.patch +kexec-migrate-to-reboot-cpu.patch +asoc-tegra-fix-uninitialized-variables-in-set_fmt.patch +asoc-wm8904-fix-dsp-mode-b-configuration.patch +asoc-wm_adsp-add-small-delay-while-polling-dsp-ram-start.patch +asoc-wm5110-correct-hpout3-dapm-route-typo.patch +alsa-add-sndrv_pcm_state_paused-case-in-wait_for_avail-function.patch diff --git a/queue-3.12/staging-comedi-8255_pci-fix-for-newer-pci-dio48h.patch b/queue-3.12/staging-comedi-8255_pci-fix-for-newer-pci-dio48h.patch new file mode 100644 index 00000000000..b9ca30b7a23 --- /dev/null +++ b/queue-3.12/staging-comedi-8255_pci-fix-for-newer-pci-dio48h.patch @@ -0,0 +1,75 @@ +From 0283f7a100882684ad32b768f9f1ad81658a0b92 Mon Sep 17 00:00:00 2001 +From: Ian Abbott +Date: Fri, 13 Dec 2013 12:00:30 +0000 +Subject: staging: comedi: 8255_pci: fix for newer PCI-DIO48H + +From: Ian Abbott + +commit 0283f7a100882684ad32b768f9f1ad81658a0b92 upstream. + +At some point, Measurement Computing / ComputerBoards redesigned the +PCI-DIO48H to use a PLX PCI interface chip instead of an AMCC chip. +This meant they had to put their hardware registers in the PCI BAR 2 +region instead of PCI BAR 1. Unfortunately, they kept the same PCI +device ID for the new design. This means the driver recognizes the +newer cards, but doesn't work (and is likely to screw up the local +configuration registers of the PLX chip) because it's using the wrong +region. + +Since the PCI subvendor and subdevice IDs were both zero on the old +design, but are the same as the vendor and device on the new design, we +can tell the old design and new design apart easily enough. Split the +existing entry for the PCI-DIO48H in `pci_8255_boards[]` into two new +entries, referenced by different entries in the PCI device ID table +`pci_8255_pci_table[]`. Use the same board name for both entries. + +Signed-off-by: Ian Abbott +Acked-by: H Hartley Sweeten +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/comedi/drivers/8255_pci.c | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +--- a/drivers/staging/comedi/drivers/8255_pci.c ++++ b/drivers/staging/comedi/drivers/8255_pci.c +@@ -63,7 +63,8 @@ enum pci_8255_boardid { + BOARD_ADLINK_PCI7296, + BOARD_CB_PCIDIO24, + BOARD_CB_PCIDIO24H, +- BOARD_CB_PCIDIO48H, ++ BOARD_CB_PCIDIO48H_OLD, ++ BOARD_CB_PCIDIO48H_NEW, + BOARD_CB_PCIDIO96H, + BOARD_NI_PCIDIO96, + BOARD_NI_PCIDIO96B, +@@ -106,11 +107,16 @@ static const struct pci_8255_boardinfo p + .dio_badr = 2, + .n_8255 = 1, + }, +- [BOARD_CB_PCIDIO48H] = { ++ [BOARD_CB_PCIDIO48H_OLD] = { + .name = "cb_pci-dio48h", + .dio_badr = 1, + .n_8255 = 2, + }, ++ [BOARD_CB_PCIDIO48H_NEW] = { ++ .name = "cb_pci-dio48h", ++ .dio_badr = 2, ++ .n_8255 = 2, ++ }, + [BOARD_CB_PCIDIO96H] = { + .name = "cb_pci-dio96h", + .dio_badr = 2, +@@ -263,7 +269,10 @@ static DEFINE_PCI_DEVICE_TABLE(pci_8255_ + { PCI_VDEVICE(ADLINK, 0x7296), BOARD_ADLINK_PCI7296 }, + { PCI_VDEVICE(CB, 0x0028), BOARD_CB_PCIDIO24 }, + { PCI_VDEVICE(CB, 0x0014), BOARD_CB_PCIDIO24H }, +- { PCI_VDEVICE(CB, 0x000b), BOARD_CB_PCIDIO48H }, ++ { PCI_DEVICE_SUB(PCI_VENDOR_ID_CB, 0x000b, 0x0000, 0x0000), ++ .driver_data = BOARD_CB_PCIDIO48H_OLD }, ++ { PCI_DEVICE_SUB(PCI_VENDOR_ID_CB, 0x000b, PCI_VENDOR_ID_CB, 0x000b), ++ .driver_data = BOARD_CB_PCIDIO48H_NEW }, + { PCI_VDEVICE(CB, 0x0017), BOARD_CB_PCIDIO96H }, + { PCI_VDEVICE(NI, 0x0160), BOARD_NI_PCIDIO96 }, + { PCI_VDEVICE(NI, 0x1630), BOARD_NI_PCIDIO96B }, diff --git a/queue-3.12/staging-comedi-drivers-fix-return-value-of-comedi_load_firmware.patch b/queue-3.12/staging-comedi-drivers-fix-return-value-of-comedi_load_firmware.patch new file mode 100644 index 00000000000..bf44cd6be99 --- /dev/null +++ b/queue-3.12/staging-comedi-drivers-fix-return-value-of-comedi_load_firmware.patch @@ -0,0 +1,35 @@ +From c6236c0ce39c809c336ca929f68cf8ad02cf94e0 Mon Sep 17 00:00:00 2001 +From: H Hartley Sweeten +Date: Tue, 10 Dec 2013 16:31:25 -0700 +Subject: staging: comedi: drivers: fix return value of comedi_load_firmware() + +From: H Hartley Sweeten + +commit c6236c0ce39c809c336ca929f68cf8ad02cf94e0 upstream. + +Some of the callback functions that upload the firmware in the comedi +drivers return a positive value indicating the number of bytes sent +to the device. Detect this condition and just return '0' to indicate +a successful upload. + +Reported-by: Bernd Porr +Signed-off-by: H Hartley Sweeten +Acked-by: Ian Abbott +Acked-by: Dan Carpenter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/comedi/drivers.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/staging/comedi/drivers.c ++++ b/drivers/staging/comedi/drivers.c +@@ -417,7 +417,7 @@ int comedi_load_firmware(struct comedi_d + release_firmware(fw); + } + +- return ret; ++ return ret < 0 ? ret : 0; + } + EXPORT_SYMBOL_GPL(comedi_load_firmware); +