Skip to content

Commit

Permalink
GRETH: fix opening/closing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Hellstrom authored and David S. Miller committed Jan 14, 2011
1 parent ad4650a commit bbe9e63
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/greth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);

Expand Down

0 comments on commit bbe9e63

Please sign in to comment.