aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/forcedeth.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.osdl.org>2006-12-29 13:03:54 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-29 13:03:54 -0500
commit6c722e90d7ede7db2d2b28a3cc69a8545db67ea1 (patch)
tree2473530190795c11f841db37b7d74df9bcc0416b /drivers/net/forcedeth.c
parent007fb598b4674de82492a9961e82826875012229 (diff)
parent81f4e6c190a0fa016fd7eecaf76a5f95d121afc2 (diff)
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (42 commits) r8169: extraneous Cmd{Tx/Rx}Enb write forcedeth: modified comment header NetXen: Reducing ring sizes for IOMMU issue. NetXen: Fix for PPC machines. NetXen: work queue fixes. NetXen: Link status message correction for quad port cards. NetXen: Multiple adapter fix. NetXen: Using correct CHECKSUM flag. NetXen: driver reload fix for newer firmware. NetXen: Adding new device ids. PHY probe not working properly for ibm_emac (PPC4xx) ep93xx: some minor cleanups to the ep93xx eth driver sky2: phy power down needs PCI config write enabled sky2: power management/MSI workaround sky2: dual port NAPI problem via-velocity uses INET interfaces e1000: Do not truncate TSO TCP header with 82544 workaround myri10ge: handle failures in suspend and resume myri10ge: no need to save MSI and PCIe state in the driver myri10ge: make msi configurable at runtime through sysfs ...
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 */