From: Greg Kroah-Hartman Date: Tue, 3 Sep 2013 15:17:32 +0000 (-0700) Subject: 3.10-stable patches X-Git-Tag: v3.0.95~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9dd0c567cccb9c7bee83b50d535429475c65611b;p=thirdparty%2Fkernel%2Fstable-queue.git 3.10-stable patches added patches: alsa-hda-add-inverted-digital-mic-fixup-for-acer-aspire-one.patch alsa-hda-fix-null-dereference-with-config_snd_dynamic_minors-n.patch alsa-opti9xx-fix-conflicting-driver-object-name.patch powerpc-don-t-oops-when-accessing-proc-powerpc-lparcfg-without-hypervisor.patch powerpc-hvsi-increase-handshake-timeout-from-200ms-to-400ms.patch powerpc-work-around-gcc-miscompilation-of-__pa-on-64-bit.patch regmap-add-another-missing-header-for-config_regmap-stubs.patch scsi-pm80xx-fix-adaptec-71605h-hang.patch --- diff --git a/queue-3.10/alsa-hda-add-inverted-digital-mic-fixup-for-acer-aspire-one.patch b/queue-3.10/alsa-hda-add-inverted-digital-mic-fixup-for-acer-aspire-one.patch new file mode 100644 index 00000000000..e61f5dd2128 --- /dev/null +++ b/queue-3.10/alsa-hda-add-inverted-digital-mic-fixup-for-acer-aspire-one.patch @@ -0,0 +1,29 @@ +From d3d3835ce919438c00c5d1270d6f9d6ffea59d03 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 19 Aug 2013 20:05:50 +0200 +Subject: ALSA: hda - Add inverted digital mic fixup for Acer Aspire One + +From: Takashi Iwai + +commit d3d3835ce919438c00c5d1270d6f9d6ffea59d03 upstream. + +Yet another entry, just use the existing fixup for this machine, too. + +Reported-by: "Nathanael D. Noblet" +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -4207,6 +4207,7 @@ static const struct hda_fixup alc662_fix + + static const struct snd_pci_quirk alc662_fixup_tbl[] = { + SND_PCI_QUIRK(0x1019, 0x9087, "ECS", ALC662_FIXUP_ASUS_MODE2), ++ SND_PCI_QUIRK(0x1025, 0x022f, "Acer Aspire One", ALC662_FIXUP_INV_DMIC), + SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE), + SND_PCI_QUIRK(0x1025, 0x031c, "Gateway NV79", ALC662_FIXUP_SKU_IGNORE), + SND_PCI_QUIRK(0x1025, 0x0349, "eMachines eM250", ALC662_FIXUP_INV_DMIC), diff --git a/queue-3.10/alsa-hda-fix-null-dereference-with-config_snd_dynamic_minors-n.patch b/queue-3.10/alsa-hda-fix-null-dereference-with-config_snd_dynamic_minors-n.patch new file mode 100644 index 00000000000..0d7a46c83e8 --- /dev/null +++ b/queue-3.10/alsa-hda-fix-null-dereference-with-config_snd_dynamic_minors-n.patch @@ -0,0 +1,32 @@ +From 2ca320e294a738c9134a71b5029de05edbfc7aad Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Thu, 22 Aug 2013 09:55:36 +0200 +Subject: ALSA: hda - Fix NULL dereference with CONFIG_SND_DYNAMIC_MINORS=n + +From: Takashi Iwai + +commit 2ca320e294a738c9134a71b5029de05edbfc7aad upstream. + +Without the dynamic minor assignment, HDMI codec may have less PCM +instances than the number of pins, which eventually leads to Oops. + +Reported-by: Stratos Karafotis +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_hdmi.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/sound/pci/hda/patch_hdmi.c ++++ b/sound/pci/hda/patch_hdmi.c +@@ -1715,6 +1715,9 @@ static int generic_hdmi_build_controls(s + struct snd_pcm_chmap *chmap; + struct snd_kcontrol *kctl; + int i; ++ ++ if (!codec->pcm_info[pin_idx].pcm) ++ break; + err = snd_pcm_add_chmap_ctls(codec->pcm_info[pin_idx].pcm, + SNDRV_PCM_STREAM_PLAYBACK, + NULL, 0, pin_idx, &chmap); diff --git a/queue-3.10/alsa-opti9xx-fix-conflicting-driver-object-name.patch b/queue-3.10/alsa-opti9xx-fix-conflicting-driver-object-name.patch new file mode 100644 index 00000000000..276c1b6fa0f --- /dev/null +++ b/queue-3.10/alsa-opti9xx-fix-conflicting-driver-object-name.patch @@ -0,0 +1,55 @@ +From fb615499f0ad28ed74201c1cdfddf9e64e205424 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 27 Aug 2013 12:03:01 +0200 +Subject: ALSA: opti9xx: Fix conflicting driver object name + +From: Takashi Iwai + +commit fb615499f0ad28ed74201c1cdfddf9e64e205424 upstream. + +The recent commit to delay the release of kobject triggered NULL +dereferences of opti9xx drivers. The cause is that all +snd-opti92x-ad1848, snd-opti92x-cs4231 and snd-opti93x drivers +register the PnP card driver with the very same name, and also +snd-opti92x-ad1848 and -cs4231 drivers register the ISA driver with +the same name, too. When these drivers are built in, quick +"register-release-and-re-register" actions occur, and this results in +Oops because of the same name is assigned to the kobject. + +The fix is simply to assign individual names. As a bonus, by using +KBUILD_MODNAME, the patch reduces more lines than it adds. + +The fix is based on the suggestion by Russell King. + +Reported-and-tested-by: Fengguang Wu +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/isa/opti9xx/opti92x-ad1848.c | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +--- a/sound/isa/opti9xx/opti92x-ad1848.c ++++ b/sound/isa/opti9xx/opti92x-ad1848.c +@@ -173,11 +173,7 @@ MODULE_DEVICE_TABLE(pnp_card, snd_opti9x + + #endif /* CONFIG_PNP */ + +-#ifdef OPTi93X +-#define DEV_NAME "opti93x" +-#else +-#define DEV_NAME "opti92x" +-#endif ++#define DEV_NAME KBUILD_MODNAME + + static char * snd_opti9xx_names[] = { + "unknown", +@@ -1168,7 +1164,7 @@ static int snd_opti9xx_pnp_resume(struct + + static struct pnp_card_driver opti9xx_pnpc_driver = { + .flags = PNP_DRIVER_RES_DISABLE, +- .name = "opti9xx", ++ .name = DEV_NAME, + .id_table = snd_opti9xx_pnpids, + .probe = snd_opti9xx_pnp_probe, + .remove = snd_opti9xx_pnp_remove, diff --git a/queue-3.10/powerpc-don-t-oops-when-accessing-proc-powerpc-lparcfg-without-hypervisor.patch b/queue-3.10/powerpc-don-t-oops-when-accessing-proc-powerpc-lparcfg-without-hypervisor.patch new file mode 100644 index 00000000000..6e1c3bccea4 --- /dev/null +++ b/queue-3.10/powerpc-don-t-oops-when-accessing-proc-powerpc-lparcfg-without-hypervisor.patch @@ -0,0 +1,83 @@ +From f5f6cbb61610b7bf9d9d96db9c3979d62a424bab Mon Sep 17 00:00:00 2001 +From: Benjamin Herrenschmidt +Date: Tue, 27 Aug 2013 16:38:33 +1000 +Subject: powerpc: Don't Oops when accessing /proc/powerpc/lparcfg without hypervisor + +From: Benjamin Herrenschmidt + +commit f5f6cbb61610b7bf9d9d96db9c3979d62a424bab upstream. + +/proc/powerpc/lparcfg is an ancient facility (though still actively used) +which allows access to some informations relative to the partition when +running underneath a PAPR compliant hypervisor. + +It makes no sense on non-pseries machines. However, currently, not only +can it be created on these if the kernel has pseries support, but accessing +it on such a machine will crash due to trying to do hypervisor calls. + +In fact, it should also not do HV calls on older pseries that didn't have +an hypervisor either. + +Finally, it has the plumbing to be a module but is a "bool" Kconfig option. + +This fixes the whole lot by turning it into a machine_device_initcall +that is only created on pseries, and adding the necessary hypervisor +check before calling the H_GET_EM_PARMS hypercall + +Signed-off-by: Benjamin Herrenschmidt +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/kernel/lparcfg.c | 22 +++++++++------------- + 1 file changed, 9 insertions(+), 13 deletions(-) + +--- a/arch/powerpc/kernel/lparcfg.c ++++ b/arch/powerpc/kernel/lparcfg.c +@@ -35,7 +35,13 @@ + #include + #include + #include ++#include + ++ ++/* ++ * This isn't a module but we expose that to userspace ++ * via /proc so leave the definitions here ++ */ + #define MODULE_VERS "1.9" + #define MODULE_NAME "lparcfg" + +@@ -418,7 +424,8 @@ static void parse_em_data(struct seq_fil + { + unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; + +- if (plpar_hcall(H_GET_EM_PARMS, retbuf) == H_SUCCESS) ++ if (firmware_has_feature(FW_FEATURE_LPAR) && ++ plpar_hcall(H_GET_EM_PARMS, retbuf) == H_SUCCESS) + seq_printf(m, "power_mode_data=%016lx\n", retbuf[0]); + } + +@@ -677,7 +684,6 @@ static int lparcfg_open(struct inode *in + } + + static const struct file_operations lparcfg_fops = { +- .owner = THIS_MODULE, + .read = seq_read, + .write = lparcfg_write, + .open = lparcfg_open, +@@ -699,14 +705,4 @@ static int __init lparcfg_init(void) + } + return 0; + } +- +-static void __exit lparcfg_cleanup(void) +-{ +- remove_proc_subtree("powerpc/lparcfg", NULL); +-} +- +-module_init(lparcfg_init); +-module_exit(lparcfg_cleanup); +-MODULE_DESCRIPTION("Interface for LPAR configuration data"); +-MODULE_AUTHOR("Dave Engebretsen"); +-MODULE_LICENSE("GPL"); ++machine_device_initcall(pseries, lparcfg_init); diff --git a/queue-3.10/powerpc-hvsi-increase-handshake-timeout-from-200ms-to-400ms.patch b/queue-3.10/powerpc-hvsi-increase-handshake-timeout-from-200ms-to-400ms.patch new file mode 100644 index 00000000000..a4e67c6554e --- /dev/null +++ b/queue-3.10/powerpc-hvsi-increase-handshake-timeout-from-200ms-to-400ms.patch @@ -0,0 +1,40 @@ +From d220980b701d838560a70de691b53be007e99e78 Mon Sep 17 00:00:00 2001 +From: Eugene Surovegin +Date: Mon, 26 Aug 2013 11:53:32 -0700 +Subject: powerpc/hvsi: Increase handshake timeout from 200ms to 400ms. + +From: Eugene Surovegin + +commit d220980b701d838560a70de691b53be007e99e78 upstream. + +This solves a problem observed in kexec'ed kernel where 200ms timeout is +too short and bootconsole fails to initialize. Console did eventually +become workable but much later into the boot process. + +Observed timeout was around 260ms, but I decided to make it a little bigger +for more reliability. + +This has been tested on Power7 machine with Petitboot as a primary +bootloader and PowerNV firmware. + +Signed-off-by: Eugene Surovegin +Signed-off-by: Benjamin Herrenschmidt +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/tty/hvc/hvsi_lib.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/tty/hvc/hvsi_lib.c ++++ b/drivers/tty/hvc/hvsi_lib.c +@@ -341,8 +341,8 @@ void hvsilib_establish(struct hvsi_priv + + pr_devel("HVSI@%x: ... waiting handshake\n", pv->termno); + +- /* Try for up to 200s */ +- for (timeout = 0; timeout < 20; timeout++) { ++ /* Try for up to 400ms */ ++ for (timeout = 0; timeout < 40; timeout++) { + if (pv->established) + goto established; + if (!hvsi_get_packet(pv)) diff --git a/queue-3.10/powerpc-work-around-gcc-miscompilation-of-__pa-on-64-bit.patch b/queue-3.10/powerpc-work-around-gcc-miscompilation-of-__pa-on-64-bit.patch new file mode 100644 index 00000000000..c1eaa8492c9 --- /dev/null +++ b/queue-3.10/powerpc-work-around-gcc-miscompilation-of-__pa-on-64-bit.patch @@ -0,0 +1,67 @@ +From bdbc29c19b2633b1d9c52638fb732bcde7a2031a Mon Sep 17 00:00:00 2001 +From: Paul Mackerras +Date: Tue, 27 Aug 2013 16:07:49 +1000 +Subject: powerpc: Work around gcc miscompilation of __pa() on 64-bit + +From: Paul Mackerras + +commit bdbc29c19b2633b1d9c52638fb732bcde7a2031a upstream. + +On 64-bit, __pa(&static_var) gets miscompiled by recent versions of +gcc as something like: + + addis 3,2,.LANCHOR1+4611686018427387904@toc@ha + addi 3,3,.LANCHOR1+4611686018427387904@toc@l + +This ends up effectively ignoring the offset, since its bottom 32 bits +are zero, and means that the result of __pa() still has 0xC in the top +nibble. This happens with gcc 4.8.1, at least. + +To work around this, for 64-bit we make __pa() use an AND operator, +and for symmetry, we make __va() use an OR operator. Using an AND +operator rather than a subtraction ends up with slightly shorter code +since it can be done with a single clrldi instruction, whereas it +takes three instructions to form the constant (-PAGE_OFFSET) and add +it on. (Note that MEMORY_START is always 0 on 64-bit.) + +Signed-off-by: Paul Mackerras +Signed-off-by: Benjamin Herrenschmidt +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/Kconfig | 1 + + arch/powerpc/include/asm/page.h | 10 ++++++++++ + 2 files changed, 11 insertions(+) + +--- a/arch/powerpc/Kconfig ++++ b/arch/powerpc/Kconfig +@@ -986,6 +986,7 @@ config RELOCATABLE + must live at a different physical address than the primary + kernel. + ++# This value must have zeroes in the bottom 60 bits otherwise lots will break + config PAGE_OFFSET + hex + default "0xc000000000000000" +--- a/arch/powerpc/include/asm/page.h ++++ b/arch/powerpc/include/asm/page.h +@@ -211,9 +211,19 @@ extern long long virt_phys_offset; + #define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) + VIRT_PHYS_OFFSET)) + #define __pa(x) ((unsigned long)(x) - VIRT_PHYS_OFFSET) + #else ++#ifdef CONFIG_PPC64 ++/* ++ * gcc miscompiles (unsigned long)(&static_var) - PAGE_OFFSET ++ * with -mcmodel=medium, so we use & and | instead of - and + on 64-bit. ++ */ ++#define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) | PAGE_OFFSET)) ++#define __pa(x) ((unsigned long)(x) & 0x0fffffffffffffffUL) ++ ++#else /* 32-bit, non book E */ + #define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) + PAGE_OFFSET - MEMORY_START)) + #define __pa(x) ((unsigned long)(x) - PAGE_OFFSET + MEMORY_START) + #endif ++#endif + + /* + * Unfortunately the PLT is in the BSS in the PPC32 ELF ABI, diff --git a/queue-3.10/regmap-add-another-missing-header-for-config_regmap-stubs.patch b/queue-3.10/regmap-add-another-missing-header-for-config_regmap-stubs.patch new file mode 100644 index 00000000000..9b214736f0c --- /dev/null +++ b/queue-3.10/regmap-add-another-missing-header-for-config_regmap-stubs.patch @@ -0,0 +1,33 @@ +From 3f0fa9a808f98fa10a18ba2a73f13d65fda990fb Mon Sep 17 00:00:00 2001 +From: Kevin Hilman +Date: Wed, 14 Aug 2013 16:05:02 -0700 +Subject: regmap: Add another missing header for !CONFIG_REGMAP stubs + +From: Kevin Hilman + +commit 3f0fa9a808f98fa10a18ba2a73f13d65fda990fb upstream. + +The use of WARN_ON() needs the definitions from bug.h, without it +you can get: + +include/linux/regmap.h: In function 'regmap_write': +include/linux/regmap.h:525:2: error: implicit declaration of function 'WARN_ONCE' [-Werror=implicit-function-declaration] + +Signed-off-by: Kevin Hilman +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/regmap.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/include/linux/regmap.h ++++ b/include/linux/regmap.h +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + + struct module; + struct device; diff --git a/queue-3.10/scsi-pm80xx-fix-adaptec-71605h-hang.patch b/queue-3.10/scsi-pm80xx-fix-adaptec-71605h-hang.patch new file mode 100644 index 00000000000..5e792784bb2 --- /dev/null +++ b/queue-3.10/scsi-pm80xx-fix-adaptec-71605h-hang.patch @@ -0,0 +1,69 @@ +From 9504a923924d663e1953f872f0a828e6454a6cfc Mon Sep 17 00:00:00 2001 +From: Hans Verkuil +Date: Fri, 26 Jul 2013 18:43:45 +0200 +Subject: SCSI: pm80xx: fix Adaptec 71605H hang + +From: Hans Verkuil + +commit 9504a923924d663e1953f872f0a828e6454a6cfc upstream. + +The IO command size is 128 bytes for these new controllers as opposed to 64 +for the old 8001 controller. + +The Adaptec out-of-tree driver did this correctly. After comparing the two +this turned out to be the crucial difference. + +So don't hardcode the IO command size, instead use pm8001_ha->iomb_size as +that is the correct value for both old and new controllers. + +Signed-off-by: Hans Verkuil +Acked-by: Anand Kumar Santhanam +Acked-by: Jack Wang +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/pm8001/pm8001_hwi.c | 4 ++-- + drivers/scsi/pm8001/pm80xx_hwi.c | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/scsi/pm8001/pm8001_hwi.c ++++ b/drivers/scsi/pm8001/pm8001_hwi.c +@@ -221,7 +221,7 @@ static void init_default_table_values(st + pm8001_ha->main_cfg_tbl.pm8001_tbl.fatal_err_interrupt = 0x01; + for (i = 0; i < PM8001_MAX_INB_NUM; i++) { + pm8001_ha->inbnd_q_tbl[i].element_pri_size_cnt = +- PM8001_MPI_QUEUE | (64 << 16) | (0x00<<30); ++ PM8001_MPI_QUEUE | (pm8001_ha->iomb_size << 16) | (0x00<<30); + pm8001_ha->inbnd_q_tbl[i].upper_base_addr = + pm8001_ha->memoryMap.region[IB + i].phys_addr_hi; + pm8001_ha->inbnd_q_tbl[i].lower_base_addr = +@@ -247,7 +247,7 @@ static void init_default_table_values(st + } + for (i = 0; i < PM8001_MAX_OUTB_NUM; i++) { + pm8001_ha->outbnd_q_tbl[i].element_size_cnt = +- PM8001_MPI_QUEUE | (64 << 16) | (0x01<<30); ++ PM8001_MPI_QUEUE | (pm8001_ha->iomb_size << 16) | (0x01<<30); + pm8001_ha->outbnd_q_tbl[i].upper_base_addr = + pm8001_ha->memoryMap.region[OB + i].phys_addr_hi; + pm8001_ha->outbnd_q_tbl[i].lower_base_addr = +--- a/drivers/scsi/pm8001/pm80xx_hwi.c ++++ b/drivers/scsi/pm8001/pm80xx_hwi.c +@@ -275,7 +275,7 @@ static void init_default_table_values(st + + for (i = 0; i < PM8001_MAX_SPCV_INB_NUM; i++) { + pm8001_ha->inbnd_q_tbl[i].element_pri_size_cnt = +- PM8001_MPI_QUEUE | (64 << 16) | (0x00<<30); ++ PM8001_MPI_QUEUE | (pm8001_ha->iomb_size << 16) | (0x00<<30); + pm8001_ha->inbnd_q_tbl[i].upper_base_addr = + pm8001_ha->memoryMap.region[IB + i].phys_addr_hi; + pm8001_ha->inbnd_q_tbl[i].lower_base_addr = +@@ -301,7 +301,7 @@ static void init_default_table_values(st + } + for (i = 0; i < PM8001_MAX_SPCV_OUTB_NUM; i++) { + pm8001_ha->outbnd_q_tbl[i].element_size_cnt = +- PM8001_MPI_QUEUE | (64 << 16) | (0x01<<30); ++ PM8001_MPI_QUEUE | (pm8001_ha->iomb_size << 16) | (0x01<<30); + pm8001_ha->outbnd_q_tbl[i].upper_base_addr = + pm8001_ha->memoryMap.region[OB + i].phys_addr_hi; + pm8001_ha->outbnd_q_tbl[i].lower_base_addr = diff --git a/queue-3.10/series b/queue-3.10/series index ac974c864e0..f1013938083 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -1,2 +1,10 @@ drm-nouveau-mc-fix-race-condition-between-constructor-and-request_irq.patch jfs-fix-readdir-cookie-incompatibility-with-nfsv4.patch +alsa-hda-fix-null-dereference-with-config_snd_dynamic_minors-n.patch +alsa-hda-add-inverted-digital-mic-fixup-for-acer-aspire-one.patch +alsa-opti9xx-fix-conflicting-driver-object-name.patch +powerpc-work-around-gcc-miscompilation-of-__pa-on-64-bit.patch +powerpc-don-t-oops-when-accessing-proc-powerpc-lparcfg-without-hypervisor.patch +powerpc-hvsi-increase-handshake-timeout-from-200ms-to-400ms.patch +scsi-pm80xx-fix-adaptec-71605h-hang.patch +regmap-add-another-missing-header-for-config_regmap-stubs.patch