aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorDaniel Hellstrom <daniel@gaisler.com>2011-01-14 03:02:38 +0000
committerDavid S. Miller <davem@davemloft.net>2011-01-14 12:45:52 -0800
commitbbe9e637330abe55442aebe799425e224086959f (patch)
tree3c8a574f01cda944e6664931476eec8e4101757d /drivers/net
parentad4650a89ac47bd153cbb76c3fd6eb1fa6f315b7 (diff)
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/greth.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/greth.c b/drivers/net/greth.c
index 1c2dbdb4363..b307696e0f6 100644
--- a/drivers/net/greth.c
+++ b/drivers/net/greth.c
@@ -356,6 +356,8 @@ static int greth_open(struct net_device *dev)
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);
@@ -371,7 +373,9 @@ static int greth_close(struct net_device *dev)
napi_disable(&greth->napi);
+ greth_disable_irqs(greth);
greth_disable_tx(greth);
+ greth_disable_rx(greth);
netif_stop_queue(dev);