Root/target/linux/leon/patches-2.6.36/019-greth_fix_open_close.patch

1From 6216bc809c5bdd586b14d096fbaf6dc25574b928 Mon Sep 17 00:00:00 2001
2From: Daniel Hellstrom <daniel@gaisler.com>
3Date: Wed, 1 Dec 2010 09:59:14 +0100
4Subject: [PATCH] GRETH: fix opening/closing
5
6When NAPI is disabled there is no point in having IRQs enabled, TX/RX
7should be off before clearing the TX/RX descriptor rings.
8
9Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
10---
11 drivers/net/greth.c | 4 ++++
12 1 files changed, 4 insertions(+), 0 deletions(-)
13
14--- a/drivers/net/greth.c
15+++ b/drivers/net/greth.c
16@@ -365,6 +365,8 @@ static int greth_open(struct net_device
17         dev_dbg(&dev->dev, " starting queue\n");
18     netif_start_queue(dev);
19 
20+ GRETH_REGSAVE(greth->regs->status, 0xFF);
21+
22     napi_enable(&greth->napi);
23 
24     greth_enable_irqs(greth);
25@@ -380,7 +382,9 @@ static int greth_close(struct net_device
26 
27     napi_disable(&greth->napi);
28 
29+ greth_disable_irqs(greth);
30     greth_disable_tx(greth);
31+ greth_disable_rx(greth);
32 
33     netif_stop_queue(dev);
34 
35

Archive Download this file



interactive