From: Greg Kroah-Hartman Date: Sun, 6 Dec 2015 05:51:26 +0000 (-0800) Subject: 3.14-stable patches X-Git-Tag: v3.10.94~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=28dda5550fbbcc8877a8ca623e921e0eb3891a3d;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: arm-8426-1-dma-mapping-add-missing-range-check-in-dma_mmap.patch arm-8427-1-dma-mapping-add-support-for-offset-parameter-in-dma_mmap.patch arm-common-edma-fix-channel-parameter-for-irq-callbacks.patch arm-dts-fix-wlan-regression-on-omap5-uevm.patch arm-orion-fix-dsa-platform-device-after-mvmdio-conversion.patch --- diff --git a/queue-3.14/arm-8426-1-dma-mapping-add-missing-range-check-in-dma_mmap.patch b/queue-3.14/arm-8426-1-dma-mapping-add-missing-range-check-in-dma_mmap.patch new file mode 100644 index 00000000000..b76dfa460b4 --- /dev/null +++ b/queue-3.14/arm-8426-1-dma-mapping-add-missing-range-check-in-dma_mmap.patch @@ -0,0 +1,42 @@ +From 371f0f085f629fc0f66695f572373ca4445a67ad Mon Sep 17 00:00:00 2001 +From: Marek Szyprowski +Date: Fri, 28 Aug 2015 09:41:39 +0100 +Subject: ARM: 8426/1: dma-mapping: add missing range check in dma_mmap() + +From: Marek Szyprowski + +commit 371f0f085f629fc0f66695f572373ca4445a67ad upstream. + +dma_mmap() function in IOMMU-based dma-mapping implementation lacked +a check for valid range of mmap parameters (offset and buffer size), what +might have caused access beyond the allocated buffer. This patch fixes +this issue. + +Signed-off-by: Marek Szyprowski +Signed-off-by: Russell King +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mm/dma-mapping.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/arch/arm/mm/dma-mapping.c ++++ b/arch/arm/mm/dma-mapping.c +@@ -1411,12 +1411,17 @@ static int arm_iommu_mmap_attrs(struct d + unsigned long uaddr = vma->vm_start; + unsigned long usize = vma->vm_end - vma->vm_start; + struct page **pages = __iommu_get_pages(cpu_addr, attrs); ++ unsigned long nr_pages = PAGE_ALIGN(size) >> PAGE_SHIFT; ++ unsigned long off = vma->vm_pgoff; + + vma->vm_page_prot = __get_dma_pgprot(attrs, vma->vm_page_prot); + + if (!pages) + return -ENXIO; + ++ if (off >= nr_pages || (usize >> PAGE_SHIFT) > nr_pages - off) ++ return -ENXIO; ++ + do { + int ret = vm_insert_page(vma, uaddr, *pages++); + if (ret) { diff --git a/queue-3.14/arm-8427-1-dma-mapping-add-support-for-offset-parameter-in-dma_mmap.patch b/queue-3.14/arm-8427-1-dma-mapping-add-support-for-offset-parameter-in-dma_mmap.patch new file mode 100644 index 00000000000..6ee29c8c4d6 --- /dev/null +++ b/queue-3.14/arm-8427-1-dma-mapping-add-support-for-offset-parameter-in-dma_mmap.patch @@ -0,0 +1,33 @@ +From 7e31210349e9e03a9a4dff31ab5f2bc83e8e84f5 Mon Sep 17 00:00:00 2001 +From: Marek Szyprowski +Date: Fri, 28 Aug 2015 09:42:09 +0100 +Subject: ARM: 8427/1: dma-mapping: add support for offset parameter in dma_mmap() + +From: Marek Szyprowski + +commit 7e31210349e9e03a9a4dff31ab5f2bc83e8e84f5 upstream. + +IOMMU-based dma_mmap() implementation lacked proper support for offset +parameter used in mmap call (it always assumed that mapping starts from +offset zero). This patch adds support for offset parameter to IOMMU-based +implementation. + +Signed-off-by: Marek Szyprowski +Signed-off-by: Russell King +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mm/dma-mapping.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/arm/mm/dma-mapping.c ++++ b/arch/arm/mm/dma-mapping.c +@@ -1422,6 +1422,8 @@ static int arm_iommu_mmap_attrs(struct d + if (off >= nr_pages || (usize >> PAGE_SHIFT) > nr_pages - off) + return -ENXIO; + ++ pages += off; ++ + do { + int ret = vm_insert_page(vma, uaddr, *pages++); + if (ret) { diff --git a/queue-3.14/arm-common-edma-fix-channel-parameter-for-irq-callbacks.patch b/queue-3.14/arm-common-edma-fix-channel-parameter-for-irq-callbacks.patch new file mode 100644 index 00000000000..48a4bded35c --- /dev/null +++ b/queue-3.14/arm-common-edma-fix-channel-parameter-for-irq-callbacks.patch @@ -0,0 +1,42 @@ +From 696d8b70c09dd421c4d037fab04341e5b30585cf Mon Sep 17 00:00:00 2001 +From: Peter Ujfalusi +Date: Wed, 14 Oct 2015 14:42:43 +0300 +Subject: ARM: common: edma: Fix channel parameter for irq callbacks + +From: Peter Ujfalusi + +commit 696d8b70c09dd421c4d037fab04341e5b30585cf upstream. + +In case when the interrupt happened for the second eDMA the channel +number was incorrectly passed to the client driver. + +Signed-off-by: Peter Ujfalusi +Signed-off-by: Vinod Koul +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/common/edma.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/arch/arm/common/edma.c ++++ b/arch/arm/common/edma.c +@@ -404,7 +404,8 @@ static irqreturn_t dma_irq_handler(int i + BIT(slot)); + if (edma_cc[ctlr]->intr_data[channel].callback) + edma_cc[ctlr]->intr_data[channel].callback( +- channel, EDMA_DMA_COMPLETE, ++ EDMA_CTLR_CHAN(ctlr, channel), ++ EDMA_DMA_COMPLETE, + edma_cc[ctlr]->intr_data[channel].data); + } + } while (sh_ipr); +@@ -458,7 +459,8 @@ static irqreturn_t dma_ccerr_handler(int + if (edma_cc[ctlr]->intr_data[k]. + callback) { + edma_cc[ctlr]->intr_data[k]. +- callback(k, ++ callback( ++ EDMA_CTLR_CHAN(ctlr, k), + EDMA_DMA_CC_ERROR, + edma_cc[ctlr]->intr_data + [k].data); diff --git a/queue-3.14/arm-dts-fix-wlan-regression-on-omap5-uevm.patch b/queue-3.14/arm-dts-fix-wlan-regression-on-omap5-uevm.patch new file mode 100644 index 00000000000..bab8502ceea --- /dev/null +++ b/queue-3.14/arm-dts-fix-wlan-regression-on-omap5-uevm.patch @@ -0,0 +1,154 @@ +From 0efc898a9bea7a2e8e583c6efab0e19dc7093078 Mon Sep 17 00:00:00 2001 +From: Tony Lindgren +Date: Fri, 16 Oct 2015 12:32:32 -0700 +Subject: ARM: dts: Fix WLAN regression on omap5-uevm + +From: Tony Lindgren + +commit 0efc898a9bea7a2e8e583c6efab0e19dc7093078 upstream. + +Commit 99f84cae43df ("ARM: dts: add wl12xx/wl18xx bindings") added +device tree bindings for the TI WLAN SDIO on many omap variants. + +I recall wondering how come omap5-uevm did not have the WLAN +added and this issue has been bugging me for a while now, and +I finally tracked it down to a bad pinmux regression, and a missing +deferred probe handling for the 32k clock from palmas that's +requested by twl6040. + +Basically 392adaf796b9 ("ARM: dts: omap5-evm: Add mcspi data") +added pin muxing for mcspi4 that conflicts with the onboard +WLAN. While some omap5-uevm don't have WLAN populated, the +pins are not reused for other devices. And as the SDIO bus +should be probed, let's try to enable WLAN by default. + +Let's fix the regression and add the WLAN configuration as +done for the other boards in 99f84cae43df ("ARM: dts: add +wl12xx/wl18xx bindings"). And let's use the new MMC pwrseq for +the 32k clock as suggested by Javier Martinez Canillas +. + +Note that without a related deferred probe fix for twl6040, +the 32k clock is not initialized if palmas-clk is a module +and twl6040 is built-in. + +Let's also use the generic "non-removable" instead of the +legacy "ti,non-removable" property while at it. + +And finally, note that omap5 seems to require WAKEUP_EN for +the WLAN GPIO interrupt. + +Fixes: 392adaf796b9 ("ARM: dts: omap5-evm: Add mcspi data") +Cc: Sourav Poddar +Signed-off-by: Tony Lindgren +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/omap5-uevm.dts | 66 ++++++++++++++++++++++++++++++++------- + 1 file changed, 55 insertions(+), 11 deletions(-) + +--- a/arch/arm/boot/dts/omap5-uevm.dts ++++ b/arch/arm/boot/dts/omap5-uevm.dts +@@ -27,6 +27,24 @@ + regulator-max-microvolt = <3000000>; + }; + ++ mmc3_pwrseq: sdhci0_pwrseq { ++ compatible = "mmc-pwrseq-simple"; ++ clocks = <&clk32kgaudio>; ++ clock-names = "ext_clock"; ++ }; ++ ++ vmmcsdio_fixed: fixedregulator-mmcsdio { ++ compatible = "regulator-fixed"; ++ regulator-name = "vmmcsdio_fixed"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ gpio = <&gpio5 12 GPIO_ACTIVE_HIGH>; /* gpio140 WLAN_EN */ ++ enable-active-high; ++ startup-delay-us = <70000>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&wlan_pins>; ++ }; ++ + /* HS USB Host PHY on PORT 2 */ + hsusb2_phy: hsusb2_phy { + compatible = "usb-nop-xceiv"; +@@ -134,12 +152,20 @@ + >; + }; + +- mcspi4_pins: pinmux_mcspi4_pins { ++ mmc3_pins: pinmux_mmc3_pins { ++ pinctrl-single,pins = < ++ OMAP5_IOPAD(0x01a4, PIN_INPUT_PULLUP | MUX_MODE0) /* wlsdio_clk */ ++ OMAP5_IOPAD(0x01a6, PIN_INPUT_PULLUP | MUX_MODE0) /* wlsdio_cmd */ ++ OMAP5_IOPAD(0x01a8, PIN_INPUT_PULLUP | MUX_MODE0) /* wlsdio_data0 */ ++ OMAP5_IOPAD(0x01aa, PIN_INPUT_PULLUP | MUX_MODE0) /* wlsdio_data1 */ ++ OMAP5_IOPAD(0x01ac, PIN_INPUT_PULLUP | MUX_MODE0) /* wlsdio_data2 */ ++ OMAP5_IOPAD(0x01ae, PIN_INPUT_PULLUP | MUX_MODE0) /* wlsdio_data3 */ ++ >; ++ }; ++ ++ wlan_pins: pinmux_wlan_pins { + pinctrl-single,pins = < +- 0x164 (PIN_INPUT | MUX_MODE1) /* mcspi4_clk */ +- 0x168 (PIN_INPUT | MUX_MODE1) /* mcspi4_simo */ +- 0x16a (PIN_INPUT | MUX_MODE1) /* mcspi4_somi */ +- 0x16c (PIN_INPUT | MUX_MODE1) /* mcspi4_cs0 */ ++ OMAP5_IOPAD(0x1bc, PIN_OUTPUT | MUX_MODE6) /* mcspi1_clk.gpio5_140 */ + >; + }; + +@@ -200,6 +226,12 @@ + 0x1A (PIN_OUTPUT | MUX_MODE0) /* fref_clk1_out, USB hub clk */ + >; + }; ++ ++ wlcore_irq_pin: pinmux_wlcore_irq_pin { ++ pinctrl-single,pins = < ++ OMAP5_IOPAD(0x040, WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE6) /* llia_wakereqin.gpio1_wk14 */ ++ >; ++ }; + }; + + &mmc1 { +@@ -214,8 +246,25 @@ + }; + + &mmc3 { ++ vmmc-supply = <&vmmcsdio_fixed>; ++ mmc-pwrseq = <&mmc3_pwrseq>; + bus-width = <4>; +- ti,non-removable; ++ non-removable; ++ cap-power-off-card; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc3_pins &wlcore_irq_pin>; ++ interrupts-extended = <&gic GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH ++ &omap5_pmx_core 0x168>; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ wlcore: wlcore@2 { ++ compatible = "ti,wl1271"; ++ reg = <2>; ++ interrupt-parent = <&gpio1>; ++ interrupts = <14 IRQ_TYPE_LEVEL_HIGH>; /* gpio 14 */ ++ ref-clock-frequency = <26000000>; ++ }; + }; + + &mmc4 { +@@ -472,11 +521,6 @@ + pinctrl-0 = <&mcspi3_pins>; + }; + +-&mcspi4 { +- pinctrl-names = "default"; +- pinctrl-0 = <&mcspi4_pins>; +-}; +- + &uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>; diff --git a/queue-3.14/arm-orion-fix-dsa-platform-device-after-mvmdio-conversion.patch b/queue-3.14/arm-orion-fix-dsa-platform-device-after-mvmdio-conversion.patch new file mode 100644 index 00000000000..ea37e4cff88 --- /dev/null +++ b/queue-3.14/arm-orion-fix-dsa-platform-device-after-mvmdio-conversion.patch @@ -0,0 +1,36 @@ +From d836ace65ee98d7079bc3c5afdbcc0e27dca20a3 Mon Sep 17 00:00:00 2001 +From: Florian Fainelli +Date: Sat, 3 Oct 2015 13:03:47 -0700 +Subject: ARM: orion: Fix DSA platform device after mvmdio conversion + +From: Florian Fainelli + +commit d836ace65ee98d7079bc3c5afdbcc0e27dca20a3 upstream. + +DSA expects the host_dev pointer to be the device structure associated +with the MDIO bus controller driver. First commit breaking that was +c3a07134e6aa ("mv643xx_eth: convert to use the Marvell Orion MDIO +driver"), and then, it got completely under the radar for a while. + +Reported-by: Frans van de Wiel +Fixes: c3a07134e6aa ("mv643xx_eth: convert to use the Marvell Orion MDIO driver") +Signed-off-by: Florian Fainelli +Signed-off-by: Gregory CLEMENT +Signed-off-by: Greg Kroah-Hartman + + +--- + arch/arm/plat-orion/common.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/plat-orion/common.c ++++ b/arch/arm/plat-orion/common.c +@@ -499,7 +499,7 @@ void __init orion_ge00_switch_init(struc + + d->netdev = &orion_ge00.dev; + for (i = 0; i < d->nr_chips; i++) +- d->chip[i].mii_bus = &orion_ge00_shared.dev; ++ d->chip[i].mii_bus = &orion_ge_mvmdio.dev; + orion_switch_device.dev.platform_data = d; + + platform_device_register(&orion_switch_device); diff --git a/queue-3.14/series b/queue-3.14/series index f3162aafdec..08806280f2b 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -10,3 +10,8 @@ packet-race-condition-in-packet_bind.patch net-fix-a-race-in-dst_release.patch virtio-net-drop-netif_f_fraglist.patch rds-verify-the-underlying-transport-exists-before-creating-a-connection.patch +arm-8426-1-dma-mapping-add-missing-range-check-in-dma_mmap.patch +arm-8427-1-dma-mapping-add-support-for-offset-parameter-in-dma_mmap.patch +arm-orion-fix-dsa-platform-device-after-mvmdio-conversion.patch +arm-common-edma-fix-channel-parameter-for-irq-callbacks.patch +arm-dts-fix-wlan-regression-on-omap5-uevm.patch