aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/3c509.c4
-rw-r--r--drivers/net/Makefile2
-rw-r--r--drivers/net/atl1e/atl1e_main.c1
-rw-r--r--drivers/net/atlx/atl1.c6
-rw-r--r--drivers/net/atlx/atlx.h6
-rw-r--r--drivers/net/bfin_mac.c29
-rw-r--r--drivers/net/cxgb3/adapter.h4
-rw-r--r--drivers/net/cxgb3/cxgb3_main.c8
-rw-r--r--drivers/net/cxgb3/sge.c11
-rw-r--r--drivers/net/cxgb3/t3_hw.c5
-rw-r--r--drivers/net/e1000/e1000_main.c5
-rw-r--r--drivers/net/forcedeth.c15
-rw-r--r--drivers/net/gianfar.h2
-rw-r--r--drivers/net/mac8390.c12
-rw-r--r--drivers/net/mlx4/en_tx.c8
-rw-r--r--drivers/net/r8169.c102
-rw-r--r--drivers/net/wireless/Kconfig1
-rw-r--r--drivers/net/wireless/at76c50x-usb.c12
-rw-r--r--drivers/net/wireless/rtl818x/rtl8187_dev.c2
19 files changed, 136 insertions, 99 deletions
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c
index 8d9aa49de145..d2137efbd455 100644
--- a/drivers/net/3c509.c
+++ b/drivers/net/3c509.c
@@ -480,9 +480,13 @@ static int pnp_registered;
480 480
481#ifdef CONFIG_EISA 481#ifdef CONFIG_EISA
482static struct eisa_device_id el3_eisa_ids[] = { 482static struct eisa_device_id el3_eisa_ids[] = {
483 { "TCM5090" },
484 { "TCM5091" },
483 { "TCM5092" }, 485 { "TCM5092" },
484 { "TCM5093" }, 486 { "TCM5093" },
487 { "TCM5094" },
485 { "TCM5095" }, 488 { "TCM5095" },
489 { "TCM5098" },
486 { "" } 490 { "" }
487}; 491};
488MODULE_DEVICE_TABLE(eisa, el3_eisa_ids); 492MODULE_DEVICE_TABLE(eisa, el3_eisa_ids);
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index f07a1e956417..774c2b45bdb8 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -105,7 +105,7 @@ obj-$(CONFIG_HAMACHI) += hamachi.o
105obj-$(CONFIG_NET) += Space.o loopback.o 105obj-$(CONFIG_NET) += Space.o loopback.o
106obj-$(CONFIG_SEEQ8005) += seeq8005.o 106obj-$(CONFIG_SEEQ8005) += seeq8005.o
107obj-$(CONFIG_NET_SB1000) += sb1000.o 107obj-$(CONFIG_NET_SB1000) += sb1000.o
108obj-$(CONFIG_MAC8390) += mac8390.o 8390.o 108obj-$(CONFIG_MAC8390) += mac8390.o
109obj-$(CONFIG_APNE) += apne.o 8390.o 109obj-$(CONFIG_APNE) += apne.o 8390.o
110obj-$(CONFIG_PCMCIA_PCNET) += 8390.o 110obj-$(CONFIG_PCMCIA_PCNET) += 8390.o
111obj-$(CONFIG_HP100) += hp100.o 111obj-$(CONFIG_HP100) += hp100.o
diff --git a/drivers/net/atl1e/atl1e_main.c b/drivers/net/atl1e/atl1e_main.c
index a01383d53a03..e1ae10cf30c1 100644
--- a/drivers/net/atl1e/atl1e_main.c
+++ b/drivers/net/atl1e/atl1e_main.c
@@ -37,6 +37,7 @@ char atl1e_driver_version[] = DRV_VERSION;
37 */ 37 */
38static struct pci_device_id atl1e_pci_tbl[] = { 38static struct pci_device_id atl1e_pci_tbl[] = {
39 {PCI_DEVICE(PCI_VENDOR_ID_ATTANSIC, PCI_DEVICE_ID_ATTANSIC_L1E)}, 39 {PCI_DEVICE(PCI_VENDOR_ID_ATTANSIC, PCI_DEVICE_ID_ATTANSIC_L1E)},
40 {PCI_DEVICE(PCI_VENDOR_ID_ATTANSIC, 0x1066)},
40 /* required last entry */ 41 /* required last entry */
41 { 0 } 42 { 0 }
42}; 43};
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index fccfbf2cf932..560f3873d347 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -82,6 +82,12 @@
82 82
83#include "atl1.h" 83#include "atl1.h"
84 84
85#define ATLX_DRIVER_VERSION "2.1.3"
86MODULE_AUTHOR("Xiong Huang <xiong.huang@atheros.com>, \
87 Chris Snook <csnook@redhat.com>, Jay Cliburn <jcliburn@gmail.com>");
88MODULE_LICENSE("GPL");
89MODULE_VERSION(ATLX_DRIVER_VERSION);
90
85/* Temporary hack for merging atl1 and atl2 */ 91/* Temporary hack for merging atl1 and atl2 */
86#include "atlx.c" 92#include "atlx.c"
87 93
diff --git a/drivers/net/atlx/atlx.h b/drivers/net/atlx/atlx.h
index 297a03da6b7f..14054b75aa62 100644
--- a/drivers/net/atlx/atlx.h
+++ b/drivers/net/atlx/atlx.h
@@ -29,12 +29,6 @@
29#include <linux/module.h> 29#include <linux/module.h>
30#include <linux/types.h> 30#include <linux/types.h>
31 31
32#define ATLX_DRIVER_VERSION "2.1.3"
33MODULE_AUTHOR("Xiong Huang <xiong.huang@atheros.com>, \
34 Chris Snook <csnook@redhat.com>, Jay Cliburn <jcliburn@gmail.com>");
35MODULE_LICENSE("GPL");
36MODULE_VERSION(ATLX_DRIVER_VERSION);
37
38#define ATLX_ERR_PHY 2 32#define ATLX_ERR_PHY 2
39#define ATLX_ERR_PHY_SPEED 7 33#define ATLX_ERR_PHY_SPEED 7
40#define ATLX_ERR_PHY_RES 8 34#define ATLX_ERR_PHY_RES 8
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index 955a46958b7f..c15fc281f79f 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -927,22 +927,7 @@ static int bfin_mac_open(struct net_device *dev)
927 return 0; 927 return 0;
928} 928}
929 929
930static const struct net_device_ops bfin_mac_netdev_ops = {
931 .ndo_open = bfin_mac_open,
932 .ndo_stop = bfin_mac_close,
933 .ndo_start_xmit = bfin_mac_hard_start_xmit,
934 .ndo_set_mac_address = bfin_mac_set_mac_address,
935 .ndo_tx_timeout = bfin_mac_timeout,
936 .ndo_set_multicast_list = bfin_mac_set_multicast_list,
937 .ndo_validate_addr = eth_validate_addr,
938 .ndo_change_mtu = eth_change_mtu,
939#ifdef CONFIG_NET_POLL_CONTROLLER
940 .ndo_poll_controller = bfin_mac_poll,
941#endif
942};
943
944/* 930/*
945 *
946 * this makes the board clean up everything that it can 931 * this makes the board clean up everything that it can
947 * and not talk to the outside world. Caused by 932 * and not talk to the outside world. Caused by
948 * an 'ifconfig ethX down' 933 * an 'ifconfig ethX down'
@@ -967,6 +952,20 @@ static int bfin_mac_close(struct net_device *dev)
967 return 0; 952 return 0;
968} 953}
969 954
955static const struct net_device_ops bfin_mac_netdev_ops = {
956 .ndo_open = bfin_mac_open,
957 .ndo_stop = bfin_mac_close,
958 .ndo_start_xmit = bfin_mac_hard_start_xmit,
959 .ndo_set_mac_address = bfin_mac_set_mac_address,
960 .ndo_tx_timeout = bfin_mac_timeout,
961 .ndo_set_multicast_list = bfin_mac_set_multicast_list,
962 .ndo_validate_addr = eth_validate_addr,
963 .ndo_change_mtu = eth_change_mtu,
964#ifdef CONFIG_NET_POLL_CONTROLLER
965 .ndo_poll_controller = bfin_mac_poll,
966#endif
967};
968
970static int __devinit bfin_mac_probe(struct platform_device *pdev) 969static int __devinit bfin_mac_probe(struct platform_device *pdev)
971{ 970{
972 struct net_device *ndev; 971 struct net_device *ndev;
diff --git a/drivers/net/cxgb3/adapter.h b/drivers/net/cxgb3/adapter.h
index 322434ac42fc..e48e508b9632 100644
--- a/drivers/net/cxgb3/adapter.h
+++ b/drivers/net/cxgb3/adapter.h
@@ -85,8 +85,8 @@ struct fl_pg_chunk {
85 struct page *page; 85 struct page *page;
86 void *va; 86 void *va;
87 unsigned int offset; 87 unsigned int offset;
88 u64 *p_cnt; 88 unsigned long *p_cnt;
89 DECLARE_PCI_UNMAP_ADDR(mapping); 89 dma_addr_t mapping;
90}; 90};
91 91
92struct rx_desc; 92struct rx_desc;
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index 4bc26568b2f6..aef3ab21f5f7 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -2453,14 +2453,16 @@ static void check_link_status(struct adapter *adapter)
2453 for_each_port(adapter, i) { 2453 for_each_port(adapter, i) {
2454 struct net_device *dev = adapter->port[i]; 2454 struct net_device *dev = adapter->port[i];
2455 struct port_info *p = netdev_priv(dev); 2455 struct port_info *p = netdev_priv(dev);
2456 int link_fault;
2456 2457
2457 spin_lock_irq(&adapter->work_lock); 2458 spin_lock_irq(&adapter->work_lock);
2458 if (p->link_fault) { 2459 link_fault = p->link_fault;
2460 spin_unlock_irq(&adapter->work_lock);
2461
2462 if (link_fault) {
2459 t3_link_fault(adapter, i); 2463 t3_link_fault(adapter, i);
2460 spin_unlock_irq(&adapter->work_lock);
2461 continue; 2464 continue;
2462 } 2465 }
2463 spin_unlock_irq(&adapter->work_lock);
2464 2466
2465 if (!(p->phy.caps & SUPPORTED_IRQ) && netif_running(dev)) { 2467 if (!(p->phy.caps & SUPPORTED_IRQ) && netif_running(dev)) {
2466 t3_xgm_intr_disable(adapter, i); 2468 t3_xgm_intr_disable(adapter, i);
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c
index 0b978827874b..29c79eb43beb 100644
--- a/drivers/net/cxgb3/sge.c
+++ b/drivers/net/cxgb3/sge.c
@@ -355,7 +355,7 @@ static void clear_rx_desc(struct pci_dev *pdev, const struct sge_fl *q,
355 (*d->pg_chunk.p_cnt)--; 355 (*d->pg_chunk.p_cnt)--;
356 if (!*d->pg_chunk.p_cnt) 356 if (!*d->pg_chunk.p_cnt)
357 pci_unmap_page(pdev, 357 pci_unmap_page(pdev,
358 pci_unmap_addr(&d->pg_chunk, mapping), 358 d->pg_chunk.mapping,
359 q->alloc_size, PCI_DMA_FROMDEVICE); 359 q->alloc_size, PCI_DMA_FROMDEVICE);
360 360
361 put_page(d->pg_chunk.page); 361 put_page(d->pg_chunk.page);
@@ -454,7 +454,7 @@ static int alloc_pg_chunk(struct adapter *adapter, struct sge_fl *q,
454 q->pg_chunk.offset = 0; 454 q->pg_chunk.offset = 0;
455 mapping = pci_map_page(adapter->pdev, q->pg_chunk.page, 455 mapping = pci_map_page(adapter->pdev, q->pg_chunk.page,
456 0, q->alloc_size, PCI_DMA_FROMDEVICE); 456 0, q->alloc_size, PCI_DMA_FROMDEVICE);
457 pci_unmap_addr_set(&q->pg_chunk, mapping, mapping); 457 q->pg_chunk.mapping = mapping;
458 } 458 }
459 sd->pg_chunk = q->pg_chunk; 459 sd->pg_chunk = q->pg_chunk;
460 460
@@ -511,8 +511,7 @@ static int refill_fl(struct adapter *adap, struct sge_fl *q, int n, gfp_t gfp)
511nomem: q->alloc_failed++; 511nomem: q->alloc_failed++;
512 break; 512 break;
513 } 513 }
514 mapping = pci_unmap_addr(&sd->pg_chunk, mapping) + 514 mapping = sd->pg_chunk.mapping + sd->pg_chunk.offset;
515 sd->pg_chunk.offset;
516 pci_unmap_addr_set(sd, dma_addr, mapping); 515 pci_unmap_addr_set(sd, dma_addr, mapping);
517 516
518 add_one_rx_chunk(mapping, d, q->gen); 517 add_one_rx_chunk(mapping, d, q->gen);
@@ -882,7 +881,7 @@ recycle:
882 (*sd->pg_chunk.p_cnt)--; 881 (*sd->pg_chunk.p_cnt)--;
883 if (!*sd->pg_chunk.p_cnt) 882 if (!*sd->pg_chunk.p_cnt)
884 pci_unmap_page(adap->pdev, 883 pci_unmap_page(adap->pdev,
885 pci_unmap_addr(&sd->pg_chunk, mapping), 884 sd->pg_chunk.mapping,
886 fl->alloc_size, 885 fl->alloc_size,
887 PCI_DMA_FROMDEVICE); 886 PCI_DMA_FROMDEVICE);
888 if (!skb) { 887 if (!skb) {
@@ -2091,7 +2090,7 @@ static void lro_add_page(struct adapter *adap, struct sge_qset *qs,
2091 (*sd->pg_chunk.p_cnt)--; 2090 (*sd->pg_chunk.p_cnt)--;
2092 if (!*sd->pg_chunk.p_cnt) 2091 if (!*sd->pg_chunk.p_cnt)
2093 pci_unmap_page(adap->pdev, 2092 pci_unmap_page(adap->pdev,
2094 pci_unmap_addr(&sd->pg_chunk, mapping), 2093 sd->pg_chunk.mapping,
2095 fl->alloc_size, 2094 fl->alloc_size,
2096 PCI_DMA_FROMDEVICE); 2095 PCI_DMA_FROMDEVICE);
2097 2096
diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c
index 6a454476bb17..870d44992c70 100644
--- a/drivers/net/cxgb3/t3_hw.c
+++ b/drivers/net/cxgb3/t3_hw.c
@@ -1288,6 +1288,11 @@ void t3_link_fault(struct adapter *adapter, int port_id)
1288 A_XGM_INT_STATUS + mac->offset); 1288 A_XGM_INT_STATUS + mac->offset);
1289 link_fault &= F_LINKFAULTCHANGE; 1289 link_fault &= F_LINKFAULTCHANGE;
1290 1290
1291 link_ok = lc->link_ok;
1292 speed = lc->speed;
1293 duplex = lc->duplex;
1294 fc = lc->fc;
1295
1291 phy->ops->get_link_status(phy, &link_ok, &speed, &duplex, &fc); 1296 phy->ops->get_link_status(phy, &link_ok, &speed, &duplex, &fc);
1292 1297
1293 if (link_fault) { 1298 if (link_fault) {
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 74667e521431..05e87a59f1c6 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -4035,8 +4035,9 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter,
4035 PCI_DMA_FROMDEVICE); 4035 PCI_DMA_FROMDEVICE);
4036 4036
4037 length = le16_to_cpu(rx_desc->length); 4037 length = le16_to_cpu(rx_desc->length);
4038 4038 /* !EOP means multiple descriptors were used to store a single
4039 if (unlikely(!(status & E1000_RXD_STAT_EOP))) { 4039 * packet, also make sure the frame isn't just CRC only */
4040 if (unlikely(!(status & E1000_RXD_STAT_EOP) || (length <= 4))) {
4040 /* All receives must fit into a single buffer */ 4041 /* All receives must fit into a single buffer */
4041 E1000_DBG("%s: Receive packet consumed multiple" 4042 E1000_DBG("%s: Receive packet consumed multiple"
4042 " buffers\n", netdev->name); 4043 " buffers\n", netdev->name);
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index d0b1d9f17a5d..1dce5550f553 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -898,6 +898,12 @@ enum {
898}; 898};
899static int phy_cross = NV_CROSSOVER_DETECTION_DISABLED; 899static int phy_cross = NV_CROSSOVER_DETECTION_DISABLED;
900 900
901/*
902 * Power down phy when interface is down (persists through reboot;
903 * older Linux and other OSes may not power it up again)
904 */
905static int phy_power_down = 0;
906
901static inline struct fe_priv *get_nvpriv(struct net_device *dev) 907static inline struct fe_priv *get_nvpriv(struct net_device *dev)
902{ 908{
903 return netdev_priv(dev); 909 return netdev_priv(dev);
@@ -1503,7 +1509,10 @@ static int phy_init(struct net_device *dev)
1503 1509
1504 /* restart auto negotiation, power down phy */ 1510 /* restart auto negotiation, power down phy */
1505 mii_control = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); 1511 mii_control = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ);
1506 mii_control |= (BMCR_ANRESTART | BMCR_ANENABLE | BMCR_PDOWN); 1512 mii_control |= (BMCR_ANRESTART | BMCR_ANENABLE);
1513 if (phy_power_down) {
1514 mii_control |= BMCR_PDOWN;
1515 }
1507 if (mii_rw(dev, np->phyaddr, MII_BMCR, mii_control)) { 1516 if (mii_rw(dev, np->phyaddr, MII_BMCR, mii_control)) {
1508 return PHY_ERROR; 1517 return PHY_ERROR;
1509 } 1518 }
@@ -5534,7 +5543,7 @@ static int nv_close(struct net_device *dev)
5534 5543
5535 nv_drain_rxtx(dev); 5544 nv_drain_rxtx(dev);
5536 5545
5537 if (np->wolenabled) { 5546 if (np->wolenabled || !phy_power_down) {
5538 nv_txrx_gate(dev, false); 5547 nv_txrx_gate(dev, false);
5539 writel(NVREG_PFF_ALWAYS|NVREG_PFF_MYADDR, base + NvRegPacketFilterFlags); 5548 writel(NVREG_PFF_ALWAYS|NVREG_PFF_MYADDR, base + NvRegPacketFilterFlags);
5540 nv_start_rx(dev); 5549 nv_start_rx(dev);
@@ -6390,6 +6399,8 @@ module_param(dma_64bit, int, 0);
6390MODULE_PARM_DESC(dma_64bit, "High DMA is enabled by setting to 1 and disabled by setting to 0."); 6399MODULE_PARM_DESC(dma_64bit, "High DMA is enabled by setting to 1 and disabled by setting to 0.");
6391module_param(phy_cross, int, 0); 6400module_param(phy_cross, int, 0);
6392MODULE_PARM_DESC(phy_cross, "Phy crossover detection for Realtek 8201 phy is enabled by setting to 1 and disabled by setting to 0."); 6401MODULE_PARM_DESC(phy_cross, "Phy crossover detection for Realtek 8201 phy is enabled by setting to 1 and disabled by setting to 0.");
6402module_param(phy_power_down, int, 0);
6403MODULE_PARM_DESC(phy_power_down, "Power down phy and disable link when interface is down (1), or leave phy powered up (0).");
6393 6404
6394MODULE_AUTHOR("Manfred Spraul <manfred@colorfullife.com>"); 6405MODULE_AUTHOR("Manfred Spraul <manfred@colorfullife.com>");
6395MODULE_DESCRIPTION("Reverse Engineered nForce ethernet driver"); 6406MODULE_DESCRIPTION("Reverse Engineered nForce ethernet driver");
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h
index 91317bc11154..2cd94338b5d3 100644
--- a/drivers/net/gianfar.h
+++ b/drivers/net/gianfar.h
@@ -259,7 +259,7 @@ extern const char gfar_driver_version[];
259(IEVENT_RXC | IEVENT_BSY | IEVENT_EBERR | IEVENT_MSRO | \ 259(IEVENT_RXC | IEVENT_BSY | IEVENT_EBERR | IEVENT_MSRO | \
260 IEVENT_BABT | IEVENT_TXC | IEVENT_TXE | IEVENT_LC \ 260 IEVENT_BABT | IEVENT_TXC | IEVENT_TXE | IEVENT_LC \
261 | IEVENT_CRL | IEVENT_XFUN | IEVENT_DPE | IEVENT_PERR \ 261 | IEVENT_CRL | IEVENT_XFUN | IEVENT_DPE | IEVENT_PERR \
262 | IEVENT_MAG) 262 | IEVENT_MAG | IEVENT_BABR)
263 263
264#define IMASK_INIT_CLEAR 0x00000000 264#define IMASK_INIT_CLEAR 0x00000000
265#define IMASK_BABR 0x80000000 265#define IMASK_BABR 0x80000000
diff --git a/drivers/net/mac8390.c b/drivers/net/mac8390.c
index 0585df1e2c1b..f8fa0c3f0f64 100644
--- a/drivers/net/mac8390.c
+++ b/drivers/net/mac8390.c
@@ -304,7 +304,7 @@ struct net_device * __init mac8390_probe(int unit)
304 if (!MACH_IS_MAC) 304 if (!MACH_IS_MAC)
305 return ERR_PTR(-ENODEV); 305 return ERR_PTR(-ENODEV);
306 306
307 dev = alloc_ei_netdev(); 307 dev = ____alloc_ei_netdev(0);
308 if (!dev) 308 if (!dev)
309 return ERR_PTR(-ENOMEM); 309 return ERR_PTR(-ENOMEM);
310 310
@@ -481,15 +481,15 @@ void cleanup_module(void)
481static const struct net_device_ops mac8390_netdev_ops = { 481static const struct net_device_ops mac8390_netdev_ops = {
482 .ndo_open = mac8390_open, 482 .ndo_open = mac8390_open,
483 .ndo_stop = mac8390_close, 483 .ndo_stop = mac8390_close,
484 .ndo_start_xmit = ei_start_xmit, 484 .ndo_start_xmit = __ei_start_xmit,
485 .ndo_tx_timeout = ei_tx_timeout, 485 .ndo_tx_timeout = __ei_tx_timeout,
486 .ndo_get_stats = ei_get_stats, 486 .ndo_get_stats = __ei_get_stats,
487 .ndo_set_multicast_list = ei_set_multicast_list, 487 .ndo_set_multicast_list = __ei_set_multicast_list,
488 .ndo_validate_addr = eth_validate_addr, 488 .ndo_validate_addr = eth_validate_addr,
489 .ndo_set_mac_address = eth_mac_addr, 489 .ndo_set_mac_address = eth_mac_addr,
490 .ndo_change_mtu = eth_change_mtu, 490 .ndo_change_mtu = eth_change_mtu,
491#ifdef CONFIG_NET_POLL_CONTROLLER 491#ifdef CONFIG_NET_POLL_CONTROLLER
492 .ndo_poll_controller = ei_poll, 492 .ndo_poll_controller = __ei_poll,
493#endif 493#endif
494}; 494};
495 495
diff --git a/drivers/net/mlx4/en_tx.c b/drivers/net/mlx4/en_tx.c
index 3719d1ac3950..5dc7466ad035 100644
--- a/drivers/net/mlx4/en_tx.c
+++ b/drivers/net/mlx4/en_tx.c
@@ -388,7 +388,7 @@ void mlx4_en_poll_tx_cq(unsigned long data)
388 388
389 INC_PERF_COUNTER(priv->pstats.tx_poll); 389 INC_PERF_COUNTER(priv->pstats.tx_poll);
390 390
391 if (!spin_trylock(&ring->comp_lock)) { 391 if (!spin_trylock_irq(&ring->comp_lock)) {
392 mod_timer(&cq->timer, jiffies + MLX4_EN_TX_POLL_TIMEOUT); 392 mod_timer(&cq->timer, jiffies + MLX4_EN_TX_POLL_TIMEOUT);
393 return; 393 return;
394 } 394 }
@@ -401,7 +401,7 @@ void mlx4_en_poll_tx_cq(unsigned long data)
401 if (inflight && priv->port_up) 401 if (inflight && priv->port_up)
402 mod_timer(&cq->timer, jiffies + MLX4_EN_TX_POLL_TIMEOUT); 402 mod_timer(&cq->timer, jiffies + MLX4_EN_TX_POLL_TIMEOUT);
403 403
404 spin_unlock(&ring->comp_lock); 404 spin_unlock_irq(&ring->comp_lock);
405} 405}
406 406
407static struct mlx4_en_tx_desc *mlx4_en_bounce_to_desc(struct mlx4_en_priv *priv, 407static struct mlx4_en_tx_desc *mlx4_en_bounce_to_desc(struct mlx4_en_priv *priv,
@@ -444,9 +444,9 @@ static inline void mlx4_en_xmit_poll(struct mlx4_en_priv *priv, int tx_ind)
444 444
445 /* Poll the CQ every mlx4_en_TX_MODER_POLL packets */ 445 /* Poll the CQ every mlx4_en_TX_MODER_POLL packets */
446 if ((++ring->poll_cnt & (MLX4_EN_TX_POLL_MODER - 1)) == 0) 446 if ((++ring->poll_cnt & (MLX4_EN_TX_POLL_MODER - 1)) == 0)
447 if (spin_trylock(&ring->comp_lock)) { 447 if (spin_trylock_irq(&ring->comp_lock)) {
448 mlx4_en_process_tx_cq(priv->dev, cq); 448 mlx4_en_process_tx_cq(priv->dev, cq);
449 spin_unlock(&ring->comp_lock); 449 spin_unlock_irq(&ring->comp_lock);
450 } 450 }
451} 451}
452 452
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 7fa88d2b4c99..e94316b7868b 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -3561,54 +3561,64 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
3561 int handled = 0; 3561 int handled = 0;
3562 int status; 3562 int status;
3563 3563
3564 /* loop handling interrupts until we have no new ones or
3565 * we hit a invalid/hotplug case.
3566 */
3564 status = RTL_R16(IntrStatus); 3567 status = RTL_R16(IntrStatus);
3568 while (status && status != 0xffff) {
3569 handled = 1;
3565 3570
3566 /* hotplug/major error/no more work/shared irq */ 3571 /* Handle all of the error cases first. These will reset
3567 if ((status == 0xffff) || !status) 3572 * the chip, so just exit the loop.
3568 goto out; 3573 */
3569 3574 if (unlikely(!netif_running(dev))) {
3570 handled = 1; 3575 rtl8169_asic_down(ioaddr);
3576 break;
3577 }
3571 3578
3572 if (unlikely(!netif_running(dev))) { 3579 /* Work around for rx fifo overflow */
3573 rtl8169_asic_down(ioaddr); 3580 if (unlikely(status & RxFIFOOver) &&
3574 goto out; 3581 (tp->mac_version == RTL_GIGA_MAC_VER_11)) {
3575 } 3582 netif_stop_queue(dev);
3583 rtl8169_tx_timeout(dev);
3584 break;
3585 }
3576 3586
3577 status &= tp->intr_mask; 3587 if (unlikely(status & SYSErr)) {
3578 RTL_W16(IntrStatus, 3588 rtl8169_pcierr_interrupt(dev);
3579 (status & RxFIFOOver) ? (status | RxOverflow) : status); 3589 break;
3590 }
3580 3591
3581 if (!(status & tp->intr_event)) 3592 if (status & LinkChg)
3582 goto out; 3593 rtl8169_check_link_status(dev, tp, ioaddr);
3583 3594
3584 /* Work around for rx fifo overflow */ 3595 /* We need to see the lastest version of tp->intr_mask to
3585 if (unlikely(status & RxFIFOOver) && 3596 * avoid ignoring an MSI interrupt and having to wait for
3586 (tp->mac_version == RTL_GIGA_MAC_VER_11)) { 3597 * another event which may never come.
3587 netif_stop_queue(dev); 3598 */
3588 rtl8169_tx_timeout(dev); 3599 smp_rmb();
3589 goto out; 3600 if (status & tp->intr_mask & tp->napi_event) {
3590 } 3601 RTL_W16(IntrMask, tp->intr_event & ~tp->napi_event);
3602 tp->intr_mask = ~tp->napi_event;
3603
3604 if (likely(napi_schedule_prep(&tp->napi)))
3605 __napi_schedule(&tp->napi);
3606 else if (netif_msg_intr(tp)) {
3607 printk(KERN_INFO "%s: interrupt %04x in poll\n",
3608 dev->name, status);
3609 }
3610 }
3591 3611
3592 if (unlikely(status & SYSErr)) { 3612 /* We only get a new MSI interrupt when all active irq
3593 rtl8169_pcierr_interrupt(dev); 3613 * sources on the chip have been acknowledged. So, ack
3594 goto out; 3614 * everything we've seen and check if new sources have become
3615 * active to avoid blocking all interrupts from the chip.
3616 */
3617 RTL_W16(IntrStatus,
3618 (status & RxFIFOOver) ? (status | RxOverflow) : status);
3619 status = RTL_R16(IntrStatus);
3595 } 3620 }
3596 3621
3597 if (status & LinkChg)
3598 rtl8169_check_link_status(dev, tp, ioaddr);
3599
3600 if (status & tp->napi_event) {
3601 RTL_W16(IntrMask, tp->intr_event & ~tp->napi_event);
3602 tp->intr_mask = ~tp->napi_event;
3603
3604 if (likely(napi_schedule_prep(&tp->napi)))
3605 __napi_schedule(&tp->napi);
3606 else if (netif_msg_intr(tp)) {
3607 printk(KERN_INFO "%s: interrupt %04x in poll\n",
3608 dev->name, status);
3609 }
3610 }
3611out:
3612 return IRQ_RETVAL(handled); 3622 return IRQ_RETVAL(handled);
3613} 3623}
3614 3624
@@ -3624,13 +3634,15 @@ static int rtl8169_poll(struct napi_struct *napi, int budget)
3624 3634
3625 if (work_done < budget) { 3635 if (work_done < budget) {
3626 napi_complete(napi); 3636 napi_complete(napi);
3627 tp->intr_mask = 0xffff; 3637
3628 /* 3638 /* We need for force the visibility of tp->intr_mask
3629 * 20040426: the barrier is not strictly required but the 3639 * for other CPUs, as we can loose an MSI interrupt
3630 * behavior of the irq handler could be less predictable 3640 * and potentially wait for a retransmit timeout if we don't.
3631 * without it. Btw, the lack of flush for the posted pci 3641 * The posted write to IntrMask is safe, as it will
3632 * write is safe - FR 3642 * eventually make it to the chip and we won't loose anything
3643 * until it does.
3633 */ 3644 */
3645 tp->intr_mask = 0xffff;
3634 smp_wmb(); 3646 smp_wmb();
3635 RTL_W16(IntrMask, tp->intr_event); 3647 RTL_W16(IntrMask, tp->intr_event);
3636 } 3648 }
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
index a67d29290ba0..867324163ca2 100644
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -431,6 +431,7 @@ config RTL8187
431 ASUS P5B Deluxe 431 ASUS P5B Deluxe
432 Toshiba Satellite Pro series of laptops 432 Toshiba Satellite Pro series of laptops
433 Asus Wireless Link 433 Asus Wireless Link
434 Linksys WUSB54GC-EU
434 435
435 Thanks to Realtek for their support! 436 Thanks to Realtek for their support!
436 437
diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index cea7f1466c54..4efbdbe6d6bf 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -1873,18 +1873,18 @@ static void at76_dwork_hw_scan(struct work_struct *work)
1873 if (ret != CMD_STATUS_COMPLETE) { 1873 if (ret != CMD_STATUS_COMPLETE) {
1874 queue_delayed_work(priv->hw->workqueue, &priv->dwork_hw_scan, 1874 queue_delayed_work(priv->hw->workqueue, &priv->dwork_hw_scan,
1875 SCAN_POLL_INTERVAL); 1875 SCAN_POLL_INTERVAL);
1876 goto exit; 1876 mutex_unlock(&priv->mtx);
1877 return;
1877 } 1878 }
1878 1879
1879 ieee80211_scan_completed(priv->hw, false);
1880
1881 if (is_valid_ether_addr(priv->bssid)) 1880 if (is_valid_ether_addr(priv->bssid))
1882 at76_join(priv); 1881 at76_join(priv);
1883 1882
1884 ieee80211_wake_queues(priv->hw);
1885
1886exit:
1887 mutex_unlock(&priv->mtx); 1883 mutex_unlock(&priv->mtx);
1884
1885 ieee80211_scan_completed(priv->hw, false);
1886
1887 ieee80211_wake_queues(priv->hw);
1888} 1888}
1889 1889
1890static int at76_hw_scan(struct ieee80211_hw *hw, 1890static int at76_hw_scan(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c
index 3f22cc0c9679..294250e294dd 100644
--- a/drivers/net/wireless/rtl818x/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c
@@ -74,6 +74,8 @@ static struct usb_device_id rtl8187_table[] __devinitdata = {
74 {USB_DEVICE(0x18E8, 0x6232), .driver_info = DEVICE_RTL8187}, 74 {USB_DEVICE(0x18E8, 0x6232), .driver_info = DEVICE_RTL8187},
75 /* AirLive */ 75 /* AirLive */
76 {USB_DEVICE(0x1b75, 0x8187), .driver_info = DEVICE_RTL8187}, 76 {USB_DEVICE(0x1b75, 0x8187), .driver_info = DEVICE_RTL8187},
77 /* Linksys */
78 {USB_DEVICE(0x1737, 0x0073), .driver_info = DEVICE_RTL8187B},
77 {} 79 {}
78}; 80};
79 81