[rb532] nuke empty directory
[openwrt/svn-archive/archive.git] / target / linux / rb532 / patches-2.6.27 / 009-korina_disable_napi_on_close_and_restart.patch
1 Without this the driver will crash when the NIC is being restarted.
2
3 Signed-off-by: Phil Sutter <n0-1@freewrt.org>
4 ---
5 drivers/net/korina.c | 4 ++++
6 1 files changed, 4 insertions(+), 0 deletions(-)
7
8 diff --git a/drivers/net/korina.c b/drivers/net/korina.c
9 index e30c2f4..65b8487 100644
10 --- a/drivers/net/korina.c
11 +++ b/drivers/net/korina.c
12 @@ -904,6 +904,8 @@ static int korina_restart(struct net_device *dev)
13
14 korina_free_ring(dev);
15
16 + napi_disable(&lp->napi);
17 +
18 ret = korina_init(dev);
19 if (ret < 0) {
20 printk(KERN_ERR DRV_NAME "%s: cannot restart device\n",
21 @@ -1070,6 +1072,8 @@ static int korina_close(struct net_device *dev)
22
23 korina_free_ring(dev);
24
25 + napi_disable(&lp->napi);
26 +
27 free_irq(lp->rx_irq, dev);
28 free_irq(lp->tx_irq, dev);
29 free_irq(lp->ovr_irq, dev);
30 --
31 1.5.6.4
32
33