Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (36 commits)
  [ATM]: Check IP header validity in mpc_send_packet
  [IPV6]: IPV6_MULTICAST_IF setting is ignored on link-local connect()
  [CONNECTOR]: Don't touch queue dev after decrement of ref count.
  [SOCK]: Adds a rcu_dereference() in sk_filter
  [XFRM]: xfrm_algo_clone() allocates too much memory
  [FORCEDETH]: Fix reversing the MAC address on suspend.
  [NET]: mcs7830 passes msecs instead of jiffies to usb_control_msg
  [LRO] Fix lro_mgr->features checks
  [NET]: Clone the sk_buff 'iif' field in __skb_clone()
  [IPV4] ROUTE: ip_rt_dump() is unecessary slow
  [NET]: kaweth was forgotten in msec switchover of usb_start_wait_urb
  [NET] Intel ethernet drivers: update MAINTAINERS
  [NET]: Make ->poll() breakout consistent in Intel ethernet drivers.
  [NET]: Stop polling when napi_disable() is pending.
  [NET]: Fix drivers to handle napi_disable() disabling interrupts.
  [NETXEN]: Fix ->poll() done logic.
  mac80211: return an error when SIWRATE doesn't match any rate
  ssb: Fix probing of PCI cores if PCI and PCIE core is available
  [NET]: Do not check netif_running() and carrier state in ->poll()
  [NET]: Add NAPI_STATE_DISABLE.
  ...
  • Loading branch information
Linus Torvalds committed Jan 9, 2008
2 parents fcfd50a + 1c9b7aa commit fd0b45d
Show file tree
Hide file tree
Showing 53 changed files with 262 additions and 248 deletions.
1 change: 1 addition & 0 deletions Documentation/nfsroot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
this option.

off or none: don't use autoconfiguration
(do static IP assignment instead)
on or any: use any protocol available in the kernel
(default)
dhcp: use DHCP
Expand Down
18 changes: 8 additions & 10 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1984,29 +1984,27 @@ L: netdev@vger.kernel.org
S: Maintained

INTEL PRO/100 ETHERNET SUPPORT
P: John Ronciak
M: john.ronciak@intel.com
P: Auke Kok
M: auke-jan.h.kok@intel.com
P: Jesse Brandeburg
M: jesse.brandeburg@intel.com
P: Jeff Kirsher
M: jeffrey.t.kirsher@intel.com
P: Auke Kok
M: auke-jan.h.kok@intel.com
P: John Ronciak
M: john.ronciak@intel.com
L: e1000-devel@lists.sourceforge.net
W: http://sourceforge.net/projects/e1000/
S: Supported

INTEL PRO/1000 GIGABIT ETHERNET SUPPORT
P: Jeb Cramer
M: cramerj@intel.com
P: John Ronciak
M: john.ronciak@intel.com
P: Auke Kok
M: auke-jan.h.kok@intel.com
P: Jesse Brandeburg
M: jesse.brandeburg@intel.com
P: Jeff Kirsher
M: jeffrey.t.kirsher@intel.com
P: Auke Kok
M: auke-jan.h.kok@intel.com
P: John Ronciak
M: john.ronciak@intel.com
L: e1000-devel@lists.sourceforge.net
W: http://sourceforge.net/projects/e1000/
S: Supported
Expand Down
19 changes: 9 additions & 10 deletions drivers/atm/nicstar.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,14 +625,6 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev)
if (mac[i] == NULL)
nicstar_init_eprom(card->membase);

if (request_irq(pcidev->irq, &ns_irq_handler, IRQF_DISABLED | IRQF_SHARED, "nicstar", card) != 0)
{
printk("nicstar%d: can't allocate IRQ %d.\n", i, pcidev->irq);
error = 9;
ns_init_card_error(card, error);
return error;
}

/* Set the VPI/VCI MSb mask to zero so we can receive OAM cells */
writel(0x00000000, card->membase + VPM);

Expand Down Expand Up @@ -858,8 +850,6 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev)
card->iovpool.count++;
}

card->intcnt = 0;

/* Configure NICStAR */
if (card->rct_size == 4096)
ns_cfg_rctsize = NS_CFG_RCTSIZE_4096_ENTRIES;
Expand All @@ -868,6 +858,15 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev)

