From: Greg Kroah-Hartman Date: Mon, 27 Aug 2012 18:19:10 +0000 (-0700) Subject: 3.5-stable patches X-Git-Tag: v3.5.4~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2a521760442d26e8df0013190225d04aee6cc6f6;p=thirdparty%2Fkernel%2Fstable-queue.git 3.5-stable patches added patches: alpha-don-t-export-sock_nonblock-to-user-space.patch alpha-fix-fpu.h-usage-in-userspace.patch asoc-omap-mcbsp-fix-6pin-mux-configuration.patch asoc-wm9712-fix-microphone-source-selection.patch mips-pci-ar724x-avoid-data-bus-error-due-to-a-missing-pcie-module.patch usb-winbond-remove-__devinit-from-the-struct-usb_device_id-table.patch vfs-canonicalize-create-mode-in-build_open_flags.patch vfs-missed-source-of-f_pos-races.patch --- diff --git a/queue-3.5/alpha-don-t-export-sock_nonblock-to-user-space.patch b/queue-3.5/alpha-don-t-export-sock_nonblock-to-user-space.patch new file mode 100644 index 00000000000..b5feb6c720a --- /dev/null +++ b/queue-3.5/alpha-don-t-export-sock_nonblock-to-user-space.patch @@ -0,0 +1,40 @@ +From a2fa3ccd7b43665fe14cb562761a6c3d26a1d13f Mon Sep 17 00:00:00 2001 +From: Michael Cree +Date: Sun, 19 Aug 2012 14:40:56 +1200 +Subject: alpha: Don't export SOCK_NONBLOCK to user space. + +From: Michael Cree + +commit a2fa3ccd7b43665fe14cb562761a6c3d26a1d13f upstream. + +Currently we export SOCK_NONBLOCK to user space but that conflicts with +the definition from glibc leading to compilation errors in user programs +(e.g. see Debian bug #658460). + +The generic socket.h restricts the definition of SOCK_NONBLOCK to the +kernel, as does the MIPS specific socket.h, so let's do the same on +Alpha. + +Signed-off-by: Michael Cree +Acked-by: Matt Turner +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + arch/alpha/include/asm/socket.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/alpha/include/asm/socket.h ++++ b/arch/alpha/include/asm/socket.h +@@ -76,9 +76,11 @@ + /* Instruct lower device to use last 4-bytes of skb data as FCS */ + #define SO_NOFCS 43 + ++#ifdef __KERNEL__ + /* O_NONBLOCK clashes with the bits used for socket types. Therefore we + * have to define SOCK_NONBLOCK to a different value here. + */ + #define SOCK_NONBLOCK 0x40000000 ++#endif /* __KERNEL__ */ + + #endif /* _ASM_SOCKET_H */ diff --git a/queue-3.5/alpha-fix-fpu.h-usage-in-userspace.patch b/queue-3.5/alpha-fix-fpu.h-usage-in-userspace.patch new file mode 100644 index 00000000000..5c2fa17999a --- /dev/null +++ b/queue-3.5/alpha-fix-fpu.h-usage-in-userspace.patch @@ -0,0 +1,41 @@ +From 0be421862b857e61964435ffcaa7499cf77a5e5a Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Sun, 19 Aug 2012 14:41:02 +1200 +Subject: alpha: fix fpu.h usage in userspace + +From: Mike Frysinger + +commit 0be421862b857e61964435ffcaa7499cf77a5e5a upstream. + +After commit ec2212088c42 ("Disintegrate asm/system.h for Alpha"), the +fpu.h header which we install for userland started depending on +special_insns.h which is not installed. + +However, fpu.h only uses that for __KERNEL__ code, so protect the +inclusion the same way to avoid build breakage in glibc: + + /usr/include/asm/fpu.h:4:31: fatal error: asm/special_insns.h: No such file or directory + +Reported-by: Matt Turner +Signed-off-by: Mike Frysinger +Signed-off-by: Michael Cree +Acked-by: Matt Turner +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + arch/alpha/include/asm/fpu.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/alpha/include/asm/fpu.h ++++ b/arch/alpha/include/asm/fpu.h +@@ -1,7 +1,9 @@ + #ifndef __ASM_ALPHA_FPU_H + #define __ASM_ALPHA_FPU_H + ++#ifdef __KERNEL__ + #include ++#endif + + /* + * Alpha floating-point control register defines: diff --git a/queue-3.5/asoc-omap-mcbsp-fix-6pin-mux-configuration.patch b/queue-3.5/asoc-omap-mcbsp-fix-6pin-mux-configuration.patch new file mode 100644 index 00000000000..c006ec5083b --- /dev/null +++ b/queue-3.5/asoc-omap-mcbsp-fix-6pin-mux-configuration.patch @@ -0,0 +1,33 @@ +From d0db84e713eaaccea2a435e1625fb3150b335f4a Mon Sep 17 00:00:00 2001 +From: Peter Ujfalusi +Date: Tue, 7 Aug 2012 15:37:47 +0300 +Subject: ASoC: omap-mcbsp: Fix 6pin mux configuration + +From: Peter Ujfalusi + +commit d0db84e713eaaccea2a435e1625fb3150b335f4a upstream. + +The check for the mux_signal callback was wrong which prevents us to +configure the 6pin port's FSR/CLKR signal mux. + +Reported-by: CF Adad +Signed-off-by: Peter Ujfalusi +Acked-by: Jarkko Nikula +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/omap/mcbsp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/soc/omap/mcbsp.c ++++ b/sound/soc/omap/mcbsp.c +@@ -745,7 +745,7 @@ int omap_mcbsp_6pin_src_mux(struct omap_ + { + const char *signal, *src; + +- if (mcbsp->pdata->mux_signal) ++ if (!mcbsp->pdata->mux_signal) + return -EINVAL; + + switch (mux) { diff --git a/queue-3.5/asoc-wm9712-fix-microphone-source-selection.patch b/queue-3.5/asoc-wm9712-fix-microphone-source-selection.patch new file mode 100644 index 00000000000..c16559fa871 --- /dev/null +++ b/queue-3.5/asoc-wm9712-fix-microphone-source-selection.patch @@ -0,0 +1,73 @@ +From ccf795847a38235ee4a56a24129ce75147d6ba8f Mon Sep 17 00:00:00 2001 +From: Mark Brown +Date: Thu, 16 Aug 2012 22:36:04 +0100 +Subject: ASoC: wm9712: Fix microphone source selection + +From: Mark Brown + +commit ccf795847a38235ee4a56a24129ce75147d6ba8f upstream. + +Currently the microphone input source is not selectable as while there is +a DAPM widget it's not connected to anything so it won't be properly +instantiated. Add something more correct for the input structure to get +things going, even though it's not hooked into the rest of the routing +map and so won't actually achieve anything except allowing the relevant +register bits to be written. + +Reported-by: Christop Fritz +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/wm9712.c | 19 +++++++++++++++++-- + 1 file changed, 17 insertions(+), 2 deletions(-) + +--- a/sound/soc/codecs/wm9712.c ++++ b/sound/soc/codecs/wm9712.c +@@ -272,7 +272,7 @@ SOC_DAPM_ENUM("Route", wm9712_enum[9]); + + /* Mic select */ + static const struct snd_kcontrol_new wm9712_mic_src_controls = +-SOC_DAPM_ENUM("Route", wm9712_enum[7]); ++SOC_DAPM_ENUM("Mic Source Select", wm9712_enum[7]); + + /* diff select */ + static const struct snd_kcontrol_new wm9712_diff_sel_controls = +@@ -291,7 +291,9 @@ SND_SOC_DAPM_MUX("Left Capture Select", + &wm9712_capture_selectl_controls), + SND_SOC_DAPM_MUX("Right Capture Select", SND_SOC_NOPM, 0, 0, + &wm9712_capture_selectr_controls), +-SND_SOC_DAPM_MUX("Mic Select Source", SND_SOC_NOPM, 0, 0, ++SND_SOC_DAPM_MUX("Left Mic Select Source", SND_SOC_NOPM, 0, 0, ++ &wm9712_mic_src_controls), ++SND_SOC_DAPM_MUX("Right Mic Select Source", SND_SOC_NOPM, 0, 0, + &wm9712_mic_src_controls), + SND_SOC_DAPM_MUX("Differential Source", SND_SOC_NOPM, 0, 0, + &wm9712_diff_sel_controls), +@@ -319,6 +321,7 @@ SND_SOC_DAPM_PGA("Out 3 PGA", AC97_INT_P + SND_SOC_DAPM_PGA("Line PGA", AC97_INT_PAGING, 2, 1, NULL, 0), + SND_SOC_DAPM_PGA("Phone PGA", AC97_INT_PAGING, 1, 1, NULL, 0), + SND_SOC_DAPM_PGA("Mic PGA", AC97_INT_PAGING, 0, 1, NULL, 0), ++SND_SOC_DAPM_PGA("Differential Mic", SND_SOC_NOPM, 0, 0, NULL, 0), + SND_SOC_DAPM_MICBIAS("Mic Bias", AC97_INT_PAGING, 10, 1), + SND_SOC_DAPM_OUTPUT("MONOOUT"), + SND_SOC_DAPM_OUTPUT("HPOUTL"), +@@ -379,6 +382,18 @@ static const struct snd_soc_dapm_route w + {"Mic PGA", NULL, "MIC1"}, + {"Mic PGA", NULL, "MIC2"}, + ++ /* microphones */ ++ {"Differential Mic", NULL, "MIC1"}, ++ {"Differential Mic", NULL, "MIC2"}, ++ {"Left Mic Select Source", "Mic 1", "MIC1"}, ++ {"Left Mic Select Source", "Mic 2", "MIC2"}, ++ {"Left Mic Select Source", "Stereo", "MIC1"}, ++ {"Left Mic Select Source", "Differential", "Differential Mic"}, ++ {"Right Mic Select Source", "Mic 1", "MIC1"}, ++ {"Right Mic Select Source", "Mic 2", "MIC2"}, ++ {"Right Mic Select Source", "Stereo", "MIC2"}, ++ {"Right Mic Select Source", "Differential", "Differential Mic"}, ++ + /* left capture selector */ + {"Left Capture Select", "Mic", "MIC1"}, + {"Left Capture Select", "Speaker Mixer", "Speaker Mixer"}, diff --git a/queue-3.5/mips-pci-ar724x-avoid-data-bus-error-due-to-a-missing-pcie-module.patch b/queue-3.5/mips-pci-ar724x-avoid-data-bus-error-due-to-a-missing-pcie-module.patch new file mode 100644 index 00000000000..40cf0b1042b --- /dev/null +++ b/queue-3.5/mips-pci-ar724x-avoid-data-bus-error-due-to-a-missing-pcie-module.patch @@ -0,0 +1,86 @@ +From a1dca315ce3f78347bca8ce8befe3cc71ae63b7e Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Thu, 23 Aug 2012 15:35:26 +0200 +Subject: MIPS: pci-ar724x: avoid data bus error due to a missing PCIe module + +From: Gabor Juhos + +commit a1dca315ce3f78347bca8ce8befe3cc71ae63b7e upstream. + +If the controller has no PCIe module attached, accessing of the device +configuration space causes a data bus error. Avoid this by checking the +status of the PCIe link in advance, and indicate an error if the link +is down. + +Signed-off-by: Gabor Juhos +Cc: linux-mips@linux-mips.org +Patchwork: https://patchwork.linux-mips.org/patch/4293/ +Signed-off-by: Ralf Baechle +Signed-off-by: Greg Kroah-Hartman + +--- + arch/mips/pci/pci-ar724x.c | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +--- a/arch/mips/pci/pci-ar724x.c ++++ b/arch/mips/pci/pci-ar724x.c +@@ -23,9 +23,12 @@ + #define AR724X_PCI_MEM_BASE 0x10000000 + #define AR724X_PCI_MEM_SIZE 0x08000000 + ++#define AR724X_PCI_REG_RESET 0x18 + #define AR724X_PCI_REG_INT_STATUS 0x4c + #define AR724X_PCI_REG_INT_MASK 0x50 + ++#define AR724X_PCI_RESET_LINK_UP BIT(0) ++ + #define AR724X_PCI_INT_DEV0 BIT(14) + + #define AR724X_PCI_IRQ_COUNT 1 +@@ -38,6 +41,15 @@ static void __iomem *ar724x_pci_ctrl_bas + + static u32 ar724x_pci_bar0_value; + static bool ar724x_pci_bar0_is_cached; ++static bool ar724x_pci_link_up; ++ ++static inline bool ar724x_pci_check_link(void) ++{ ++ u32 reset; ++ ++ reset = __raw_readl(ar724x_pci_ctrl_base + AR724X_PCI_REG_RESET); ++ return reset & AR724X_PCI_RESET_LINK_UP; ++} + + static int ar724x_pci_read(struct pci_bus *bus, unsigned int devfn, int where, + int size, uint32_t *value) +@@ -46,6 +58,9 @@ static int ar724x_pci_read(struct pci_bu + void __iomem *base; + u32 data; + ++ if (!ar724x_pci_link_up) ++ return PCIBIOS_DEVICE_NOT_FOUND; ++ + if (devfn) + return PCIBIOS_DEVICE_NOT_FOUND; + +@@ -96,6 +111,9 @@ static int ar724x_pci_write(struct pci_b + u32 data; + int s; + ++ if (!ar724x_pci_link_up) ++ return PCIBIOS_DEVICE_NOT_FOUND; ++ + if (devfn) + return PCIBIOS_DEVICE_NOT_FOUND; + +@@ -280,6 +298,10 @@ int __init ar724x_pcibios_init(int irq) + if (ar724x_pci_ctrl_base == NULL) + goto err_unmap_devcfg; + ++ ar724x_pci_link_up = ar724x_pci_check_link(); ++ if (!ar724x_pci_link_up) ++ pr_warn("ar724x: PCIe link is down\n"); ++ + ar724x_pci_irq_init(irq); + register_pci_controller(&ar724x_pci_controller); + diff --git a/queue-3.5/series b/queue-3.5/series index 24855c54e2a..1c94da2ae01 100644 --- a/queue-3.5/series +++ b/queue-3.5/series @@ -14,3 +14,11 @@ arm-imx6-spin-the-cpu-until-hardware-takes-it-down.patch arm-imx-build-pm-imx5-code-only-when-pm-is-enabled.patch arm-imx-select-cpu_freq_table-when-needed.patch arm-imx-build-i.mx6-functions-only-when-needed.patch +mips-pci-ar724x-avoid-data-bus-error-due-to-a-missing-pcie-module.patch +asoc-wm9712-fix-microphone-source-selection.patch +asoc-omap-mcbsp-fix-6pin-mux-configuration.patch +vfs-missed-source-of-f_pos-races.patch +vfs-canonicalize-create-mode-in-build_open_flags.patch +alpha-fix-fpu.h-usage-in-userspace.patch +alpha-don-t-export-sock_nonblock-to-user-space.patch +usb-winbond-remove-__devinit-from-the-struct-usb_device_id-table.patch diff --git a/queue-3.5/usb-winbond-remove-__devinit-from-the-struct-usb_device_id-table.patch b/queue-3.5/usb-winbond-remove-__devinit-from-the-struct-usb_device_id-table.patch new file mode 100644 index 00000000000..3472e13bf69 --- /dev/null +++ b/queue-3.5/usb-winbond-remove-__devinit-from-the-struct-usb_device_id-table.patch @@ -0,0 +1,39 @@ +From 43a34695d9cd79c6659f09da6d3b0624f3dd169f Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Fri, 17 Aug 2012 17:48:37 -0700 +Subject: USB: winbond: remove __devinit* from the struct usb_device_id table + +From: Greg Kroah-Hartman + +commit 43a34695d9cd79c6659f09da6d3b0624f3dd169f upstream. + +This structure needs to always stick around, even if CONFIG_HOTPLUG +is disabled, otherwise we can oops when trying to probe a device that +was added after the structure is thrown away. + +Thanks to Fengguang Wu and Bjørn Mork for tracking this issue down. + +Reported-by: Fengguang Wu +Reported-by: Bjørn Mork +CC: Pavel Machek +CC: Paul Gortmaker +CC: "John W. Linville" +CC: Eliad Peller +CC: Devendra Naga +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/winbond/wbusb.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/staging/winbond/wbusb.c ++++ b/drivers/staging/winbond/wbusb.c +@@ -25,7 +25,7 @@ MODULE_DESCRIPTION("IS89C35 802.11bg WLA + MODULE_LICENSE("GPL"); + MODULE_VERSION("0.1"); + +-static const struct usb_device_id wb35_table[] __devinitconst = { ++static const struct usb_device_id wb35_table[] = { + { USB_DEVICE(0x0416, 0x0035) }, + { USB_DEVICE(0x18E8, 0x6201) }, + { USB_DEVICE(0x18E8, 0x6206) }, diff --git a/queue-3.5/vfs-canonicalize-create-mode-in-build_open_flags.patch b/queue-3.5/vfs-canonicalize-create-mode-in-build_open_flags.patch new file mode 100644 index 00000000000..efb5c58c9d6 --- /dev/null +++ b/queue-3.5/vfs-canonicalize-create-mode-in-build_open_flags.patch @@ -0,0 +1,41 @@ +From e68726ff72cf7ba5e7d789857fcd9a75ca573f03 Mon Sep 17 00:00:00 2001 +From: Miklos Szeredi +Date: Wed, 15 Aug 2012 13:01:24 +0200 +Subject: vfs: canonicalize create mode in build_open_flags() + +From: Miklos Szeredi + +commit e68726ff72cf7ba5e7d789857fcd9a75ca573f03 upstream. + +Userspace can pass weird create mode in open(2) that we canonicalize to +"(mode & S_IALLUGO) | S_IFREG" in vfs_create(). + +The problem is that we use the uncanonicalized mode before calling vfs_create() +with unforseen consequences. + +So do the canonicalization early in build_open_flags(). + +Signed-off-by: Miklos Szeredi +Tested-by: Richard W.M. Jones +Signed-off-by: Greg Kroah-Hartman + +--- + fs/open.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +--- a/fs/open.c ++++ b/fs/open.c +@@ -930,9 +930,10 @@ static inline int build_open_flags(int f + int lookup_flags = 0; + int acc_mode; + +- if (!(flags & O_CREAT)) +- mode = 0; +- op->mode = mode; ++ if (flags & O_CREAT) ++ op->mode = (mode & S_IALLUGO) | S_IFREG; ++ else ++ op->mode = 0; + + /* Must never be set by userspace */ + flags &= ~FMODE_NONOTIFY; diff --git a/queue-3.5/vfs-missed-source-of-f_pos-races.patch b/queue-3.5/vfs-missed-source-of-f_pos-races.patch new file mode 100644 index 00000000000..3a7eb59feb0 --- /dev/null +++ b/queue-3.5/vfs-missed-source-of-f_pos-races.patch @@ -0,0 +1,54 @@ +From 0e665d5d1125f9f4ccff56a75e814f10f88861a2 Mon Sep 17 00:00:00 2001 +From: Al Viro +Date: Mon, 20 Aug 2012 15:28:00 +0100 +Subject: vfs: missed source of ->f_pos races + +From: Al Viro + +commit 0e665d5d1125f9f4ccff56a75e814f10f88861a2 upstream. + +compat_sys_{read,write}v() need the same "pass a copy of file->f_pos" thing +as sys_{read,write}{,v}(). + +Signed-off-by: Al Viro +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + fs/compat.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +--- a/fs/compat.c ++++ b/fs/compat.c +@@ -1155,11 +1155,14 @@ compat_sys_readv(unsigned long fd, const + struct file *file; + int fput_needed; + ssize_t ret; ++ loff_t pos; + + file = fget_light(fd, &fput_needed); + if (!file) + return -EBADF; +- ret = compat_readv(file, vec, vlen, &file->f_pos); ++ pos = file->f_pos; ++ ret = compat_readv(file, vec, vlen, &pos); ++ file->f_pos = pos; + fput_light(file, fput_needed); + return ret; + } +@@ -1221,11 +1224,14 @@ compat_sys_writev(unsigned long fd, cons + struct file *file; + int fput_needed; + ssize_t ret; ++ loff_t pos; + + file = fget_light(fd, &fput_needed); + if (!file) + return -EBADF; +- ret = compat_writev(file, vec, vlen, &file->f_pos); ++ pos = file->f_pos; ++ ret = compat_writev(file, vec, vlen, &pos); ++ file->f_pos = pos; + fput_light(file, fput_needed); + return ret; + }