aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-01-09 11:05:12 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-01-09 11:05:12 -0500
commitfd0b45dfd1858c6b49d06355a460bcf36d654c06 (patch)
tree85386a76355b398b7f452b737af4ab48f116677a /drivers/net
parentfcfd50afb6e94c8cf121ca4e7e3e7166bae7c6aa (diff)
parent1c9b7aa1eb40ab708ef3242f74b9a61487623168 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* 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. ...
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/e100.c7
-rw-r--r--drivers/net/e1000/e1000_main.c16
-rw-r--r--drivers/net/e1000e/netdev.c14
-rw-r--r--drivers/net/epic100.c2
-rw-r--r--drivers/net/fec_8xx/fec_main.c5
-rw-r--r--drivers/net/forcedeth.c6
-rw-r--r--drivers/net/fs_enet/fs_enet-main.c3
-rw-r--r--drivers/net/ixgb/ixgb_main.c7
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c14
-rw-r--r--drivers/net/ixp2000/ixpdev.c2
-rw-r--r--drivers/net/meth.c10
-rw-r--r--drivers/net/myri10ge/myri10ge.c2
-rw-r--r--drivers/net/natsemi.c2
-rw-r--r--drivers/net/netx-eth.c4
-rw-r--r--drivers/net/netxen/netxen_nic_main.c2
-rw-r--r--drivers/net/niu.c43
-rw-r--r--drivers/net/pcnet32.c5
-rw-r--r--drivers/net/qla3xxx.c7
-rw-r--r--drivers/net/r8169.c2
-rw-r--r--drivers/net/s2io.c3
-rw-r--r--drivers/net/sky2.c3
-rw-r--r--drivers/net/tulip/interrupt.c8
-rw-r--r--drivers/net/usb/kaweth.c2
-rw-r--r--drivers/net/usb/mcs7830.c4
-rw-r--r--drivers/net/wireless/b43/b43.h2
-rw-r--r--drivers/net/wireless/b43/main.h20
-rw-r--r--drivers/net/wireless/b43/xmit.c27
-rw-r--r--drivers/net/wireless/b43/xmit.h65
-rw-r--r--drivers/net/xen-netfront.c5
29 files changed, 140 insertions, 152 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 2b06e4b4dabc..b87402bc8308 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -1991,13 +1991,12 @@ static int e100_poll(struct napi_struct *napi, int budget)
1991 struct nic *nic = container_of(napi, struct nic, napi); 1991 struct nic *nic = container_of(napi, struct nic, napi);
1992 struct net_device *netdev = nic->netdev; 1992 struct net_device *netdev = nic->netdev;
1993 unsigned int work_done = 0; 1993 unsigned int work_done = 0;
1994 int tx_cleaned;
1995 1994
1996 e100_rx_clean(nic, &work_done, budget); 1995 e100_rx_clean(nic, &work_done, budget);
1997 tx_cleaned = e100_tx_clean(nic); 1996 e100_tx_clean(nic);
1998 1997
1999 /* If no Rx and Tx cleanup work was done, exit polling mode. */ 1998 /* If budget not fully consumed, exit the polling mode */
2000 if((!tx_cleaned && (work_done == 0)) || !netif_running(netdev)) { 1999 if (work_done < budget) {
2001 netif_rx_complete(netdev, napi); 2000 netif_rx_complete(netdev, napi);
2002 e100_enable_irq(nic); 2001 e100_enable_irq(nic);
2003 } 2002 }
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 4f37506ad374..13d57b0a88fa 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -3919,32 +3919,26 @@ e1000_clean(struct napi_struct *napi, int budget)
3919{ 3919{
3920 struct e1000_adapter *adapter = container_of(napi, struct e1000_adapter, napi); 3920 struct e1000_adapter *adapter = container_of(napi, struct e1000_adapter, napi);
3921 struct net_device *poll_dev = adapter->netdev; 3921 struct net_device *poll_dev = adapter->netdev;
3922 int tx_cleaned = 0, work_done = 0; 3922 int work_done = 0;
3923 3923
3924 /* Must NOT use netdev_priv macro here. */ 3924 /* Must NOT use netdev_priv macro here. */
3925 adapter = poll_dev->priv; 3925 adapter = poll_dev->priv;
3926 3926
3927 /* Keep link state information with original netdev */
3928 if (!netif_carrier_ok(poll_dev))
3929 goto quit_polling;
3930
3931 /* e1000_clean is called per-cpu. This lock protects 3927 /* e1000_clean is called per-cpu. This lock protects
3932 * tx_ring[0] from being cleaned by multiple cpus 3928 * tx_ring[0] from being cleaned by multiple cpus
3933 * simultaneously. A failure obtaining the lock means 3929 * simultaneously. A failure obtaining the lock means
3934 * tx_ring[0] is currently being cleaned anyway. */ 3930 * tx_ring[0] is currently being cleaned anyway. */
3935 if (spin_trylock(&adapter->tx_queue_lock)) { 3931 if (spin_trylock(&adapter->tx_queue_lock)) {
3936 tx_cleaned = e1000_clean_tx_irq(adapter, 3932 e1000_clean_tx_irq(adapter,
3937 &adapter->tx_ring[0]); 3933 &adapter->tx_ring[0]);
3938 spin_unlock(&adapter->tx_queue_lock); 3934 spin_unlock(&adapter->tx_queue_lock);
3939 } 3935 }
3940 3936
3941 adapter->clean_rx(adapter, &adapter->rx_ring[0], 3937 adapter->clean_rx(adapter, &adapter->rx_ring[0],
3942 &work_done, budget); 3938 &work_done, budget);
3943 3939
3944 /* If no Tx and not enough Rx work done, exit the polling mode */ 3940 /* If budget not fully consumed, exit the polling mode */
3945 if ((!tx_cleaned && (work_done == 0)) || 3941 if (work_done < budget) {
3946 !netif_running(poll_dev)) {
3947quit_polling:
3948 if (likely(adapter->itr_setting & 3)) 3942 if (likely(adapter->itr_setting & 3))
3949 e1000_set_itr(adapter); 3943 e1000_set_itr(adapter);
3950 netif_rx_complete(poll_dev, napi); 3944 netif_rx_complete(poll_dev, napi);
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 4fd2e23720b6..4a6fc7453776 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -1384,30 +1384,24 @@ static int e1000_clean(struct napi_struct *napi, int budget)
1384{ 1384{
1385 struct e1000_adapter *adapter = container_of(napi, struct e1000_adapter, napi); 1385 struct e1000_adapter *adapter = container_of(napi, struct e1000_adapter, napi);
1386 struct net_device *poll_dev = adapter->netdev; 1386 struct net_device *poll_dev = adapter->netdev;
1387 int tx_cleaned = 0, work_done = 0; 1387 int work_done = 0;
1388 1388
1389 /* Must NOT use netdev_priv macro here. */ 1389 /* Must NOT use netdev_priv macro here. */
1390 adapter = poll_dev->priv; 1390 adapter = poll_dev->priv;
1391 1391
1392 /* Keep link state information with original netdev */
1393 if (!netif_carrier_ok(poll_dev))
1394 goto quit_polling;
1395
1396 /* e1000_clean is called per-cpu. This lock protects 1392 /* e1000_clean is called per-cpu. This lock protects
1397 * tx_ring from being cleaned by multiple cpus 1393 * tx_ring from being cleaned by multiple cpus
1398 * simultaneously. A failure obtaining the lock means 1394 * simultaneously. A failure obtaining the lock means
1399 * tx_ring is currently being cleaned anyway. */ 1395 * tx_ring is currently being cleaned anyway. */
1400 if (spin_trylock(&adapter->tx_queue_lock)) { 1396 if (spin_trylock(&adapter->tx_queue_lock)) {
1401 tx_cleaned = e1000_clean_tx_irq(adapter); 1397 e1000_clean_tx_irq(adapter);
1402 spin_unlock(&adapter->tx_queue_lock); 1398 spin_unlock(&adapter->tx_queue_lock);
1403 } 1399 }
1404 1400
1405 adapter->clean_rx(adapter, &work_done, budget); 1401 adapter->clean_rx(adapter, &work_done, budget);
1406 1402
1407 /* If no Tx and not enough Rx work done, exit the polling mode */ 1403 /* If budget not fully consumed, exit the polling mode */
1408 if ((!tx_cleaned && (work_done < budget)) || 1404 if (work_done < budget) {
1409 !netif_running(poll_dev)) {
1410quit_polling:
1411 if (adapter->itr_setting & 3) 1405 if (adapter->itr_setting & 3)
1412 e1000_set_itr(adapter); 1406 e1000_set_itr(adapter);
1413 netif_rx_complete(poll_dev, napi); 1407 netif_rx_complete(poll_dev, napi);
diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c
index ecdd3fc8d70c..0b365b8d947b 100644
--- a/drivers/net/epic100.c
+++ b/drivers/net/epic100.c
@@ -1273,7 +1273,7 @@ rx_action:
1273 1273
1274 epic_rx_err(dev, ep); 1274 epic_rx_err(dev, ep);
1275 1275
1276 if (netif_running(dev) && (work_done < budget)) { 1276 if (work_done < budget) {
1277 unsigned long flags; 1277 unsigned long flags;
1278 int more; 1278 int more;
1279 1279
diff --git a/drivers/net/fec_8xx/fec_main.c b/drivers/net/fec_8xx/fec_main.c
index 8d2904fa5789..ab9637ab3a8d 100644
--- a/drivers/net/fec_8xx/fec_main.c
+++ b/drivers/net/fec_8xx/fec_main.c
@@ -476,11 +476,6 @@ static int fec_enet_rx_common(struct fec_enet_private *ep,
476 __u16 pkt_len, sc; 476 __u16 pkt_len, sc;
477 int curidx; 477 int curidx;
478 478
479 if (fpi->use_napi) {
480 if (!netif_running(dev))
481 return 0;
482 }
483
484 /* 479 /*
485 * First, grab all of the stats for the incoming packet. 480 * First, grab all of the stats for the incoming packet.
486 * These get messed up if we get called due to a busy condition. 481 * These get messed up if we get called due to a busy condition.
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index a96583cceb5e..f84c752997a4 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -5199,10 +5199,6 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
5199 dev->dev_addr[3] = (np->orig_mac[0] >> 16) & 0xff; 5199 dev->dev_addr[3] = (np->orig_mac[0] >> 16) & 0xff;
5200 dev->dev_addr[4] = (np->orig_mac[0] >> 8) & 0xff; 5200 dev->dev_addr[4] = (np->orig_mac[0] >> 8) & 0xff;
5201 dev->dev_addr[5] = (np->orig_mac[0] >> 0) & 0xff; 5201 dev->dev_addr[5] = (np->orig_mac[0] >> 0) & 0xff;
5202 /* set permanent address to be correct aswell */
5203 np->orig_mac[0] = (dev->dev_addr[0] << 0) + (dev->dev_addr[1] << 8) +
5204 (dev->dev_addr[2] << 16) + (dev->dev_addr[3] << 24);
5205 np->orig_mac[1] = (dev->dev_addr[4] << 0) + (dev->dev_addr[5] << 8);
5206 writel(txreg|NVREG_TRANSMITPOLL_MAC_ADDR_REV, base + NvRegTransmitPoll); 5202 writel(txreg|NVREG_TRANSMITPOLL_MAC_ADDR_REV, base + NvRegTransmitPoll);
5207 } 5203 }
5208 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); 5204 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
@@ -5414,6 +5410,8 @@ static void __devexit nv_remove(struct pci_dev *pci_dev)
5414 */ 5410 */
5415 writel(np->orig_mac[0], base + NvRegMacAddrA); 5411 writel(np->orig_mac[0], base + NvRegMacAddrA);
5416 writel(np->orig_mac[1], base + NvRegMacAddrB); 5412 writel(np->orig_mac[1], base + NvRegMacAddrB);
5413 writel(readl(base + NvRegTransmitPoll) & ~NVREG_TRANSMITPOLL_MAC_ADDR_REV,
5414 base + NvRegTransmitPoll);
5417 5415
5418 /* free all structures */ 5416 /* free all structures */
5419 free_rings(dev); 5417 free_rings(dev);
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
index f2a4d399a6e5..3e1a57a42f11 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -96,9 +96,6 @@ static int fs_enet_rx_napi(struct napi_struct *napi, int budget)
96 u16 pkt_len, sc; 96 u16 pkt_len, sc;
97 int curidx; 97 int curidx;
98 98
99 if (!netif_running(dev))
100 return 0;
101
102 /* 99 /*
103 * First, grab all of the stats for the incoming packet. 100 * First, grab all of the stats for the incoming packet.
104 * These get messed up if we get called due to a busy condition. 101 * These get messed up if we get called due to a busy condition.
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index bf9085fe035a..d2fb88d5cda2 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -1787,14 +1787,13 @@ ixgb_clean(struct napi_struct *napi, int budget)
1787{ 1787{
1788 struct ixgb_adapter *adapter = container_of(napi, struct ixgb_adapter, napi); 1788 struct ixgb_adapter *adapter = container_of(napi, struct ixgb_adapter, napi);
1789 struct net_device *netdev = adapter->netdev; 1789 struct net_device *netdev = adapter->netdev;
1790 int tx_cleaned;
1791 int work_done = 0; 1790 int work_done = 0;
1792 1791
1793 tx_cleaned = ixgb_clean_tx_irq(adapter); 1792 ixgb_clean_tx_irq(adapter);
1794 ixgb_clean_rx_irq(adapter, &work_done, budget); 1793 ixgb_clean_rx_irq(adapter, &work_done, budget);
1795 1794
1796 /* if no Tx and not enough Rx work done, exit the polling mode */ 1795 /* If budget not fully consumed, exit the polling mode */
1797 if((!tx_cleaned && (work_done == 0)) || !netif_running(netdev)) { 1796 if (work_done < budget) {
1798 netif_rx_complete(netdev, napi); 1797 netif_rx_complete(netdev, napi);
1799 ixgb_irq_enable(adapter); 1798 ixgb_irq_enable(adapter);
1800 } 1799 }
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 00bc525c6560..a56491617661 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -1468,21 +1468,15 @@ static int ixgbe_clean(struct napi_struct *napi, int budget)
1468 struct ixgbe_adapter *adapter = container_of(napi, 1468 struct ixgbe_adapter *adapter = container_of(napi,
1469 struct ixgbe_adapter, napi); 1469 struct ixgbe_adapter, napi);
1470 struct net_device *netdev = adapter->netdev; 1470 struct net_device *netdev = adapter->netdev;
1471 int tx_cleaned = 0, work_done = 0; 1471 int work_done = 0;
1472
1473 /* Keep link state information with original netdev */
1474 if (!netif_carrier_ok(adapter->netdev))
1475 goto quit_polling;
1476 1472
1477 /* In non-MSIX case, there is no multi-Tx/Rx queue */ 1473 /* In non-MSIX case, there is no multi-Tx/Rx queue */
1478 tx_cleaned = ixgbe_clean_tx_irq(adapter, adapter->tx_ring); 1474 ixgbe_clean_tx_irq(adapter, adapter->tx_ring);
1479 ixgbe_clean_rx_irq(adapter, &adapter->rx_ring[0], &work_done, 1475 ixgbe_clean_rx_irq(adapter, &adapter->rx_ring[0], &work_done,
1480 budget); 1476 budget);
1481 1477
1482 /* If no Tx and not enough Rx work done, exit the polling mode */ 1478 /* If budget not fully consumed, exit the polling mode */
1483 if ((!tx_cleaned && (work_done < budget)) || 1479 if (work_done < budget) {
1484 !netif_running(adapter->netdev)) {
1485quit_polling:
1486 netif_rx_complete(netdev, napi); 1480 netif_rx_complete(netdev, napi);
1487 ixgbe_irq_enable(adapter); 1481 ixgbe_irq_enable(adapter);
1488 } 1482 }
diff --git a/drivers/net/ixp2000/ixpdev.c b/drivers/net/ixp2000/ixpdev.c
index 6c0dd49149d0..484cb2ba717f 100644
--- a/drivers/net/ixp2000/ixpdev.c
+++ b/drivers/net/ixp2000/ixpdev.c
@@ -135,8 +135,6 @@ static int ixpdev_poll(struct napi_struct *napi, int budget)
135 struct net_device *dev = ip->dev; 135 struct net_device *dev = ip->dev;
136 int rx; 136 int rx;
137 137
138 /* @@@ Have to stop polling when nds[0] is administratively
139 * downed while we are polling. */
140 rx = 0; 138 rx = 0;
141 do { 139 do {
142 ixp2000_reg_write(IXP2000_IRQ_THD_RAW_STATUS_A_0, 0x00ff); 140 ixp2000_reg_write(IXP2000_IRQ_THD_RAW_STATUS_A_0, 0x00ff);
diff --git a/drivers/net/meth.c b/drivers/net/meth.c
index 0c89b028a80c..cdaa8fc21809 100644
--- a/drivers/net/meth.c
+++ b/drivers/net/meth.c
@@ -95,11 +95,14 @@ static inline void load_eaddr(struct net_device *dev)
95{ 95{
96 int i; 96 int i;
97 DECLARE_MAC_BUF(mac); 97 DECLARE_MAC_BUF(mac);
98 u64 macaddr;
98 99
99 for (i = 0; i < 6; i++)
100 dev->dev_addr[i] = o2meth_eaddr[i];
101 DPRINTK("Loading MAC Address: %s\n", print_mac(mac, dev->dev_addr)); 100 DPRINTK("Loading MAC Address: %s\n", print_mac(mac, dev->dev_addr));
102 mace->eth.mac_addr = (*(unsigned long*)o2meth_eaddr) >> 16; 101 macaddr = 0;
102 for (i = 0; i < 6; i++)
103 macaddr |= dev->dev_addr[i] << ((5 - i) * 8);
104
105 mace->eth.mac_addr = macaddr;
103} 106}
104 107
105/* 108/*
@@ -794,6 +797,7 @@ static int __init meth_probe(struct platform_device *pdev)
794#endif 797#endif
795 dev->irq = MACE_ETHERNET_IRQ; 798 dev->irq = MACE_ETHERNET_IRQ;
796 dev->base_addr = (unsigned long)&mace->eth; 799 dev->base_addr = (unsigned long)&mace->eth;
800 memcpy(dev->dev_addr, o2meth_eaddr, 6);
797 801
798 priv = netdev_priv(dev); 802 priv = netdev_priv(dev);
799 spin_lock_init(&priv->meth_lock); 803 spin_lock_init(&priv->meth_lock);
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index 8def8657251f..c90958f6d3fe 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -1239,7 +1239,7 @@ static int myri10ge_poll(struct napi_struct *napi, int budget)
1239 /* process as many rx events as NAPI will allow */ 1239 /* process as many rx events as NAPI will allow */
1240 work_done = myri10ge_clean_rx_done(mgp, budget); 1240 work_done = myri10ge_clean_rx_done(mgp, budget);
1241 1241
1242 if (work_done < budget || !netif_running(netdev)) { 1242 if (work_done < budget) {
1243 netif_rx_complete(netdev, napi); 1243 netif_rx_complete(netdev, napi);
1244 put_be32(htonl(3), mgp->irq_claim); 1244 put_be32(htonl(3), mgp->irq_claim);
1245 } 1245 }
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index 87cde062fd63..c329a4f5840c 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -2266,7 +2266,7 @@ static int natsemi_poll(struct napi_struct *napi, int budget)
2266 /* Reenable interrupts providing nothing is trying to shut 2266 /* Reenable interrupts providing nothing is trying to shut
2267 * the chip down. */ 2267 * the chip down. */
2268 spin_lock(&np->lock); 2268 spin_lock(&np->lock);
2269 if (!np->hands_off && netif_running(dev)) 2269 if (!np->hands_off)
2270 natsemi_irq_enable(dev); 2270 natsemi_irq_enable(dev);
2271 spin_unlock(&np->lock); 2271 spin_unlock(&np->lock);
2272 2272
diff --git a/drivers/net/netx-eth.c b/drivers/net/netx-eth.c
index 5267e031daa0..78d34af13a1c 100644
--- a/drivers/net/netx-eth.c
+++ b/drivers/net/netx-eth.c
@@ -169,8 +169,8 @@ static void netx_eth_receive(struct net_device *ndev)
169 ndev->last_rx = jiffies; 169 ndev->last_rx = jiffies;
170 skb->protocol = eth_type_trans(skb, ndev); 170 skb->protocol = eth_type_trans(skb, ndev);
171 netif_rx(skb); 171 netif_rx(skb);
172 dev->stats.rx_packets++; 172 ndev->stats.rx_packets++;
173 dev->stats.rx_bytes += len; 173 ndev->stats.rx_bytes += len;
174} 174}
175 175
176static irqreturn_t 176static irqreturn_t
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index a80f0cd6b528..454226f7baa8 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -1321,7 +1321,7 @@ static int netxen_nic_poll(struct napi_struct *napi, int budget)
1321 budget / MAX_RCV_CTX); 1321 budget / MAX_RCV_CTX);
1322 } 1322 }
1323 1323
1324 if (work_done >= budget && netxen_nic_rx_has_work(adapter) != 0) 1324 if (work_done >= budget)
1325 done = 0; 1325 done = 0;
1326 1326
1327 if (netxen_process_cmd_ring((unsigned long)adapter) == 0) 1327 if (netxen_process_cmd_ring((unsigned long)adapter) == 0)
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index abfc61c3a38c..9a0c6d3adfe9 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -33,8 +33,8 @@
33 33
34#define DRV_MODULE_NAME "niu" 34#define DRV_MODULE_NAME "niu"
35#define PFX DRV_MODULE_NAME ": " 35#define PFX DRV_MODULE_NAME ": "
36#define DRV_MODULE_VERSION "0.5" 36#define DRV_MODULE_VERSION "0.6"
37#define DRV_MODULE_RELDATE "October 5, 2007" 37#define DRV_MODULE_RELDATE "January 5, 2008"
38 38
39static char version[] __devinitdata = 39static char version[] __devinitdata =
40 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 40 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
@@ -2241,6 +2241,8 @@ static int niu_process_rx_pkt(struct niu *np, struct rx_ring_info *rp)
2241 skb->protocol = eth_type_trans(skb, np->dev); 2241 skb->protocol = eth_type_trans(skb, np->dev);
2242 netif_receive_skb(skb); 2242 netif_receive_skb(skb);
2243 2243
2244 np->dev->last_rx = jiffies;
2245
2244 return num_rcr; 2246 return num_rcr;
2245} 2247}
2246 2248
@@ -2508,15 +2510,19 @@ static int niu_rx_error(struct niu *np, struct rx_ring_info *rp)
2508 u64 stat = nr64(RX_DMA_CTL_STAT(rp->rx_channel)); 2510 u64 stat = nr64(RX_DMA_CTL_STAT(rp->rx_channel));
2509 int err = 0; 2511 int err = 0;
2510 2512
2511 dev_err(np->device, PFX "%s: RX channel %u error, stat[%llx]\n",
2512 np->dev->name, rp->rx_channel, (unsigned long long) stat);
2513
2514 niu_log_rxchan_errors(np, rp, stat);
2515 2513
2516 if (stat & (RX_DMA_CTL_STAT_CHAN_FATAL | 2514 if (stat & (RX_DMA_CTL_STAT_CHAN_FATAL |
2517 RX_DMA_CTL_STAT_PORT_FATAL)) 2515 RX_DMA_CTL_STAT_PORT_FATAL))
2518 err = -EINVAL; 2516 err = -EINVAL;
2519 2517
2518 if (err) {
2519 dev_err(np->device, PFX "%s: RX channel %u error, stat[%llx]\n",
2520 np->dev->name, rp->rx_channel,
2521 (unsigned long long) stat);
2522
2523 niu_log_rxchan_errors(np, rp, stat);
2524 }
2525
2520 nw64(RX_DMA_CTL_STAT(rp->rx_channel), 2526 nw64(RX_DMA_CTL_STAT(rp->rx_channel),
2521 stat & RX_DMA_CTL_WRITE_CLEAR_ERRS); 2527 stat & RX_DMA_CTL_WRITE_CLEAR_ERRS);
2522 2528
@@ -2749,13 +2755,16 @@ static int niu_device_error(struct niu *np)
2749 return -ENODEV; 2755 return -ENODEV;
2750} 2756}
2751 2757
2752static int niu_slowpath_interrupt(struct niu *np, struct niu_ldg *lp) 2758static int niu_slowpath_interrupt(struct niu *np, struct niu_ldg *lp,
2759 u64 v0, u64 v1, u64 v2)
2753{ 2760{
2754 u64 v0 = lp->v0; 2761
2755 u64 v1 = lp->v1;
2756 u64 v2 = lp->v2;
2757 int i, err = 0; 2762 int i, err = 0;
2758 2763
2764 lp->v0 = v0;
2765 lp->v1 = v1;
2766 lp->v2 = v2;
2767
2759 if (v1 & 0x00000000ffffffffULL) { 2768 if (v1 & 0x00000000ffffffffULL) {
2760 u32 rx_vec = (v1 & 0xffffffff); 2769 u32 rx_vec = (v1 & 0xffffffff);
2761 2770
@@ -2764,8 +2773,13 @@ static int niu_slowpath_interrupt(struct niu *np, struct niu_ldg *lp)
2764 2773
2765 if (rx_vec & (1 << rp->rx_channel)) { 2774 if (rx_vec & (1 << rp->rx_channel)) {
2766 int r = niu_rx_error(np, rp); 2775 int r = niu_rx_error(np, rp);
2767 if (r) 2776 if (r) {
2768 err = r; 2777 err = r;
2778 } else {
2779 if (!v0)
2780 nw64(RX_DMA_CTL_STAT(rp->rx_channel),
2781 RX_DMA_CTL_STAT_MEX);
2782 }
2769 } 2783 }
2770 } 2784 }
2771 } 2785 }
@@ -2803,7 +2817,7 @@ static int niu_slowpath_interrupt(struct niu *np, struct niu_ldg *lp)
2803 if (err) 2817 if (err)
2804 niu_enable_interrupts(np, 0); 2818 niu_enable_interrupts(np, 0);
2805 2819
2806 return -EINVAL; 2820 return err;
2807} 2821}
2808 2822
2809static void niu_rxchan_intr(struct niu *np, struct rx_ring_info *rp, 2823static void niu_rxchan_intr(struct niu *np, struct rx_ring_info *rp,
@@ -2905,7 +2919,7 @@ static irqreturn_t niu_interrupt(int irq, void *dev_id)
2905 } 2919 }
2906 2920
2907 if (unlikely((v0 & ((u64)1 << LDN_MIF)) || v1 || v2)) { 2921 if (unlikely((v0 & ((u64)1 << LDN_MIF)) || v1 || v2)) {
2908 int err = niu_slowpath_interrupt(np, lp); 2922 int err = niu_slowpath_interrupt(np, lp, v0, v1, v2);
2909 if (err) 2923 if (err)
2910 goto out; 2924 goto out;
2911 } 2925 }
@@ -5194,7 +5208,8 @@ static int niu_start_xmit(struct sk_buff *skb, struct net_device *dev)
5194 } 5208 }
5195 kfree_skb(skb); 5209 kfree_skb(skb);
5196 skb = skb_new; 5210 skb = skb_new;
5197 } 5211 } else
5212 skb_orphan(skb);
5198 5213
5199 align = ((unsigned long) skb->data & (16 - 1)); 5214 align = ((unsigned long) skb->data & (16 - 1));
5200 headroom = align + sizeof(struct tx_pkt_hdr); 5215 headroom = align + sizeof(struct tx_pkt_hdr);
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
index ff92aca0a7b3..90498ffe26f2 100644
--- a/drivers/net/pcnet32.c
+++ b/drivers/net/pcnet32.c
@@ -455,9 +455,14 @@ static void pcnet32_netif_start(struct net_device *dev)
455{ 455{
456#ifdef CONFIG_PCNET32_NAPI 456#ifdef CONFIG_PCNET32_NAPI
457 struct pcnet32_private *lp = netdev_priv(dev); 457 struct pcnet32_private *lp = netdev_priv(dev);
458 ulong ioaddr = dev->base_addr;
459 u16 val;
458#endif 460#endif
459 netif_wake_queue(dev); 461 netif_wake_queue(dev);
460#ifdef CONFIG_PCNET32_NAPI 462#ifdef CONFIG_PCNET32_NAPI
463 val = lp->a.read_csr(ioaddr, CSR3);
464 val &= 0x00ff;
465 lp->a.write_csr(ioaddr, CSR3, val);
461 napi_enable(&lp->napi); 466 napi_enable(&lp->napi);
462#endif 467#endif
463} 468}
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
index a5791114b7bd..cf0774de6c41 100644
--- a/drivers/net/qla3xxx.c
+++ b/drivers/net/qla3xxx.c
@@ -2320,14 +2320,9 @@ static int ql_poll(struct napi_struct *napi, int budget)
2320 unsigned long hw_flags; 2320 unsigned long hw_flags;
2321 struct ql3xxx_port_registers __iomem *port_regs = qdev->mem_map_registers; 2321 struct ql3xxx_port_registers __iomem *port_regs = qdev->mem_map_registers;
2322 2322
2323 if (!netif_carrier_ok(ndev))
2324 goto quit_polling;
2325
2326 ql_tx_rx_clean(qdev, &tx_cleaned, &rx_cleaned, budget); 2323 ql_tx_rx_clean(qdev, &tx_cleaned, &rx_cleaned, budget);
2327 2324
2328 if (tx_cleaned + rx_cleaned != budget || 2325 if (tx_cleaned + rx_cleaned != budget) {
2329 !netif_running(ndev)) {
2330quit_polling:
2331 spin_lock_irqsave(&qdev->hw_lock, hw_flags); 2326 spin_lock_irqsave(&qdev->hw_lock, hw_flags);
2332 __netif_rx_complete(ndev, napi); 2327 __netif_rx_complete(ndev, napi);
2333 ql_update_small_bufq_prod_index(qdev); 2328 ql_update_small_bufq_prod_index(qdev);
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 5863190894cc..af8030981f10 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -2398,6 +2398,8 @@ static void rtl8169_wait_for_quiescence(struct net_device *dev)
2398 rtl8169_irq_mask_and_ack(ioaddr); 2398 rtl8169_irq_mask_and_ack(ioaddr);
2399 2399
2400#ifdef CONFIG_R8169_NAPI 2400#ifdef CONFIG_R8169_NAPI
2401 tp->intr_mask = 0xffff;
2402 RTL_W16(IntrMask, tp->intr_event);
2401 napi_enable(&tp->napi); 2403 napi_enable(&tp->napi);
2402#endif 2404#endif
2403} 2405}
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 9d80f1cf73ac..fa57c49c0c51 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -2704,9 +2704,6 @@ static int s2io_poll(struct napi_struct *napi, int budget)
2704 struct XENA_dev_config __iomem *bar0 = nic->bar0; 2704 struct XENA_dev_config __iomem *bar0 = nic->bar0;
2705 int i; 2705 int i;
2706 2706
2707 if (!is_s2io_card_up(nic))
2708 return 0;
2709
2710 mac_control = &nic->mac_control; 2707 mac_control = &nic->mac_control;
2711 config = &nic->config; 2708 config = &nic->config;
2712 2709
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index a74fc11a6482..52ec89b82f64 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1168,6 +1168,7 @@ static void sky2_vlan_rx_register(struct net_device *dev, struct vlan_group *grp
1168 TX_VLAN_TAG_OFF); 1168 TX_VLAN_TAG_OFF);
1169 } 1169 }
1170 1170
1171 sky2_read32(hw, B0_Y2_SP_LISR);
1171 napi_enable(&hw->napi); 1172 napi_enable(&hw->napi);
1172 netif_tx_unlock_bh(dev); 1173 netif_tx_unlock_bh(dev);
1173} 1174}
@@ -2043,6 +2044,7 @@ static int sky2_change_mtu(struct net_device *dev, int new_mtu)
2043 err = sky2_rx_start(sky2); 2044 err = sky2_rx_start(sky2);
2044 sky2_write32(hw, B0_IMSK, imask); 2045 sky2_write32(hw, B0_IMSK, imask);
2045 2046
2047 sky2_read32(hw, B0_Y2_SP_LISR);
2046 napi_enable(&hw->napi); 2048 napi_enable(&hw->napi);
2047 2049
2048 if (err) 2050 if (err)
@@ -3861,6 +3863,7 @@ static int sky2_debug_show(struct seq_file *seq, void *v)
3861 last = sky2_read16(hw, Y2_QADDR(rxqaddr[port], PREF_UNIT_PUT_IDX)), 3863 last = sky2_read16(hw, Y2_QADDR(rxqaddr[port], PREF_UNIT_PUT_IDX)),
3862 sky2_read16(hw, Y2_QADDR(rxqaddr[port], PREF_UNIT_LAST_IDX))); 3864 sky2_read16(hw, Y2_QADDR(rxqaddr[port], PREF_UNIT_LAST_IDX)));
3863 3865
3866 sky2_read32(hw, B0_Y2_SP_LISR);
3864 napi_enable(&hw->napi); 3867 napi_enable(&hw->napi);
3865 return 0; 3868 return 0;
3866} 3869}
diff --git a/drivers/net/tulip/interrupt.c b/drivers/net/tulip/interrupt.c
index 365331446387..6284afd14bbb 100644
--- a/drivers/net/tulip/interrupt.c
+++ b/drivers/net/tulip/interrupt.c
@@ -117,9 +117,6 @@ int tulip_poll(struct napi_struct *napi, int budget)
117 int received = 0; 117 int received = 0;
118#endif 118#endif
119 119
120 if (!netif_running(dev))
121 goto done;
122
123#ifdef CONFIG_TULIP_NAPI_HW_MITIGATION 120#ifdef CONFIG_TULIP_NAPI_HW_MITIGATION
124 121
125/* that one buffer is needed for mit activation; or might be a 122/* that one buffer is needed for mit activation; or might be a
@@ -151,7 +148,8 @@ int tulip_poll(struct napi_struct *napi, int budget)
151 if (tulip_debug > 5) 148 if (tulip_debug > 5)
152 printk(KERN_DEBUG "%s: In tulip_rx(), entry %d %8.8x.\n", 149 printk(KERN_DEBUG "%s: In tulip_rx(), entry %d %8.8x.\n",
153 dev->name, entry, status); 150 dev->name, entry, status);
154 if (work_done++ >= budget) 151
152 if (++work_done >= budget)
155 goto not_done; 153 goto not_done;
156 154
157 if ((status & 0x38008300) != 0x0300) { 155 if ((status & 0x38008300) != 0x0300) {
@@ -260,8 +258,6 @@ int tulip_poll(struct napi_struct *napi, int budget)
260 * finally: amount of IO did not increase at all. */ 258 * finally: amount of IO did not increase at all. */
261 } while ((ioread32(tp->base_addr + CSR5) & RxIntr)); 259 } while ((ioread32(tp->base_addr + CSR5) & RxIntr));
262 260
263done:
264
265 #ifdef CONFIG_TULIP_NAPI_HW_MITIGATION 261 #ifdef CONFIG_TULIP_NAPI_HW_MITIGATION
266 262
267 /* We use this simplistic scheme for IM. It's proven by 263 /* We use this simplistic scheme for IM. It's proven by
diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c
index 58a53a641754..569ad8bfd383 100644
--- a/drivers/net/usb/kaweth.c
+++ b/drivers/net/usb/kaweth.c
@@ -70,7 +70,7 @@
70#define KAWETH_TX_TIMEOUT (5 * HZ) 70#define KAWETH_TX_TIMEOUT (5 * HZ)
71#define KAWETH_SCRATCH_SIZE 32 71#define KAWETH_SCRATCH_SIZE 32
72#define KAWETH_FIRMWARE_BUF_SIZE 4096 72#define KAWETH_FIRMWARE_BUF_SIZE 4096
73#define KAWETH_CONTROL_TIMEOUT (30 * HZ) 73#define KAWETH_CONTROL_TIMEOUT (30000)
74 74
75#define KAWETH_STATUS_BROKEN 0x0000001 75#define KAWETH_STATUS_BROKEN 0x0000001
76#define KAWETH_STATUS_CLOSING 0x0000002 76#define KAWETH_STATUS_CLOSING 0x0000002
diff --git a/drivers/net/usb/mcs7830.c b/drivers/net/usb/mcs7830.c
index f55a5951733a..5ea7411e1337 100644
--- a/drivers/net/usb/mcs7830.c
+++ b/drivers/net/usb/mcs7830.c
@@ -94,7 +94,7 @@ static int mcs7830_get_reg(struct usbnet *dev, u16 index, u16 size, void *data)
94 94
95 ret = usb_control_msg(xdev, usb_rcvctrlpipe(xdev, 0), MCS7830_RD_BREQ, 95 ret = usb_control_msg(xdev, usb_rcvctrlpipe(xdev, 0), MCS7830_RD_BREQ,
96 MCS7830_RD_BMREQ, 0x0000, index, data, 96 MCS7830_RD_BMREQ, 0x0000, index, data,
97 size, msecs_to_jiffies(MCS7830_CTRL_TIMEOUT)); 97 size, MCS7830_CTRL_TIMEOUT);
98 return ret; 98 return ret;
99} 99}
100 100
@@ -105,7 +105,7 @@ static int mcs7830_set_reg(struct usbnet *dev, u16 index, u16 size, void *data)
105 105
106 ret = usb_control_msg(xdev, usb_sndctrlpipe(xdev, 0), MCS7830_WR_BREQ, 106 ret = usb_control_msg(xdev, usb_sndctrlpipe(xdev, 0), MCS7830_WR_BREQ,
107 MCS7830_WR_BMREQ, 0x0000, index, data, 107 MCS7830_WR_BMREQ, 0x0000, index, data,
108 size, msecs_to_jiffies(MCS7830_CTRL_TIMEOUT)); 108 size, MCS7830_CTRL_TIMEOUT);
109 return ret; 109 return ret;
110} 110}
111 111
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
index a28ad230d63e..7b6fc1ab2b90 100644
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -273,6 +273,8 @@ enum {
273#define B43_PHYTYPE_A 0x00 273#define B43_PHYTYPE_A 0x00
274#define B43_PHYTYPE_B 0x01 274#define B43_PHYTYPE_B 0x01
275#define B43_PHYTYPE_G 0x02 275#define B43_PHYTYPE_G 0x02
276#define B43_PHYTYPE_N 0x04
277#define B43_PHYTYPE_LP 0x05
276 278
277/* PHYRegisters */ 279/* PHYRegisters */
278#define B43_PHY_ILT_A_CTRL 0x0072 280#define B43_PHY_ILT_A_CTRL 0x0072
diff --git a/drivers/net/wireless/b43/main.h b/drivers/net/wireless/b43/main.h
index 284d17da17d1..08e2e56e48f4 100644
--- a/drivers/net/wireless/b43/main.h
+++ b/drivers/net/wireless/b43/main.h
@@ -39,11 +39,11 @@
39#define PAD_BYTES(nr_bytes) P4D_BYTES( __LINE__ , (nr_bytes)) 39#define PAD_BYTES(nr_bytes) P4D_BYTES( __LINE__ , (nr_bytes))
40 40
41/* Lightweight function to convert a frequency (in Mhz) to a channel number. */ 41/* Lightweight function to convert a frequency (in Mhz) to a channel number. */
42static inline u8 b43_freq_to_channel_a(int freq) 42static inline u8 b43_freq_to_channel_5ghz(int freq)
43{ 43{
44 return ((freq - 5000) / 5); 44 return ((freq - 5000) / 5);
45} 45}
46static inline u8 b43_freq_to_channel_bg(int freq) 46static inline u8 b43_freq_to_channel_2ghz(int freq)
47{ 47{
48 u8 channel; 48 u8 channel;
49 49
@@ -54,19 +54,13 @@ static inline u8 b43_freq_to_channel_bg(int freq)
54 54
55 return channel; 55 return channel;
56} 56}
57static inline u8 b43_freq_to_channel(struct b43_wldev *dev, int freq)
58{
59 if (dev->phy.type == B43_PHYTYPE_A)
60 return b43_freq_to_channel_a(freq);
61 return b43_freq_to_channel_bg(freq);
62}
63 57
64/* Lightweight function to convert a channel number to a frequency (in Mhz). */ 58/* Lightweight function to convert a channel number to a frequency (in Mhz). */
65static inline int b43_channel_to_freq_a(u8 channel) 59static inline int b43_channel_to_freq_5ghz(u8 channel)
66{ 60{
67 return (5000 + (5 * channel)); 61 return (5000 + (5 * channel));
68} 62}
69static inline int b43_channel_to_freq_bg(u8 channel) 63static inline int b43_channel_to_freq_2ghz(u8 channel)
70{ 64{
71 int freq; 65 int freq;
72 66
@@ -77,12 +71,6 @@ static inline int b43_channel_to_freq_bg(u8 channel)
77 71
78 return freq; 72 return freq;
79} 73}
80static inline int b43_channel_to_freq(struct b43_wldev *dev, u8 channel)
81{
82 if (dev->phy.type == B43_PHYTYPE_A)
83 return b43_channel_to_freq_a(channel);
84 return b43_channel_to_freq_bg(channel);
85}
86 74
87static inline int b43_is_cck_rate(int rate) 75static inline int b43_is_cck_rate(int rate)
88{ 76{
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
index 0bd6f8a348a8..3307ba1856b1 100644
--- a/drivers/net/wireless/b43/xmit.c
+++ b/drivers/net/wireless/b43/xmit.c
@@ -531,21 +531,32 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
531 switch (chanstat & B43_RX_CHAN_PHYTYPE) { 531 switch (chanstat & B43_RX_CHAN_PHYTYPE) {
532 case B43_PHYTYPE_A: 532 case B43_PHYTYPE_A:
533 status.phymode = MODE_IEEE80211A; 533 status.phymode = MODE_IEEE80211A;
534 status.freq = chanid; 534 B43_WARN_ON(1);
535 status.channel = b43_freq_to_channel_a(chanid); 535 /* FIXME: We don't really know which value the "chanid" contains.
536 break; 536 * So the following assignment might be wrong. */
537 case B43_PHYTYPE_B: 537 status.channel = chanid;
538 status.phymode = MODE_IEEE80211B; 538 status.freq = b43_channel_to_freq_5ghz(status.channel);
539 status.freq = chanid + 2400;
540 status.channel = b43_freq_to_channel_bg(chanid + 2400);
541 break; 539 break;
542 case B43_PHYTYPE_G: 540 case B43_PHYTYPE_G:
543 status.phymode = MODE_IEEE80211G; 541 status.phymode = MODE_IEEE80211G;
542 /* chanid is the radio channel cookie value as used
543 * to tune the radio. */
544 status.freq = chanid + 2400; 544 status.freq = chanid + 2400;
545 status.channel = b43_freq_to_channel_bg(chanid + 2400); 545 status.channel = b43_freq_to_channel_2ghz(status.freq);
546 break;
547 case B43_PHYTYPE_N:
548 status.phymode = 0xDEAD /*FIXME MODE_IEEE80211N*/;
549 /* chanid is the SHM channel cookie. Which is the plain
550 * channel number in b43. */
551 status.channel = chanid;
552 if (chanstat & B43_RX_CHAN_5GHZ)
553 status.freq = b43_freq_to_channel_5ghz(status.freq);
554 else
555 status.freq = b43_freq_to_channel_2ghz(status.freq);
546 break; 556 break;
547 default: 557 default:
548 B43_WARN_ON(1); 558 B43_WARN_ON(1);
559 goto drop;
549 } 560 }
550 561
551 dev->stats.last_rx = jiffies; 562 dev->stats.last_rx = jiffies;
diff --git a/drivers/net/wireless/b43/xmit.h b/drivers/net/wireless/b43/xmit.h
index 03bddd251618..6dc079382f7f 100644
--- a/drivers/net/wireless/b43/xmit.h
+++ b/drivers/net/wireless/b43/xmit.h
@@ -142,49 +142,56 @@ struct b43_rxhdr_fw4 {
142} __attribute__ ((__packed__)); 142} __attribute__ ((__packed__));
143 143
144/* PHY RX Status 0 */ 144/* PHY RX Status 0 */
145#define B43_RX_PHYST0_GAINCTL 0x4000 /* Gain Control */ 145#define B43_RX_PHYST0_GAINCTL 0x4000 /* Gain Control */
146#define B43_RX_PHYST0_PLCPHCF 0x0200 146#define B43_RX_PHYST0_PLCPHCF 0x0200
147#define B43_RX_PHYST0_PLCPFV 0x0100 147#define B43_RX_PHYST0_PLCPFV 0x0100
148#define B43_RX_PHYST0_SHORTPRMBL 0x0080 /* Received with Short Preamble */ 148#define B43_RX_PHYST0_SHORTPRMBL 0x0080 /* Received with Short Preamble */
149#define B43_RX_PHYST0_LCRS 0x0040 149#define B43_RX_PHYST0_LCRS 0x0040
150#define B43_RX_PHYST0_ANT 0x0020 /* Antenna */ 150#define B43_RX_PHYST0_ANT 0x0020 /* Antenna */
151#define B43_RX_PHYST0_UNSRATE 0x0010 151#define B43_RX_PHYST0_UNSRATE 0x0010
152#define B43_RX_PHYST0_CLIP 0x000C 152#define B43_RX_PHYST0_CLIP 0x000C
153#define B43_RX_PHYST0_CLIP_SHIFT 2 153#define B43_RX_PHYST0_CLIP_SHIFT 2
154#define B43_RX_PHYST0_FTYPE 0x0003 /* Frame type */ 154#define B43_RX_PHYST0_FTYPE 0x0003 /* Frame type */
155#define B43_RX_PHYST0_CCK 0x0000 /* Frame type: CCK */ 155#define B43_RX_PHYST0_CCK 0x0000 /* Frame type: CCK */
156#define B43_RX_PHYST0_OFDM 0x0001 /* Frame type: OFDM */ 156#define B43_RX_PHYST0_OFDM 0x0001 /* Frame type: OFDM */
157#define B43_RX_PHYST0_PRE_N 0x0002 /* Pre-standard N-PHY frame */ 157#define B43_RX_PHYST0_PRE_N 0x0002 /* Pre-standard N-PHY frame */
158#define B43_RX_PHYST0_STD_N 0x0003 /* Standard N-PHY frame */ 158#define B43_RX_PHYST0_STD_N 0x0003 /* Standard N-PHY frame */
159 159
160/* PHY RX Status 2 */ 160/* PHY RX Status 2 */
161#define B43_RX_PHYST2_LNAG 0xC000 /* LNA Gain */ 161#define B43_RX_PHYST2_LNAG 0xC000 /* LNA Gain */
162#define B43_RX_PHYST2_LNAG_SHIFT 14 162#define B43_RX_PHYST2_LNAG_SHIFT 14
163#define B43_RX_PHYST2_PNAG 0x3C00 /* PNA Gain */ 163#define B43_RX_PHYST2_PNAG 0x3C00 /* PNA Gain */
164#define B43_RX_PHYST2_PNAG_SHIFT 10 164#define B43_RX_PHYST2_PNAG_SHIFT 10
165#define B43_RX_PHYST2_FOFF 0x03FF /* F offset */ 165#define B43_RX_PHYST2_FOFF 0x03FF /* F offset */
166 166
167/* PHY RX Status 3 */ 167/* PHY RX Status 3 */
168#define B43_RX_PHYST3_DIGG 0x1800 /* DIG Gain */ 168#define B43_RX_PHYST3_DIGG 0x1800 /* DIG Gain */
169#define B43_RX_PHYST3_DIGG_SHIFT 11 169#define B43_RX_PHYST3_DIGG_SHIFT 11
170#define B43_RX_PHYST3_TRSTATE 0x0400 /* TR state */ 170#define B43_RX_PHYST3_TRSTATE 0x0400 /* TR state */
171 171
172/* MAC RX Status */ 172/* MAC RX Status */
173#define B43_RX_MAC_BEACONSENT 0x00008000 /* Beacon send flag */ 173#define B43_RX_MAC_RXST_VALID 0x01000000 /* PHY RXST valid */
174#define B43_RX_MAC_KEYIDX 0x000007E0 /* Key index */ 174#define B43_RX_MAC_TKIP_MICERR 0x00100000 /* TKIP MIC error */
175#define B43_RX_MAC_KEYIDX_SHIFT 5 175#define B43_RX_MAC_TKIP_MICATT 0x00080000 /* TKIP MIC attempted */
176#define B43_RX_MAC_DECERR 0x00000010 /* Decrypt error */ 176#define B43_RX_MAC_AGGTYPE 0x00060000 /* Aggregation type */
177#define B43_RX_MAC_DEC 0x00000008 /* Decryption attempted */ 177#define B43_RX_MAC_AGGTYPE_SHIFT 17
178#define B43_RX_MAC_PADDING 0x00000004 /* Pad bytes present */ 178#define B43_RX_MAC_AMSDU 0x00010000 /* A-MSDU mask */
179#define B43_RX_MAC_RESP 0x00000002 /* Response frame transmitted */ 179#define B43_RX_MAC_BEACONSENT 0x00008000 /* Beacon sent flag */
180#define B43_RX_MAC_FCSERR 0x00000001 /* FCS error */ 180#define B43_RX_MAC_KEYIDX 0x000007E0 /* Key index */
181#define B43_RX_MAC_KEYIDX_SHIFT 5
182#define B43_RX_MAC_DECERR 0x00000010 /* Decrypt error */
183#define B43_RX_MAC_DEC 0x00000008 /* Decryption attempted */
184#define B43_RX_MAC_PADDING 0x00000004 /* Pad bytes present */
185#define B43_RX_MAC_RESP 0x00000002 /* Response frame transmitted */
186#define B43_RX_MAC_FCSERR 0x00000001 /* FCS error */
181 187
182/* RX channel */ 188/* RX channel */
183#define B43_RX_CHAN_GAIN 0xFC00 /* Gain */ 189#define B43_RX_CHAN_40MHZ 0x1000 /* 40 Mhz channel width */
184#define B43_RX_CHAN_GAIN_SHIFT 10 190#define B43_RX_CHAN_5GHZ 0x0800 /* 5 Ghz band */
185#define B43_RX_CHAN_ID 0x03FC /* Channel ID */ 191#define B43_RX_CHAN_ID 0x07F8 /* Channel ID */
186#define B43_RX_CHAN_ID_SHIFT 2 192#define B43_RX_CHAN_ID_SHIFT 3
187#define B43_RX_CHAN_PHYTYPE 0x0003 /* PHY type */ 193#define B43_RX_CHAN_PHYTYPE 0x0007 /* PHY type */
194
188 195
189u8 b43_plcp_get_ratecode_cck(const u8 bitrate); 196u8 b43_plcp_get_ratecode_cck(const u8 bitrate);
190u8 b43_plcp_get_ratecode_ofdm(const u8 bitrate); 197u8 b43_plcp_get_ratecode_ofdm(const u8 bitrate);
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 2a8fc431099f..bca37bf0f545 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -852,11 +852,6 @@ static int xennet_poll(struct napi_struct *napi, int budget)
852 852
853 spin_lock(&np->rx_lock); 853 spin_lock(&np->rx_lock);
854 854
855 if (unlikely(!netif_carrier_ok(dev))) {
856 spin_unlock(&np->rx_lock);
857 return 0;
858 }
859
860 skb_queue_head_init(&rxq); 855 skb_queue_head_init(&rxq);
861 skb_queue_head_init(&errq); 856 skb_queue_head_init(&errq);
862 skb_queue_head_init(&tmpq); 857 skb_queue_head_init(&tmpq);