aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/sunxi/patches-3.12/200-emac-add-missing-free_irq.patch
diff options
context:
space:
mode:
authorZoltan Herpai <wigyori@uid0.hu>2014-01-06 21:51:39 +0000
committerZoltan Herpai <wigyori@uid0.hu>2014-01-06 21:51:39 +0000
commitba05c97e5e3ee3b0dd31b724c9053c06de99de34 (patch)
tree2a2165288eb7a080d2bcf1b27b9fe80d054b4c13 /target/linux/sunxi/patches-3.12/200-emac-add-missing-free_irq.patch
parente0027ed4abef834297a54d95309688bc22f4d77c (diff)
downloadupstream-ba05c97e5e3ee3b0dd31b724c9053c06de99de34.tar.gz
upstream-ba05c97e5e3ee3b0dd31b724c9053c06de99de34.tar.bz2
upstream-ba05c97e5e3ee3b0dd31b724c9053c06de99de34.zip
sunxi: various fixes - DT: update USB vbus from 3.3v to 5v - emac: add missing free_irq - DT: add emac aliases - DT: fix interrupts on A20 - modules: add watchdog module - don't compile in mac80211 - don't compile in usbnet
Thanks to Hans de Goede, Zalan Blenessy et al. Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu> SVN-Revision: 39204
Diffstat (limited to 'target/linux/sunxi/patches-3.12/200-emac-add-missing-free_irq.patch')
-rw-r--r--target/linux/sunxi/patches-3.12/200-emac-add-missing-free_irq.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/target/linux/sunxi/patches-3.12/200-emac-add-missing-free_irq.patch b/target/linux/sunxi/patches-3.12/200-emac-add-missing-free_irq.patch
new file mode 100644
index 0000000000..4b1be39281
--- /dev/null
+++ b/target/linux/sunxi/patches-3.12/200-emac-add-missing-free_irq.patch
@@ -0,0 +1,46 @@
+From e9c56f8d2f851fb6d6ce6794c0f5463b862a878e Mon Sep 17 00:00:00 2001
+From: Maxime Ripard <maxime.ripard@free-electrons.com>
+Date: Tue, 10 Dec 2013 19:40:43 +0100
+Subject: [PATCH] net: allwinner: emac: Add missing free_irq
+
+The sun4i-emac driver uses devm_request_irq at .ndo_open time, but relies on
+the managed device mechanism to actually free it. This causes an issue whenever
+someone wants to restart the interface, the interrupt still being held, and not
+yet released.
+
+Fall back to using the regular request_irq at .ndo_open time, and introduce a
+free_irq during .ndo_stop.
+
+Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
+Cc: stable@vger.kernel.org # 3.11+
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ drivers/net/ethernet/allwinner/sun4i-emac.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/ethernet/allwinner/sun4i-emac.c b/drivers/net/ethernet/allwinner/sun4i-emac.c
+index 50b853a..46dfb13 100644
+--- a/drivers/net/ethernet/allwinner/sun4i-emac.c
++++ b/drivers/net/ethernet/allwinner/sun4i-emac.c
+@@ -717,8 +717,7 @@ static int emac_open(struct net_device *dev)
+ if (netif_msg_ifup(db))
+ dev_dbg(db->dev, "enabling %s\n", dev->name);
+
+- if (devm_request_irq(db->dev, dev->irq, &emac_interrupt,
+- 0, dev->name, dev))
++ if (request_irq(dev->irq, &emac_interrupt, 0, dev->name, dev))
+ return -EAGAIN;
+
+ /* Initialize EMAC board */
+@@ -774,6 +773,8 @@ static int emac_stop(struct net_device *ndev)
+
+ emac_shutdown(ndev);
+
++ free_irq(ndev->irq, ndev);
++
+ return 0;
+ }
+
+--
+1.8.5.1
+