summaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/patches-3.8/002-dma_mv_xor_fix_error_handling.patch
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-01-08 22:20:16 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-01-08 22:20:16 +0000
commit518960de5fe311f05e1aeb030601e314af4f3f0c (patch)
treea5cbc0f5235b30a249d4532479600f183be2eec6 /target/linux/mvebu/patches-3.8/002-dma_mv_xor_fix_error_handling.patch
parent4ad90322b6e3e1d187d5640f15861a7ee72db7ef (diff)
mvebu: add inital support for Marvell Armada XP/370 SoCs
This brings in the initial support for the Marvell Armada XP/370 SoCs. Successfully tested on RD-A370-A1 and DB-MV784MP-GP boards the following interfaces: - Ethernet - SDIO - GPIOs - SATA Signed-off-by: Florian Fainelli <florian@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35058 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/mvebu/patches-3.8/002-dma_mv_xor_fix_error_handling.patch')
-rw-r--r--target/linux/mvebu/patches-3.8/002-dma_mv_xor_fix_error_handling.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-3.8/002-dma_mv_xor_fix_error_handling.patch b/target/linux/mvebu/patches-3.8/002-dma_mv_xor_fix_error_handling.patch
new file mode 100644
index 000000000..f5940fbb1
--- /dev/null
+++ b/target/linux/mvebu/patches-3.8/002-dma_mv_xor_fix_error_handling.patch
@@ -0,0 +1,38 @@
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+When mv_xor_channel_add() fails for one XOR channel, we jump to the
+err_channel_add label to clean up all previous channels that had been
+initialized correctly. Unfortunately, while handling this error
+condition, we were disposing the IRQ mapping before calling
+mv_xor_channel_remove() (which does the free_irq()), which is
+incorrect.
+
+Instead, do things properly in the reverse order of the
+initialization: first remove the XOR channel (so that free_irq() is
+done), and then dispose the IRQ mapping.
+
+This avoids ugly warnings when for some reason one of the XOR channel
+fails to initialize.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ drivers/dma/mv_xor.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
+index ac71f55..cc5d23d 100644
+--- a/drivers/dma/mv_xor.c
++++ b/drivers/dma/mv_xor.c
+@@ -1361,9 +1361,9 @@ static int mv_xor_probe(struct platform_device *pdev)
+ err_channel_add:
+ for (i = 0; i < MV_XOR_MAX_CHANNELS; i++)
+ if (xordev->channels[i]) {
++ mv_xor_channel_remove(xordev->channels[i]);
+ if (pdev->dev.of_node)
+ irq_dispose_mapping(xordev->channels[i]->irq);
+- mv_xor_channel_remove(xordev->channels[i]);
+ }
+
+ clk_disable_unprepare(xordev->clk);
+--
+1.7.10.4