card->efbie = 1;

card->intcnt = 0;
if (request_irq(pcidev->irq, &ns_irq_handler, IRQF_DISABLED | IRQF_SHARED, "nicstar", card) != 0)
{
printk("nicstar%d: can't allocate IRQ %d.\n", i, pcidev->irq);
error = 9;
ns_init_card_error(card, error);
return error;
}

/* Register device */
card->atmdev = atm_dev_register("nicstar", &atm_ops, -1, NULL);
if (card->atmdev == NULL)
Expand Down
2 changes: 1 addition & 1 deletion drivers/connector/cn_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id
spin_unlock_bh(&dev->queue_lock);

if (found) {
atomic_dec(&dev->refcnt);
cn_queue_free_callback(cbq);
atomic_dec(&dev->refcnt);
return -EINVAL;
}

Expand Down
7 changes: 3 additions & 4 deletions drivers/net/e100.c
Original file line number Diff line number Diff line change
Expand Up @@ -1991,13 +1991,12 @@ static int e100_poll(struct napi_struct *napi, int budget)
struct nic *nic = container_of(napi, struct nic, napi);
struct net_device *netdev = nic->netdev;
unsigned int work_done = 0;
int tx_cleaned;

e100_rx_clean(nic, &work_done, budget);
tx_cleaned = e100_tx_clean(nic);
e100_tx_clean(nic);

/* If no Rx and Tx cleanup work was done, exit polling mode. */
if((!tx_cleaned && (work_done == 0)) || !netif_running(netdev)) {
/* If budget not fully consumed, exit the polling mode */
if (work_done < budget) {
netif_rx_complete(netdev, napi);
e100_enable_irq(nic);
}
Expand Down
16 changes: 5 additions & 11 deletions drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3919,32 +3919,26 @@ e1000_clean(struct napi_struct *napi, int budget)
{
struct e1000_adapter *adapter = container_of(napi, struct e1000_adapter, napi);
struct net_device *poll_dev = adapter->netdev;
int tx_cleaned = 0, work_done = 0;
int work_done = 0;

/* Must NOT use netdev_priv macro here. */
adapter = poll_dev->priv;

/* Keep link state information with original netdev */
if (!netif_carrier_ok(poll_dev))
goto quit_polling;

/* e1000_clean is called per-cpu. This lock protects
* tx_ring[0] from being cleaned by multiple cpus
* simultaneously. A failure obtaining the lock means
* tx_ring[0] is currently being cleaned anyway. */
if (spin_trylock(&adapter->tx_queue_lock)) {
tx_cleaned = e1000_clean_tx_irq(adapter,
&adapter->tx_ring[0]);
e1000_clean_tx_irq(adapter,
&adapter->tx_ring[0]);
spin_unlock(&adapter->tx_queue_lock);
}

adapter->clean_rx(adapter, &adapter->rx_ring[0],
&work_done, budget);

/* If no Tx and not enough Rx work done, exit the polling mode */
if ((!tx_cleaned && (work_done == 0)) ||
!netif_running(poll_dev)) {
quit_polling:
/* If budget not fully consumed, exit the polling mode */
if (work_done < budget) {
if (likely(adapter->itr_setting & 3))
e1000_set_itr(adapter);
netif_rx_complete(poll_dev, napi);
Expand Down
14 changes: 4 additions & 10 deletions drivers/net/e1000e/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1384,30 +1384,24 @@ static int e1000_clean(struct napi_struct *napi, int budget)
{
struct e1000_adapter *adapter = container_of(napi, struct e1000_adapter, napi);
struct net_device *poll_dev = adapter->netdev;
int tx_cleaned = 0, work_done = 0;
int work_done = 0;

/* Must NOT use netdev_priv macro here. */
adapter = poll_dev->priv;

/* Keep link state information with original netdev */
if (!netif_carrier_ok(poll_dev))
goto quit_polling;

/* e1000_clean is called per-cpu. This lock protects
* tx_ring from being cleaned by multiple cpus
* simultaneously. A failure obtaining the lock means
* tx_ring is currently being cleaned anyway. */
if (spin_trylock(&adapter->tx_queue_lock)) {
tx_cleaned = e1000_clean_tx_irq(adapter);
e1000_clean_tx_irq(adapter);
spin_unlock(&adapter->tx_queue_lock);
}

adapter->clean_rx(adapter, &work_done, budget);

/* If no Tx and not enough Rx work done, exit the polling mode */
if ((!tx_cleaned && (work_done < budget)) ||
!netif_running(poll_dev)) {
quit_polling:
/* If budget not fully consumed, exit the polling mode */
if (work_done < budget) {
if (adapter->itr_setting & 3)
e1000_set_itr(adapter);
netif_rx_complete(poll_dev, napi);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/epic100.c
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,7 @@ static int epic_poll(struct napi_struct *napi, int budget)

epic_rx_err(dev, ep);

if (netif_running(dev) && (work_done < budget)) {
if (work_done < budget) {
unsigned long flags;
int more;

Expand Down
5 changes: 0 additions & 5 deletions drivers/net/fec_8xx/fec_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,11 +476,6 @@ static int fec_enet_rx_common(struct fec_enet_private *ep,
__u16 pkt_len, sc;
int curidx;

if (fpi->use_napi) {
if (!netif_running(dev))
return 0;
}

/*
* First, grab all of the stats for the incoming packet.
* These get messed up if we get called due to a busy condition.
Expand Down
6 changes: 2 additions & 4 deletions drivers/net/forcedeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -5199,10 +5199,6 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
dev->dev_addr[3] = (np->orig_mac[0] >> 16) & 0xff;
dev->dev_addr[4] = (np->orig_mac[0] >> 8) & 0xff;
dev->dev_addr[5] = (np->orig_mac[0] >> 0) & 0xff;
/* set permanent address to be correct aswell */
np->orig_mac[0] = (dev->dev_addr[0] << 0) + (dev->dev_addr[1] << 8) +
(dev->dev_addr[2] << 16) + (dev->dev_addr[3] << 24);
np->orig_mac[1] = (dev->dev_addr[4] << 0) + (dev->dev_addr[5] << 8);
writel(txreg|NVREG_TRANSMITPOLL_MAC_ADDR_REV, base + NvRegTransmitPoll);
}
memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
Expand Down Expand Up @@ -5414,6 +5410,8 @@ static void __devexit nv_remove(struct pci_dev *pci_dev)
*/
writel(np->orig_mac[0], base + NvRegMacAddrA);
writel(np->orig_mac[1], base + NvRegMacAddrB);
writel(readl(base + NvRegTransmitPoll) & ~NVREG_TRANSMITPOLL_MAC_ADDR_REV,
base + NvRegTransmitPoll);

/* free all structures */
free_rings(dev);
Expand Down
3 changes: 0 additions & 3 deletions drivers/net/fs_enet/fs_enet-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ static int fs_enet_rx_napi(struct napi_struct *napi, int budget)
u16 pkt_len, sc;
int curidx;

if (!netif_running(dev))
return 0;

/*
* First, grab all of the stats for the incoming packet.
* These get messed up if we get called due to a busy condition.
Expand Down
7 changes: 3 additions & 4 deletions drivers/net/ixgb/ixgb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1787,14 +1787,13 @@ ixgb_clean(struct napi_struct *napi, int budget)
{
struct ixgb_adapter *adapter = container_of(napi, struct ixgb_adapter, napi);
struct net_device *netdev = adapter->netdev;
int tx_cleaned;
int work_done = 0;

tx_cleaned = ixgb_clean_tx_irq(adapter);
ixgb_clean_tx_irq(adapter);
ixgb_clean_rx_irq(adapter, &work_done, budget);

/* if no Tx and not enough Rx work done, exit the polling mode */
if((!tx_cleaned && (work_done == 0)) || !netif_running(netdev)) {
/* If budget not fully consumed, exit the polling mode */
if (work_done < budget) {
netif_rx_complete(netdev, napi);
ixgb_irq_enable(adapter);
}
Expand Down
14 changes: 4 additions & 10 deletions drivers/net/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1468,21 +1468,15 @@ static int ixgbe_clean(struct napi_struct *napi, int budget)
struct ixgbe_adapter *adapter = container_of(napi,
struct ixgbe_adapter, napi);
struct net_device *netdev = adapter->netdev;
int tx_cleaned = 0, work_done = 0;

/* Keep link state information with original netdev */
if (!netif_carrier_ok(adapter->netdev))
goto quit_polling;
int work_done = 0;

/* In non-MSIX case, there is no multi-Tx/Rx queue */
tx_cleaned = ixgbe_clean_tx_irq(adapter, adapter->tx_ring);
ixgbe_clean_tx_irq(adapter, adapter->tx_ring);
ixgbe_clean_rx_irq(adapter, &adapter->rx_ring[0], &work_done,
budget);

/* If no Tx and not enough Rx work done, exit the polling mode */
if ((!tx_cleaned && (work_done < budget)) ||
!netif_running(adapter->netdev)) {
quit_polling:
/* If budget not fully consumed, exit the polling mode */
if (work_done < budget) {
netif_rx_complete(netdev, napi);
ixgbe_irq_enable(adapter);
}
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/ixp2000/ixpdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ static int ixpdev_poll(struct napi_struct *napi, int budget)
struct net_device *dev = ip->dev;
int rx;

/* @@@ Have to stop polling when nds[0] is administratively
* downed while we are polling. */
rx = 0;
do {
ixp2000_reg_write(IXP2000_IRQ_THD_RAW_STATUS_A_0, 0x00ff);
Expand Down
10 changes: 7 additions & 3 deletions drivers/net/meth.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,14 @@ static inline void load_eaddr(struct net_device *dev)
{
int i;
DECLARE_MAC_BUF(mac);
u64 macaddr;

for (i = 0; i < 6; i++)
dev->dev_addr[i] = o2meth_eaddr[i];
DPRINTK("Loading MAC Address: %s\n", print_mac(mac, dev->dev_addr));
mace->eth.mac_addr = (*(unsigned long*)o2meth_eaddr) >> 16;
macaddr = 0;
for (i = 0; i < 6; i++)
macaddr |= dev->dev_addr[i] << ((5 - i) * 8);

mace->eth.mac_addr = macaddr;
}

/*
Expand Down Expand Up @@ -794,6 +797,7 @@ static int __init meth_probe(struct platform_device *pdev)
#endif
dev->irq = MACE_ETHERNET_IRQ;
dev->base_addr = (unsigned long)&mace->eth;
memcpy(dev->dev_addr, o2meth_eaddr, 6);

priv = netdev_priv(dev);
spin_lock_init(&priv->meth_lock);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/myri10ge/myri10ge.c
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,7 @@ static int myri10ge_poll(struct napi_struct *napi, int budget)
/* process as many rx events as NAPI will allow */
work_done = myri10ge_clean_rx_done(mgp, budget);

if (work_done < budget || !netif_running(netdev)) {
if (work_done < budget) {
netif_rx_complete(netdev, napi);
put_be32(htonl(3), mgp->irq_claim);
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/natsemi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2266,7 +2266,7 @@ static int natsemi_poll(struct napi_struct *napi, int budget)
/* Reenable interrupts providing nothing is trying to shut
* the chip down. */
spin_lock(&np->lock);
if (!np->hands_off && netif_running(dev))
if (!np->hands_off)
natsemi_irq_enable(dev);
spin_unlock(&np->lock);

Expand Down
4 changes: 2 additions & 2 deletions drivers/net/netx-eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ static void netx_eth_receive(struct net_device *ndev)
ndev->last_rx = jiffies;
skb->protocol = eth_type_trans(skb, ndev);
netif_rx(skb);
dev->stats.rx_packets++;
dev->stats.rx_bytes += len;
ndev->stats.rx_packets++;
ndev->stats.rx_bytes += len;
}

static irqreturn_t
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/netxen/netxen_nic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,7 @@ static int netxen_nic_poll(struct napi_struct *napi, int budget)
budget / MAX_RCV_CTX);
}

if (work_done >= budget && netxen_nic_rx_has_work(adapter) != 0)
if (work_done >= budget)
done = 0;

if (netxen_process_cmd_ring((unsigned long)adapter) == 0)
Expand Down
Loading

0 comments on commit fd0b45d

Please sign in to comment.