Commit bbe9e637 authored by Daniel Hellstrom's avatar Daniel Hellstrom Committed by David S. Miller

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: default avatarDaniel Hellstrom <daniel@gaisler.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ad4650a8
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment