aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/forcedeth.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/forcedeth.c')
-rw-r--r--drivers/net/forcedeth.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 439f41338291..2f48fe9a29a7 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -3,8 +3,7 @@
3 * 3 *
4 * Note: This driver is a cleanroom reimplementation based on reverse 4 * Note: This driver is a cleanroom reimplementation based on reverse
5 * engineered documentation written by Carl-Daniel Hailfinger 5 * engineered documentation written by Carl-Daniel Hailfinger
6 * and Andrew de Quincey. It's neither supported nor endorsed 6 * and Andrew de Quincey.
7 * by NVIDIA Corp. Use at your own risk.
8 * 7 *
9 * NVIDIA, nForce and other NVIDIA marks are trademarks or registered 8 * NVIDIA, nForce and other NVIDIA marks are trademarks or registered
10 * trademarks of NVIDIA Corporation in the United States and other 9 * trademarks of NVIDIA Corporation in the United States and other
@@ -14,7 +13,7 @@
14 * Copyright (C) 2004 Andrew de Quincey (wol support) 13 * Copyright (C) 2004 Andrew de Quincey (wol support)
15 * Copyright (C) 2004 Carl-Daniel Hailfinger (invalid MAC handling, insane 14 * Copyright (C) 2004 Carl-Daniel Hailfinger (invalid MAC handling, insane
16 * IRQ rate fixes, bigendian fixes, cleanups, verification) 15 * IRQ rate fixes, bigendian fixes, cleanups, verification)
17 * Copyright (c) 2004 NVIDIA Corporation 16 * Copyright (c) 2004,5,6 NVIDIA Corporation
18 * 17 *
19 * This program is free software; you can redistribute it and/or modify 18 * This program is free software; you can redistribute it and/or modify
20 * it under the terms of the GNU General Public License as published by 19 * it under the terms of the GNU General Public License as published by
@@ -2576,14 +2575,15 @@ static int nv_napi_poll(struct net_device *dev, int *budget)
2576 int pkts, limit = min(*budget, dev->quota); 2575 int pkts, limit = min(*budget, dev->quota);
2577 struct fe_priv *np = netdev_priv(dev); 2576 struct fe_priv *np = netdev_priv(dev);
2578 u8 __iomem *base = get_hwbase(dev); 2577 u8 __iomem *base = get_hwbase(dev);
2578 unsigned long flags;
2579 2579
2580 pkts = nv_rx_process(dev, limit); 2580 pkts = nv_rx_process(dev, limit);
2581 2581
2582 if (nv_alloc_rx(dev)) { 2582 if (nv_alloc_rx(dev)) {
2583 spin_lock_irq(&np->lock); 2583 spin_lock_irqsave(&np->lock, flags);
2584 if (!np->in_shutdown) 2584 if (!np->in_shutdown)
2585 mod_timer(&np->oom_kick, jiffies + OOM_REFILL); 2585 mod_timer(&np->oom_kick, jiffies + OOM_REFILL);
2586 spin_unlock_irq(&np->lock); 2586 spin_unlock_irqrestore(&np->lock, flags);
2587 } 2587 }
2588 2588
2589 if (pkts < limit) { 2589 if (pkts < limit) {
@@ -2591,13 +2591,15 @@ static int nv_napi_poll(struct net_device *dev, int *budget)
2591 netif_rx_complete(dev); 2591 netif_rx_complete(dev);
2592 2592
2593 /* re-enable receive interrupts */ 2593 /* re-enable receive interrupts */
2594 spin_lock_irq(&np->lock); 2594 spin_lock_irqsave(&np->lock, flags);
2595
2595 np->irqmask |= NVREG_IRQ_RX_ALL; 2596 np->irqmask |= NVREG_IRQ_RX_ALL;
2596 if (np->msi_flags & NV_MSI_X_ENABLED) 2597 if (np->msi_flags & NV_MSI_X_ENABLED)
2597 writel(NVREG_IRQ_RX_ALL, base + NvRegIrqMask); 2598 writel(NVREG_IRQ_RX_ALL, base + NvRegIrqMask);
2598 else 2599 else
2599 writel(np->irqmask, base + NvRegIrqMask); 2600 writel(np->irqmask, base + NvRegIrqMask);
2600 spin_unlock_irq(&np->lock); 2601
2602 spin_unlock_irqrestore(&np->lock, flags);
2601 return 0; 2603 return 0;
2602 } else { 2604 } else {
2603 /* used up our quantum, so reschedule */ 2605 /* used up our quantum, so reschedule */