aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/leon/patches/019-greth_fix_open_close.patch
diff options
context:
space:
mode:
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-10-05 10:12:53 +0000
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-10-05 10:12:53 +0000
commit5c105d9f3fd086aff195d3849dcf847d6b0bd927 (patch)
tree1229a11f725bfa58aa7c57a76898553bb5f6654a /target/linux/leon/patches/019-greth_fix_open_close.patch
downloadopenwrt-5c105d9f3fd086aff195d3849dcf847d6b0bd927.tar.gz
openwrt-5c105d9f3fd086aff195d3849dcf847d6b0bd927.zip
branch Attitude Adjustment
git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@33625 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/leon/patches/019-greth_fix_open_close.patch')
-rw-r--r--target/linux/leon/patches/019-greth_fix_open_close.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/target/linux/leon/patches/019-greth_fix_open_close.patch b/target/linux/leon/patches/019-greth_fix_open_close.patch
new file mode 100644
index 000000000..fffb39133
--- /dev/null
+++ b/target/linux/leon/patches/019-greth_fix_open_close.patch
@@ -0,0 +1,34 @@
+From 6216bc809c5bdd586b14d096fbaf6dc25574b928 Mon Sep 17 00:00:00 2001
+From: Daniel Hellstrom <daniel@gaisler.com>
+Date: Wed, 1 Dec 2010 09:59:14 +0100
+Subject: [PATCH] GRETH: fix opening/closing
+
+When NAPI is disabled there is no point in having IRQs enabled, TX/RX
+should be off before clearing the TX/RX descriptor rings.
+
+Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
+---
+ drivers/net/greth.c | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+--- a/drivers/net/greth.c
++++ b/drivers/net/greth.c
+@@ -365,6 +365,8 @@ static int greth_open(struct net_device
+ dev_dbg(&dev->dev, " starting queue\n");
+ netif_start_queue(dev);
+
++ GRETH_REGSAVE(greth->regs->status, 0xFF);
++
+ napi_enable(&greth->napi);
+
+ greth_enable_irqs(greth);
+@@ -380,7 +382,9 @@ static int greth_close(struct net_device
+
+ napi_disable(&greth->napi);
+
++ greth_disable_irqs(greth);
+ greth_disable_tx(greth);
++ greth_disable_rx(greth);
+
+ netif_stop_queue(dev);
+