aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/atm/adummy.c2
-rw-r--r--drivers/atm/ambassador.c3
-rw-r--r--drivers/atm/atmtcp.c2
-rw-r--r--drivers/atm/eni.c2
-rw-r--r--drivers/atm/firestream.c2
-rw-r--r--drivers/atm/fore200e.c14
-rw-r--r--drivers/atm/he.c2
-rw-r--r--drivers/atm/horizon.c3
-rw-r--r--drivers/atm/idt77252.c3
-rw-r--r--drivers/atm/iphase.c2
-rw-r--r--drivers/atm/lanai.c2
-rw-r--r--drivers/atm/nicstar.c3
-rw-r--r--drivers/atm/solos-pci.c8
-rw-r--r--drivers/atm/zatm.c2
-rw-r--r--drivers/bluetooth/hci_ldisc.c6
-rw-r--r--drivers/connector/connector.c1
-rw-r--r--drivers/net/benet/be.h2
-rw-r--r--drivers/net/benet/be_cmds.c75
-rw-r--r--drivers/net/benet/be_main.c2
-rw-r--r--drivers/net/bonding/bond_ipv6.c7
-rw-r--r--drivers/net/bonding/bond_main.c59
-rw-r--r--drivers/net/bonding/bonding.h16
-rw-r--r--drivers/net/cxgb4vf/cxgb4vf_main.c15
-rw-r--r--drivers/net/enic/enic_main.c3
-rw-r--r--drivers/net/pcmcia/axnet_cs.c1
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c1
-rw-r--r--drivers/net/phy/Kconfig2
-rw-r--r--drivers/net/phy/icplus.c59
-rw-r--r--drivers/net/pppoe.c2
-rw-r--r--drivers/net/qlge/qlge.h1
-rw-r--r--drivers/net/qlge/qlge_main.c1
-rw-r--r--drivers/net/qlge/qlge_mpi.c12
-rw-r--r--drivers/net/r8169.c26
-rw-r--r--drivers/net/tehuti.c4
-rw-r--r--drivers/net/usb/asix.c4
-rw-r--r--drivers/net/usb/hso.c4
-rw-r--r--drivers/net/veth.c4
-rw-r--r--drivers/net/wan/hd64572.c5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-1000.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c12
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c88
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-lib.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-eeprom.h25
-rw-r--r--drivers/net/wireless/libertas/cfg.c2
-rw-r--r--drivers/net/wireless/p54/p54usb.c6
-rw-r--r--drivers/usb/atm/usbatm.c15
47 files changed, 349 insertions, 170 deletions
diff --git a/drivers/atm/adummy.c b/drivers/atm/adummy.c
index 46b94762125b..f9b983ae6877 100644
--- a/drivers/atm/adummy.c
+++ b/drivers/atm/adummy.c
@@ -154,7 +154,7 @@ static int __init adummy_init(void)
154 err = -ENOMEM; 154 err = -ENOMEM;
155 goto out; 155 goto out;
156 } 156 }
157 atm_dev = atm_dev_register(DEV_LABEL, &adummy_ops, -1, NULL); 157 atm_dev = atm_dev_register(DEV_LABEL, NULL, &adummy_ops, -1, NULL);
158 if (!atm_dev) { 158 if (!atm_dev) {
159 printk(KERN_ERR DEV_LABEL ": atm_dev_register() failed\n"); 159 printk(KERN_ERR DEV_LABEL ": atm_dev_register() failed\n");
160 err = -ENODEV; 160 err = -ENODEV;
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c
index a33896a482e6..ffe9b655292e 100644
--- a/drivers/atm/ambassador.c
+++ b/drivers/atm/ambassador.c
@@ -2244,7 +2244,8 @@ static int __devinit amb_probe(struct pci_dev *pci_dev, const struct pci_device_
2244 goto out_reset; 2244 goto out_reset;
2245 } 2245 }
2246 2246
2247 dev->atm_dev = atm_dev_register (DEV_LABEL, &amb_ops, -1, NULL); 2247 dev->atm_dev = atm_dev_register (DEV_LABEL, &pci_dev->dev, &amb_ops, -1,
2248 NULL);
2248 if (!dev->atm_dev) { 2249 if (!dev->atm_dev) {
2249 PRINTD (DBG_ERR, "failed to register Madge ATM adapter"); 2250 PRINTD (DBG_ERR, "failed to register Madge ATM adapter");
2250 err = -EINVAL; 2251 err = -EINVAL;
diff --git a/drivers/atm/atmtcp.c b/drivers/atm/atmtcp.c
index b9101818b47b..2b464b631f22 100644
--- a/drivers/atm/atmtcp.c
+++ b/drivers/atm/atmtcp.c
@@ -366,7 +366,7 @@ static int atmtcp_create(int itf,int persist,struct atm_dev **result)
366 if (!dev_data) 366 if (!dev_data)
367 return -ENOMEM; 367 return -ENOMEM;
368 368
369 dev = atm_dev_register(DEV_LABEL,&atmtcp_v_dev_ops,itf,NULL); 369 dev = atm_dev_register(DEV_LABEL,NULL,&atmtcp_v_dev_ops,itf,NULL);
370 if (!dev) { 370 if (!dev) {
371 kfree(dev_data); 371 kfree(dev_data);
372 return itf == -1 ? -ENOMEM : -EBUSY; 372 return itf == -1 ? -ENOMEM : -EBUSY;
diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c
index 97c5898cd76e..c495fae74200 100644
--- a/drivers/atm/eni.c
+++ b/drivers/atm/eni.c
@@ -2244,7 +2244,7 @@ static int __devinit eni_init_one(struct pci_dev *pci_dev,
2244 &zeroes); 2244 &zeroes);
2245 if (!cpu_zeroes) goto out1; 2245 if (!cpu_zeroes) goto out1;
2246 } 2246 }
2247 dev = atm_dev_register(DEV_LABEL,&ops,-1,NULL); 2247 dev = atm_dev_register(DEV_LABEL, &pci_dev->dev, &ops, -1, NULL);
2248 if (!dev) goto out2; 2248 if (!dev) goto out2;
2249 pci_set_drvdata(pci_dev, dev); 2249 pci_set_drvdata(pci_dev, dev);
2250 eni_dev->pci_dev = pci_dev; 2250 eni_dev->pci_dev = pci_dev;
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c
index 5d86bb803e94..7d912baf01d4 100644
--- a/drivers/atm/firestream.c
+++ b/drivers/atm/firestream.c
@@ -1911,7 +1911,7 @@ static int __devinit firestream_init_one (struct pci_dev *pci_dev,
1911 fs_dev, sizeof (struct fs_dev)); 1911 fs_dev, sizeof (struct fs_dev));
1912 if (!fs_dev) 1912 if (!fs_dev)
1913 goto err_out; 1913 goto err_out;
1914 atm_dev = atm_dev_register("fs", &ops, -1, NULL); 1914 atm_dev = atm_dev_register("fs", &pci_dev->dev, &ops, -1, NULL);
1915 if (!atm_dev) 1915 if (!atm_dev)
1916 goto err_out_free_fs_dev; 1916 goto err_out_free_fs_dev;
1917 1917
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index c09761959354..44f778507770 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -2567,14 +2567,14 @@ release:
2567 2567
2568 2568
2569static int __devinit 2569static int __devinit
2570fore200e_register(struct fore200e* fore200e) 2570fore200e_register(struct fore200e* fore200e, struct device *parent)
2571{ 2571{
2572 struct atm_dev* atm_dev; 2572 struct atm_dev* atm_dev;
2573 2573
2574 DPRINTK(2, "device %s being registered\n", fore200e->name); 2574 DPRINTK(2, "device %s being registered\n", fore200e->name);
2575 2575
2576 atm_dev = atm_dev_register(fore200e->bus->proc_name, &fore200e_ops, -1, 2576 atm_dev = atm_dev_register(fore200e->bus->proc_name, parent, &fore200e_ops,
2577 NULL); 2577 -1, NULL);
2578 if (atm_dev == NULL) { 2578 if (atm_dev == NULL) {
2579 printk(FORE200E "unable to register device %s\n", fore200e->name); 2579 printk(FORE200E "unable to register device %s\n", fore200e->name);
2580 return -ENODEV; 2580 return -ENODEV;
@@ -2594,9 +2594,9 @@ fore200e_register(struct fore200e* fore200e)
2594 2594
2595 2595
2596static int __devinit 2596static int __devinit
2597fore200e_init(struct fore200e* fore200e) 2597fore200e_init(struct fore200e* fore200e, struct device *parent)
2598{ 2598{
2599 if (fore200e_register(fore200e) < 0) 2599 if (fore200e_register(fore200e, parent) < 0)
2600 return -ENODEV; 2600 return -ENODEV;
2601 2601
2602 if (fore200e->bus->configure(fore200e) < 0) 2602 if (fore200e->bus->configure(fore200e) < 0)
@@ -2662,7 +2662,7 @@ static int __devinit fore200e_sba_probe(struct platform_device *op,
2662 2662
2663 sprintf(fore200e->name, "%s-%d", bus->model_name, index); 2663 sprintf(fore200e->name, "%s-%d", bus->model_name, index);
2664 2664
2665 err = fore200e_init(fore200e); 2665 err = fore200e_init(fore200e, &op->dev);
2666 if (err < 0) { 2666 if (err < 0) {
2667 fore200e_shutdown(fore200e); 2667 fore200e_shutdown(fore200e);
2668 kfree(fore200e); 2668 kfree(fore200e);
@@ -2740,7 +2740,7 @@ fore200e_pca_detect(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent
2740 2740
2741 sprintf(fore200e->name, "%s-%d", bus->model_name, index); 2741 sprintf(fore200e->name, "%s-%d", bus->model_name, index);
2742 2742
2743 err = fore200e_init(fore200e); 2743 err = fore200e_init(fore200e, &pci_dev->dev);
2744 if (err < 0) { 2744 if (err < 0) {
2745 fore200e_shutdown(fore200e); 2745 fore200e_shutdown(fore200e);
2746 goto out_free; 2746 goto out_free;
diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index 801e8b6e9d1f..6cf59bf281dc 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -366,7 +366,7 @@ he_init_one(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent)
366 goto init_one_failure; 366 goto init_one_failure;
367 } 367 }
368 368
369 atm_dev = atm_dev_register(DEV_LABEL, &he_ops, -1, NULL); 369 atm_dev = atm_dev_register(DEV_LABEL, &pci_dev->dev, &he_ops, -1, NULL);
370 if (!atm_dev) { 370 if (!atm_dev) {
371 err = -ENODEV; 371 err = -ENODEV;
372 goto init_one_failure; 372 goto init_one_failure;
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c
index a95790452a68..24761e1d6642 100644
--- a/drivers/atm/horizon.c
+++ b/drivers/atm/horizon.c
@@ -2733,7 +2733,8 @@ static int __devinit hrz_probe(struct pci_dev *pci_dev, const struct pci_device_
2733 PRINTD(DBG_INFO, "found Madge ATM adapter (hrz) at: IO %x, IRQ %u, MEM %p", 2733 PRINTD(DBG_INFO, "found Madge ATM adapter (hrz) at: IO %x, IRQ %u, MEM %p",
2734 iobase, irq, membase); 2734 iobase, irq, membase);
2735 2735
2736 dev->atm_dev = atm_dev_register(DEV_LABEL, &hrz_ops, -1, NULL); 2736 dev->atm_dev = atm_dev_register(DEV_LABEL, &pci_dev->dev, &hrz_ops, -1,
2737 NULL);
2737 if (!(dev->atm_dev)) { 2738 if (!(dev->atm_dev)) {
2738 PRINTD(DBG_ERR, "failed to register Madge ATM adapter"); 2739 PRINTD(DBG_ERR, "failed to register Madge ATM adapter");
2739 err = -EINVAL; 2740 err = -EINVAL;
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
index bce57328ddde..bfb7feee0400 100644
--- a/drivers/atm/idt77252.c
+++ b/drivers/atm/idt77252.c
@@ -3698,7 +3698,8 @@ idt77252_init_one(struct pci_dev *pcidev, const struct pci_device_id *id)
3698 goto err_out_iounmap; 3698 goto err_out_iounmap;
3699 } 3699 }
3700 3700
3701 dev = atm_dev_register("idt77252", &idt77252_ops, -1, NULL); 3701 dev = atm_dev_register("idt77252", &pcidev->dev, &idt77252_ops, -1,
3702 NULL);
3702 if (!dev) { 3703 if (!dev) {
3703 printk("%s: can't register atm device\n", card->name); 3704 printk("%s: can't register atm device\n", card->name);
3704 err = -EIO; 3705 err = -EIO;
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index 9309d4724e13..729254053758 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -3172,7 +3172,7 @@ static int __devinit ia_init_one(struct pci_dev *pdev,
3172 ret = -ENODEV; 3172 ret = -ENODEV;
3173 goto err_out_free_iadev; 3173 goto err_out_free_iadev;
3174 } 3174 }
3175 dev = atm_dev_register(DEV_LABEL, &ops, -1, NULL); 3175 dev = atm_dev_register(DEV_LABEL, &pdev->dev, &ops, -1, NULL);
3176 if (!dev) { 3176 if (!dev) {
3177 ret = -ENOMEM; 3177 ret = -ENOMEM;
3178 goto err_out_disable_dev; 3178 goto err_out_disable_dev;
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c
index 930051d941a7..52880c8387d8 100644
--- a/drivers/atm/lanai.c
+++ b/drivers/atm/lanai.c
@@ -2588,7 +2588,7 @@ static int __devinit lanai_init_one(struct pci_dev *pci,
2588 return -ENOMEM; 2588 return -ENOMEM;
2589 } 2589 }
2590 2590
2591 atmdev = atm_dev_register(DEV_LABEL, &ops, -1, NULL); 2591 atmdev = atm_dev_register(DEV_LABEL, &pci->dev, &ops, -1, NULL);
2592 if (atmdev == NULL) { 2592 if (atmdev == NULL) {
2593 printk(KERN_ERR DEV_LABEL 2593 printk(KERN_ERR DEV_LABEL
2594 ": couldn't register atm device!\n"); 2594 ": couldn't register atm device!\n");
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c
index 2f3516b7f118..6b313ee9231b 100644
--- a/drivers/atm/nicstar.c
+++ b/drivers/atm/nicstar.c
@@ -771,7 +771,8 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev)
771 } 771 }
772 772
773 /* Register device */ 773 /* Register device */
774 card->atmdev = atm_dev_register("nicstar", &atm_ops, -1, NULL); 774 card->atmdev = atm_dev_register("nicstar", &card->pcidev->dev, &atm_ops,
775 -1, NULL);
775 if (card->atmdev == NULL) { 776 if (card->atmdev == NULL) {
776 printk("nicstar%d: can't register device.\n", i); 777 printk("nicstar%d: can't register device.\n", i);
777 error = 17; 778 error = 17;
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
index 2e08c996fd30..73fb1c4f4cd4 100644
--- a/drivers/atm/solos-pci.c
+++ b/drivers/atm/solos-pci.c
@@ -166,7 +166,7 @@ static irqreturn_t solos_irq(int irq, void *dev_id);
166static struct atm_vcc* find_vcc(struct atm_dev *dev, short vpi, int vci); 166static struct atm_vcc* find_vcc(struct atm_dev *dev, short vpi, int vci);
167static int list_vccs(int vci); 167static int list_vccs(int vci);
168static void release_vccs(struct atm_dev *dev); 168static void release_vccs(struct atm_dev *dev);
169static int atm_init(struct solos_card *); 169static int atm_init(struct solos_card *, struct device *);
170static void atm_remove(struct solos_card *); 170static void atm_remove(struct solos_card *);
171static int send_command(struct solos_card *card, int dev, const char *buf, size_t size); 171static int send_command(struct solos_card *card, int dev, const char *buf, size_t size);
172static void solos_bh(unsigned long); 172static void solos_bh(unsigned long);
@@ -1210,7 +1210,7 @@ static int fpga_probe(struct pci_dev *dev, const struct pci_device_id *id)
1210 if (db_firmware_upgrade) 1210 if (db_firmware_upgrade)
1211 flash_upgrade(card, 3); 1211 flash_upgrade(card, 3);
1212 1212
1213 err = atm_init(card); 1213 err = atm_init(card, &dev->dev);
1214 if (err) 1214 if (err)
1215 goto out_free_irq; 1215 goto out_free_irq;
1216 1216
@@ -1233,7 +1233,7 @@ static int fpga_probe(struct pci_dev *dev, const struct pci_device_id *id)
1233 return err; 1233 return err;
1234} 1234}
1235 1235
1236static int atm_init(struct solos_card *card) 1236static int atm_init(struct solos_card *card, struct device *parent)
1237{ 1237{
1238 int i; 1238 int i;
1239 1239
@@ -1244,7 +1244,7 @@ static int atm_init(struct solos_card *card)
1244 skb_queue_head_init(&card->tx_queue[i]); 1244 skb_queue_head_init(&card->tx_queue[i]);
1245 skb_queue_head_init(&card->cli_queue[i]); 1245 skb_queue_head_init(&card->cli_queue[i]);
1246 1246
1247 card->atmdev[i] = atm_dev_register("solos-pci", &fpga_ops, -1, NULL); 1247 card->atmdev[i] = atm_dev_register("solos-pci", parent, &fpga_ops, -1, NULL);
1248 if (!card->atmdev[i]) { 1248 if (!card->atmdev[i]) {
1249 dev_err(&card->dev->dev, "Could not register ATM device %d\n", i); 1249 dev_err(&card->dev->dev, "Could not register ATM device %d\n", i);
1250 atm_remove(card); 1250 atm_remove(card);
diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c
index 4e885d2da49c..624917902b65 100644
--- a/drivers/atm/zatm.c
+++ b/drivers/atm/zatm.c
@@ -1597,7 +1597,7 @@ static int __devinit zatm_init_one(struct pci_dev *pci_dev,
1597 goto out; 1597 goto out;
1598 } 1598 }
1599 1599
1600 dev = atm_dev_register(DEV_LABEL, &ops, -1, NULL); 1600 dev = atm_dev_register(DEV_LABEL, &pci_dev->dev, &ops, -1, NULL);
1601 if (!dev) 1601 if (!dev)
1602 goto out_free; 1602 goto out_free;
1603 1603
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 720148294e64..3c6cabcb7d84 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -311,8 +311,10 @@ static void hci_uart_tty_close(struct tty_struct *tty)
311 311
312 if (test_and_clear_bit(HCI_UART_PROTO_SET, &hu->flags)) { 312 if (test_and_clear_bit(HCI_UART_PROTO_SET, &hu->flags)) {
313 hu->proto->close(hu); 313 hu->proto->close(hu);
314 hci_unregister_dev(hdev); 314 if (hdev) {
315 hci_free_dev(hdev); 315 hci_unregister_dev(hdev);
316 hci_free_dev(hdev);
317 }
316 } 318 }
317 } 319 }
318} 320}
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index e16c3fa8d2e3..05117f1ad867 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -36,6 +36,7 @@
36MODULE_LICENSE("GPL"); 36MODULE_LICENSE("GPL");
37MODULE_AUTHOR("Evgeniy Polyakov <zbr@ioremap.net>"); 37MODULE_AUTHOR("Evgeniy Polyakov <zbr@ioremap.net>");
38MODULE_DESCRIPTION("Generic userspace <-> kernelspace connector."); 38MODULE_DESCRIPTION("Generic userspace <-> kernelspace connector.");
39MODULE_ALIAS_NET_PF_PROTO(PF_NETLINK, NETLINK_CONNECTOR);
39 40
40static struct cn_dev cdev; 41static struct cn_dev cdev;
41 42
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index 9cab32328bba..add0b93350dd 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -242,7 +242,7 @@ struct be_adapter {
242 u8 __iomem *db; /* Door Bell */ 242 u8 __iomem *db; /* Door Bell */
243 u8 __iomem *pcicfg; /* PCI config space */ 243 u8 __iomem *pcicfg; /* PCI config space */
244 244
245 spinlock_t mbox_lock; /* For serializing mbox cmds to BE card */ 245 struct mutex mbox_lock; /* For serializing mbox cmds to BE card */
246 struct be_dma_mem mbox_mem; 246 struct be_dma_mem mbox_mem;
247 /* Mbox mem is adjusted to align to 16 bytes. The allocated addr 247 /* Mbox mem is adjusted to align to 16 bytes. The allocated addr
248 * is stored for freeing purpose */ 248 * is stored for freeing purpose */
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index 171a08caf2be..0c7811faf72c 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -467,7 +467,8 @@ int be_cmd_fw_init(struct be_adapter *adapter)
467 u8 *wrb; 467 u8 *wrb;
468 int status; 468 int status;
469 469
470 spin_lock(&adapter->mbox_lock); 470 if (mutex_lock_interruptible(&adapter->mbox_lock))
471 return -1;
471 472
472 wrb = (u8 *)wrb_from_mbox(adapter); 473 wrb = (u8 *)wrb_from_mbox(adapter);
473 *wrb++ = 0xFF; 474 *wrb++ = 0xFF;
@@ -481,7 +482,7 @@ int be_cmd_fw_init(struct be_adapter *adapter)
481 482
482 status = be_mbox_notify_wait(adapter); 483 status = be_mbox_notify_wait(adapter);
483 484
484 spin_unlock(&adapter->mbox_lock); 485 mutex_unlock(&adapter->mbox_lock);
485 return status; 486 return status;
486} 487}
487 488
@@ -496,7 +497,8 @@ int be_cmd_fw_clean(struct be_adapter *adapter)
496 if (adapter->eeh_err) 497 if (adapter->eeh_err)
497 return -EIO; 498 return -EIO;
498 499
499 spin_lock(&adapter->mbox_lock); 500 if (mutex_lock_interruptible(&adapter->mbox_lock))
501 return -1;
500 502
501 wrb = (u8 *)wrb_from_mbox(adapter); 503 wrb = (u8 *)wrb_from_mbox(adapter);
502 *wrb++ = 0xFF; 504 *wrb++ = 0xFF;
@@ -510,7 +512,7 @@ int be_cmd_fw_clean(struct be_adapter *adapter)
510 512
511 status = be_mbox_notify_wait(adapter); 513 status = be_mbox_notify_wait(adapter);
512 514
513 spin_unlock(&adapter->mbox_lock); 515 mutex_unlock(&adapter->mbox_lock);
514 return status; 516 return status;
515} 517}
516int be_cmd_eq_create(struct be_adapter *adapter, 518int be_cmd_eq_create(struct be_adapter *adapter,
@@ -521,7 +523,8 @@ int be_cmd_eq_create(struct be_adapter *adapter,
521 struct be_dma_mem *q_mem = &eq->dma_mem; 523 struct be_dma_mem *q_mem = &eq->dma_mem;
522 int status; 524 int status;
523 525
524 spin_lock(&adapter->mbox_lock); 526 if (mutex_lock_interruptible(&adapter->mbox_lock))
527 return -1;
525 528
526 wrb = wrb_from_mbox(adapter); 529 wrb = wrb_from_mbox(adapter);
527 req = embedded_payload(wrb); 530 req = embedded_payload(wrb);
@@ -551,7 +554,7 @@ int be_cmd_eq_create(struct be_adapter *adapter,
551 eq->created = true; 554 eq->created = true;
552 } 555 }
553 556
554 spin_unlock(&adapter->mbox_lock); 557 mutex_unlock(&adapter->mbox_lock);
555 return status; 558 return status;
556} 559}
557 560
@@ -563,7 +566,8 @@ int be_cmd_mac_addr_query(struct be_adapter *adapter, u8 *mac_addr,
563 struct be_cmd_req_mac_query *req; 566 struct be_cmd_req_mac_query *req;
564 int status; 567 int status;
565 568
566 spin_lock(&adapter->mbox_lock); 569 if (mutex_lock_interruptible(&adapter->mbox_lock))
570 return -1;
567 571
568 wrb = wrb_from_mbox(adapter); 572 wrb = wrb_from_mbox(adapter);
569 req = embedded_payload(wrb); 573 req = embedded_payload(wrb);
@@ -588,7 +592,7 @@ int be_cmd_mac_addr_query(struct be_adapter *adapter, u8 *mac_addr,
588 memcpy(mac_addr, resp->mac.addr, ETH_ALEN); 592 memcpy(mac_addr, resp->mac.addr, ETH_ALEN);
589 } 593 }
590 594
591 spin_unlock(&adapter->mbox_lock); 595 mutex_unlock(&adapter->mbox_lock);
592 return status; 596 return status;
593} 597}
594 598
@@ -672,7 +676,8 @@ int be_cmd_cq_create(struct be_adapter *adapter,
672 void *ctxt; 676 void *ctxt;
673 int status; 677 int status;
674 678
675 spin_lock(&adapter->mbox_lock); 679 if (mutex_lock_interruptible(&adapter->mbox_lock))
680 return -1;
676 681
677 wrb = wrb_from_mbox(adapter); 682 wrb = wrb_from_mbox(adapter);
678 req = embedded_payload(wrb); 683 req = embedded_payload(wrb);
@@ -726,7 +731,7 @@ int be_cmd_cq_create(struct be_adapter *adapter,
726 cq->created = true; 731 cq->created = true;
727 } 732 }
728 733
729 spin_unlock(&adapter->mbox_lock); 734 mutex_unlock(&adapter->mbox_lock);
730 735
731 return status; 736 return status;
732} 737}
@@ -749,7 +754,8 @@ int be_cmd_mccq_create(struct be_adapter *adapter,
749 void *ctxt; 754 void *ctxt;
750 int status; 755 int status;
751 756
752 spin_lock(&adapter->mbox_lock); 757 if (mutex_lock_interruptible(&adapter->mbox_lock))
758 return -1;
753 759
754 wrb = wrb_from_mbox(adapter); 760 wrb = wrb_from_mbox(adapter);
755 req = embedded_payload(wrb); 761 req = embedded_payload(wrb);
@@ -793,7 +799,7 @@ int be_cmd_mccq_create(struct be_adapter *adapter,
793 mccq->id = le16_to_cpu(resp->id); 799 mccq->id = le16_to_cpu(resp->id);
794 mccq->created = true; 800 mccq->created = true;
795 } 801 }
796 spin_unlock(&adapter->mbox_lock); 802 mutex_unlock(&adapter->mbox_lock);
797 803
798 return status; 804 return status;
799} 805}
@@ -808,7 +814,8 @@ int be_cmd_txq_create(struct be_adapter *adapter,
808 void *ctxt; 814 void *ctxt;
809 int status; 815 int status;
810 816
811 spin_lock(&adapter->mbox_lock); 817 if (mutex_lock_interruptible(&adapter->mbox_lock))
818 return -1;
812 819
813 wrb = wrb_from_mbox(adapter); 820 wrb = wrb_from_mbox(adapter);
814 req = embedded_payload(wrb); 821 req = embedded_payload(wrb);
@@ -840,7 +847,7 @@ int be_cmd_txq_create(struct be_adapter *adapter,
840 txq->created = true; 847 txq->created = true;
841 } 848 }
842 849
843 spin_unlock(&adapter->mbox_lock); 850 mutex_unlock(&adapter->mbox_lock);
844 851
845 return status; 852 return status;
846} 853}
@@ -855,7 +862,8 @@ int be_cmd_rxq_create(struct be_adapter *adapter,
855 struct be_dma_mem *q_mem = &rxq->dma_mem; 862 struct be_dma_mem *q_mem = &rxq->dma_mem;
856 int status; 863 int status;
857 864
858 spin_lock(&adapter->mbox_lock); 865 if (mutex_lock_interruptible(&adapter->mbox_lock))
866 return -1;
859 867
860 wrb = wrb_from_mbox(adapter); 868 wrb = wrb_from_mbox(adapter);
861 req = embedded_payload(wrb); 869 req = embedded_payload(wrb);
@@ -882,7 +890,7 @@ int be_cmd_rxq_create(struct be_adapter *adapter,
882 *rss_id = resp->rss_id; 890 *rss_id = resp->rss_id;
883 } 891 }
884 892
885 spin_unlock(&adapter->mbox_lock); 893 mutex_unlock(&adapter->mbox_lock);
886 894
887 return status; 895 return status;
888} 896}
@@ -901,7 +909,8 @@ int be_cmd_q_destroy(struct be_adapter *adapter, struct be_queue_info *q,
901 if (adapter->eeh_err) 909 if (adapter->eeh_err)
902 return -EIO; 910 return -EIO;
903 911
904 spin_lock(&adapter->mbox_lock); 912 if (mutex_lock_interruptible(&adapter->mbox_lock))
913 return -1;
905 914
906 wrb = wrb_from_mbox(adapter); 915 wrb = wrb_from_mbox(adapter);
907 req = embedded_payload(wrb); 916 req = embedded_payload(wrb);
@@ -938,7 +947,7 @@ int be_cmd_q_destroy(struct be_adapter *adapter, struct be_queue_info *q,
938 947
939 status = be_mbox_notify_wait(adapter); 948 status = be_mbox_notify_wait(adapter);
940 949
941 spin_unlock(&adapter->mbox_lock); 950 mutex_unlock(&adapter->mbox_lock);
942 951
943 return status; 952 return status;
944} 953}
@@ -954,7 +963,8 @@ int be_cmd_if_create(struct be_adapter *adapter, u32 cap_flags, u32 en_flags,
954 struct be_cmd_req_if_create *req; 963 struct be_cmd_req_if_create *req;
955 int status; 964 int status;
956 965
957 spin_lock(&adapter->mbox_lock); 966 if (mutex_lock_interruptible(&adapter->mbox_lock))
967 return -1;
958 968
959 wrb = wrb_from_mbox(adapter); 969 wrb = wrb_from_mbox(adapter);
960 req = embedded_payload(wrb); 970 req = embedded_payload(wrb);
@@ -980,7 +990,7 @@ int be_cmd_if_create(struct be_adapter *adapter, u32 cap_flags, u32 en_flags,
980 *pmac_id = le32_to_cpu(resp->pmac_id); 990 *pmac_id = le32_to_cpu(resp->pmac_id);
981 } 991 }
982 992
983 spin_unlock(&adapter->mbox_lock); 993 mutex_unlock(&adapter->mbox_lock);
984 return status; 994 return status;
985} 995}
986 996
@@ -994,7 +1004,8 @@ int be_cmd_if_destroy(struct be_adapter *adapter, u32 interface_id)
994 if (adapter->eeh_err) 1004 if (adapter->eeh_err)
995 return -EIO; 1005 return -EIO;
996 1006
997 spin_lock(&adapter->mbox_lock); 1007 if (mutex_lock_interruptible(&adapter->mbox_lock))
1008 return -1;
998 1009
999 wrb = wrb_from_mbox(adapter); 1010 wrb = wrb_from_mbox(adapter);
1000 req = embedded_payload(wrb); 1011 req = embedded_payload(wrb);
@@ -1009,7 +1020,7 @@ int be_cmd_if_destroy(struct be_adapter *adapter, u32 interface_id)
1009 1020
1010 status = be_mbox_notify_wait(adapter); 1021 status = be_mbox_notify_wait(adapter);
1011 1022
1012 spin_unlock(&adapter->mbox_lock); 1023 mutex_unlock(&adapter->mbox_lock);
1013 1024
1014 return status; 1025 return status;
1015} 1026}
@@ -1099,7 +1110,8 @@ int be_cmd_get_fw_ver(struct be_adapter *adapter, char *fw_ver)
1099 struct be_cmd_req_get_fw_version *req; 1110 struct be_cmd_req_get_fw_version *req;
1100 int status; 1111 int status;
1101 1112
1102 spin_lock(&adapter->mbox_lock); 1113 if (mutex_lock_interruptible(&adapter->mbox_lock))
1114 return -1;
1103 1115
1104 wrb = wrb_from_mbox(adapter); 1116 wrb = wrb_from_mbox(adapter);
1105 req = embedded_payload(wrb); 1117 req = embedded_payload(wrb);
@@ -1116,7 +1128,7 @@ int be_cmd_get_fw_ver(struct be_adapter *adapter, char *fw_ver)
1116 strncpy(fw_ver, resp->firmware_version_string, FW_VER_LEN); 1128 strncpy(fw_ver, resp->firmware_version_string, FW_VER_LEN);
1117 } 1129 }
1118 1130
1119 spin_unlock(&adapter->mbox_lock); 1131 mutex_unlock(&adapter->mbox_lock);
1120 return status; 1132 return status;
1121} 1133}
1122 1134
@@ -1361,7 +1373,8 @@ int be_cmd_query_fw_cfg(struct be_adapter *adapter, u32 *port_num,
1361 struct be_cmd_req_query_fw_cfg *req; 1373 struct be_cmd_req_query_fw_cfg *req;
1362 int status; 1374 int status;
1363 1375
1364 spin_lock(&adapter->mbox_lock); 1376 if (mutex_lock_interruptible(&adapter->mbox_lock))
1377 return -1;
1365 1378
1366 wrb = wrb_from_mbox(adapter); 1379 wrb = wrb_from_mbox(adapter);
1367 req = embedded_payload(wrb); 1380 req = embedded_payload(wrb);
@@ -1380,7 +1393,7 @@ int be_cmd_query_fw_cfg(struct be_adapter *adapter, u32 *port_num,
1380 *caps = le32_to_cpu(resp->function_caps); 1393 *caps = le32_to_cpu(resp->function_caps);
1381 } 1394 }
1382 1395
1383 spin_unlock(&adapter->mbox_lock); 1396 mutex_unlock(&adapter->mbox_lock);
1384 return status; 1397 return status;
1385} 1398}
1386 1399
@@ -1391,7 +1404,8 @@ int be_cmd_reset_function(struct be_adapter *adapter)
1391 struct be_cmd_req_hdr *req; 1404 struct be_cmd_req_hdr *req;
1392 int status; 1405 int status;
1393 1406
1394 spin_lock(&adapter->mbox_lock); 1407 if (mutex_lock_interruptible(&adapter->mbox_lock))
1408 return -1;
1395 1409
1396 wrb = wrb_from_mbox(adapter); 1410 wrb = wrb_from_mbox(adapter);
1397 req = embedded_payload(wrb); 1411 req = embedded_payload(wrb);
@@ -1404,7 +1418,7 @@ int be_cmd_reset_function(struct be_adapter *adapter)
1404 1418
1405 status = be_mbox_notify_wait(adapter); 1419 status = be_mbox_notify_wait(adapter);
1406 1420
1407 spin_unlock(&adapter->mbox_lock); 1421 mutex_unlock(&adapter->mbox_lock);
1408 return status; 1422 return status;
1409} 1423}
1410 1424
@@ -1415,7 +1429,8 @@ int be_cmd_rss_config(struct be_adapter *adapter, u8 *rsstable, u16 table_size)
1415 u32 myhash[10]; 1429 u32 myhash[10];
1416 int status; 1430 int status;
1417 1431
1418 spin_lock(&adapter->mbox_lock); 1432 if (mutex_lock_interruptible(&adapter->mbox_lock))
1433 return -1;
1419 1434
1420 wrb = wrb_from_mbox(adapter); 1435 wrb = wrb_from_mbox(adapter);
1421 req = embedded_payload(wrb); 1436 req = embedded_payload(wrb);
@@ -1435,7 +1450,7 @@ int be_cmd_rss_config(struct be_adapter *adapter, u8 *rsstable, u16 table_size)
1435 1450
1436 status = be_mbox_notify_wait(adapter); 1451 status = be_mbox_notify_wait(adapter);
1437 1452
1438 spin_unlock(&adapter->mbox_lock); 1453 mutex_unlock(&adapter->mbox_lock);
1439 return status; 1454 return status;
1440} 1455}
1441 1456
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 0b35e4a8bf19..88ce68d63bca 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -2746,7 +2746,7 @@ static int be_ctrl_init(struct be_adapter *adapter)
2746 } 2746 }
2747 memset(mc_cmd_mem->va, 0, mc_cmd_mem->size); 2747 memset(mc_cmd_mem->va, 0, mc_cmd_mem->size);
2748 2748
2749 spin_lock_init(&adapter->mbox_lock); 2749 mutex_init(&adapter->mbox_lock);
2750 spin_lock_init(&adapter->mcc_lock); 2750 spin_lock_init(&adapter->mcc_lock);
2751 spin_lock_init(&adapter->mcc_cq_lock); 2751 spin_lock_init(&adapter->mcc_cq_lock);
2752 2752
diff --git a/drivers/net/bonding/bond_ipv6.c b/drivers/net/bonding/bond_ipv6.c
index 121b073a6c3f..84fbd4ebd778 100644
--- a/drivers/net/bonding/bond_ipv6.c
+++ b/drivers/net/bonding/bond_ipv6.c
@@ -88,7 +88,12 @@ static void bond_na_send(struct net_device *slave_dev,
88 } 88 }
89 89
90 if (vlan_id) { 90 if (vlan_id) {
91 skb = vlan_put_tag(skb, vlan_id); 91 /* The Ethernet header is not present yet, so it is
92 * too early to insert a VLAN tag. Force use of an
93 * out-of-line tag here and let dev_hard_start_xmit()
94 * insert it if the slave hardware can't.
95 */
96 skb = __vlan_hwaccel_put_tag(skb, vlan_id);
92 if (!skb) { 97 if (!skb) {
93 pr_err("failed to insert VLAN tag\n"); 98 pr_err("failed to insert VLAN tag\n");
94 return; 99 return;
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 07011e42cec7..b1025b85acf1 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -171,7 +171,7 @@ MODULE_PARM_DESC(resend_igmp, "Number of IGMP membership reports to send on link
171/*----------------------------- Global variables ----------------------------*/ 171/*----------------------------- Global variables ----------------------------*/
172 172
173#ifdef CONFIG_NET_POLL_CONTROLLER 173#ifdef CONFIG_NET_POLL_CONTROLLER
174cpumask_var_t netpoll_block_tx; 174atomic_t netpoll_block_tx = ATOMIC_INIT(0);
175#endif 175#endif
176 176
177static const char * const version = 177static const char * const version =
@@ -418,36 +418,11 @@ struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr)
418 * @bond: bond device that got this skb for tx. 418 * @bond: bond device that got this skb for tx.
419 * @skb: hw accel VLAN tagged skb to transmit 419 * @skb: hw accel VLAN tagged skb to transmit
420 * @slave_dev: slave that is supposed to xmit this skbuff 420 * @slave_dev: slave that is supposed to xmit this skbuff
421 *
422 * When the bond gets an skb to transmit that is
423 * already hardware accelerated VLAN tagged, and it
424 * needs to relay this skb to a slave that is not
425 * hw accel capable, the skb needs to be "unaccelerated",
426 * i.e. strip the hwaccel tag and re-insert it as part
427 * of the payload.
428 */ 421 */
429int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, 422int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb,
430 struct net_device *slave_dev) 423 struct net_device *slave_dev)
431{ 424{
432 unsigned short uninitialized_var(vlan_id); 425 skb->dev = slave_dev;
433
434 /* Test vlan_list not vlgrp to catch and handle 802.1p tags */
435 if (!list_empty(&bond->vlan_list) &&
436 !(slave_dev->features & NETIF_F_HW_VLAN_TX) &&
437 vlan_get_tag(skb, &vlan_id) == 0) {
438 skb->dev = slave_dev;
439 skb = vlan_put_tag(skb, vlan_id);
440 if (!skb) {
441 /* vlan_put_tag() frees the skb in case of error,
442 * so return success here so the calling functions
443 * won't attempt to free is again.
444 */
445 return 0;
446 }
447 } else {
448 skb->dev = slave_dev;
449 }
450
451 skb->priority = 1; 426 skb->priority = 1;
452#ifdef CONFIG_NET_POLL_CONTROLLER 427#ifdef CONFIG_NET_POLL_CONTROLLER
453 if (unlikely(bond->dev->priv_flags & IFF_IN_NETPOLL)) { 428 if (unlikely(bond->dev->priv_flags & IFF_IN_NETPOLL)) {
@@ -1197,11 +1172,13 @@ void bond_change_active_slave(struct bonding *bond, struct slave *new_active)
1197 bond_do_fail_over_mac(bond, new_active, 1172 bond_do_fail_over_mac(bond, new_active,
1198 old_active); 1173 old_active);
1199 1174
1200 bond->send_grat_arp = bond->params.num_grat_arp; 1175 if (netif_running(bond->dev)) {
1201 bond_send_gratuitous_arp(bond); 1176 bond->send_grat_arp = bond->params.num_grat_arp;
1177 bond_send_gratuitous_arp(bond);
1202 1178
1203 bond->send_unsol_na = bond->params.num_unsol_na; 1179 bond->send_unsol_na = bond->params.num_unsol_na;
1204 bond_send_unsolicited_na(bond); 1180 bond_send_unsolicited_na(bond);
1181 }
1205 1182
1206 write_unlock_bh(&bond->curr_slave_lock); 1183 write_unlock_bh(&bond->curr_slave_lock);
1207 read_unlock(&bond->lock); 1184 read_unlock(&bond->lock);
@@ -1215,8 +1192,9 @@ void bond_change_active_slave(struct bonding *bond, struct slave *new_active)
1215 1192
1216 /* resend IGMP joins since active slave has changed or 1193 /* resend IGMP joins since active slave has changed or
1217 * all were sent on curr_active_slave */ 1194 * all were sent on curr_active_slave */
1218 if ((USES_PRIMARY(bond->params.mode) && new_active) || 1195 if (((USES_PRIMARY(bond->params.mode) && new_active) ||
1219 bond->params.mode == BOND_MODE_ROUNDROBIN) { 1196 bond->params.mode == BOND_MODE_ROUNDROBIN) &&
1197 netif_running(bond->dev)) {
1220 bond->igmp_retrans = bond->params.resend_igmp; 1198 bond->igmp_retrans = bond->params.resend_igmp;
1221 queue_delayed_work(bond->wq, &bond->mcast_work, 0); 1199 queue_delayed_work(bond->wq, &bond->mcast_work, 0);
1222 } 1200 }
@@ -5299,13 +5277,6 @@ static int __init bonding_init(void)
5299 if (res) 5277 if (res)
5300 goto out; 5278 goto out;
5301 5279
5302#ifdef CONFIG_NET_POLL_CONTROLLER
5303 if (!alloc_cpumask_var(&netpoll_block_tx, GFP_KERNEL)) {
5304 res = -ENOMEM;
5305 goto out;
5306 }
5307#endif
5308
5309 res = register_pernet_subsys(&bond_net_ops); 5280 res = register_pernet_subsys(&bond_net_ops);
5310 if (res) 5281 if (res)
5311 goto out; 5282 goto out;
@@ -5335,9 +5306,6 @@ err:
5335 rtnl_link_unregister(&bond_link_ops); 5306 rtnl_link_unregister(&bond_link_ops);
5336err_link: 5307err_link:
5337 unregister_pernet_subsys(&bond_net_ops); 5308 unregister_pernet_subsys(&bond_net_ops);
5338#ifdef CONFIG_NET_POLL_CONTROLLER
5339 free_cpumask_var(netpoll_block_tx);
5340#endif
5341 goto out; 5309 goto out;
5342 5310
5343} 5311}
@@ -5355,7 +5323,10 @@ static void __exit bonding_exit(void)
5355 unregister_pernet_subsys(&bond_net_ops); 5323 unregister_pernet_subsys(&bond_net_ops);
5356 5324
5357#ifdef CONFIG_NET_POLL_CONTROLLER 5325#ifdef CONFIG_NET_POLL_CONTROLLER
5358 free_cpumask_var(netpoll_block_tx); 5326 /*
5327 * Make sure we don't have an imbalance on our netpoll blocking
5328 */
5329 WARN_ON(atomic_read(&netpoll_block_tx));
5359#endif 5330#endif
5360} 5331}
5361 5332
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index 03710f8f5c49..4da384cc7603 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -119,26 +119,22 @@
119 119
120 120
121#ifdef CONFIG_NET_POLL_CONTROLLER 121#ifdef CONFIG_NET_POLL_CONTROLLER
122extern cpumask_var_t netpoll_block_tx; 122extern atomic_t netpoll_block_tx;
123 123
124static inline void block_netpoll_tx(void) 124static inline void block_netpoll_tx(void)
125{ 125{
126 preempt_disable(); 126 atomic_inc(&netpoll_block_tx);
127 BUG_ON(cpumask_test_and_set_cpu(smp_processor_id(),
128 netpoll_block_tx));
129} 127}
130 128
131static inline void unblock_netpoll_tx(void) 129static inline void unblock_netpoll_tx(void)
132{ 130{
133 BUG_ON(!cpumask_test_and_clear_cpu(smp_processor_id(), 131 atomic_dec(&netpoll_block_tx);
134 netpoll_block_tx));
135 preempt_enable();
136} 132}
137 133
138static inline int is_netpoll_tx_blocked(struct net_device *dev) 134static inline int is_netpoll_tx_blocked(struct net_device *dev)
139{ 135{
140 if (unlikely(dev->priv_flags & IFF_IN_NETPOLL)) 136 if (unlikely(dev->priv_flags & IFF_IN_NETPOLL))
141 return cpumask_test_cpu(smp_processor_id(), netpoll_block_tx); 137 return atomic_read(&netpoll_block_tx);
142 return 0; 138 return 0;
143} 139}
144#else 140#else
@@ -277,11 +273,11 @@ static inline struct slave *bond_get_slave_by_dev(struct bonding *bond, struct n
277 273
278 bond_for_each_slave(bond, slave, i) { 274 bond_for_each_slave(bond, slave, i) {
279 if (slave->dev == slave_dev) { 275 if (slave->dev == slave_dev) {
280 break; 276 return slave;
281 } 277 }
282 } 278 }
283 279
284 return slave; 280 return 0;
285} 281}
286 282
287static inline struct bonding *bond_get_bond_by_slave(struct slave *slave) 283static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)
diff --git a/drivers/net/cxgb4vf/cxgb4vf_main.c b/drivers/net/cxgb4vf/cxgb4vf_main.c
index f54af48edb93..3c403f895750 100644
--- a/drivers/net/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/cxgb4vf/cxgb4vf_main.c
@@ -2278,6 +2278,7 @@ static void __devinit cfg_queues(struct adapter *adapter)
2278{ 2278{
2279 struct sge *s = &adapter->sge; 2279 struct sge *s = &adapter->sge;
2280 int q10g, n10g, qidx, pidx, qs; 2280 int q10g, n10g, qidx, pidx, qs;
2281 size_t iqe_size;
2281 2282
2282 /* 2283 /*
2283 * We should not be called till we know how many Queue Sets we can 2284 * We should not be called till we know how many Queue Sets we can
@@ -2322,6 +2323,13 @@ static void __devinit cfg_queues(struct adapter *adapter)
2322 s->ethqsets = qidx; 2323 s->ethqsets = qidx;
2323 2324
2324 /* 2325 /*
2326 * The Ingress Queue Entry Size for our various Response Queues needs
2327 * to be big enough to accommodate the largest message we can receive
2328 * from the chip/firmware; which is 64 bytes ...
2329 */
2330 iqe_size = 64;
2331
2332 /*
2325 * Set up default Queue Set parameters ... Start off with the 2333 * Set up default Queue Set parameters ... Start off with the
2326 * shortest interrupt holdoff timer. 2334 * shortest interrupt holdoff timer.
2327 */ 2335 */
@@ -2329,7 +2337,7 @@ static void __devinit cfg_queues(struct adapter *adapter)
2329 struct sge_eth_rxq *rxq = &s->ethrxq[qs]; 2337 struct sge_eth_rxq *rxq = &s->ethrxq[qs];
2330 struct sge_eth_txq *txq = &s->ethtxq[qs]; 2338 struct sge_eth_txq *txq = &s->ethtxq[qs];
2331 2339
2332 init_rspq(&rxq->rspq, 0, 0, 1024, L1_CACHE_BYTES); 2340 init_rspq(&rxq->rspq, 0, 0, 1024, iqe_size);
2333 rxq->fl.size = 72; 2341 rxq->fl.size = 72;
2334 txq->q.size = 1024; 2342 txq->q.size = 1024;
2335 } 2343 }
@@ -2338,8 +2346,7 @@ static void __devinit cfg_queues(struct adapter *adapter)
2338 * The firmware event queue is used for link state changes and 2346 * The firmware event queue is used for link state changes and
2339 * notifications of TX DMA completions. 2347 * notifications of TX DMA completions.
2340 */ 2348 */
2341 init_rspq(&s->fw_evtq, SGE_TIMER_RSTRT_CNTR, 0, 512, 2349 init_rspq(&s->fw_evtq, SGE_TIMER_RSTRT_CNTR, 0, 512, iqe_size);
2342 L1_CACHE_BYTES);
2343 2350
2344 /* 2351 /*
2345 * The forwarded interrupt queue is used when we're in MSI interrupt 2352 * The forwarded interrupt queue is used when we're in MSI interrupt
@@ -2355,7 +2362,7 @@ static void __devinit cfg_queues(struct adapter *adapter)
2355 * any time ... 2362 * any time ...
2356 */ 2363 */
2357 init_rspq(&s->intrq, SGE_TIMER_RSTRT_CNTR, 0, MSIX_ENTRIES + 1, 2364 init_rspq(&s->intrq, SGE_TIMER_RSTRT_CNTR, 0, MSIX_ENTRIES + 1,
2358 L1_CACHE_BYTES); 2365 iqe_size);
2359} 2366}
2360 2367
2361/* 2368/*
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 9710047c12a4..a0af48c51fb3 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -2098,7 +2098,8 @@ static void enic_poll_controller(struct net_device *netdev)
2098 case VNIC_DEV_INTR_MODE_MSIX: 2098 case VNIC_DEV_INTR_MODE_MSIX:
2099 for (i = 0; i < enic->rq_count; i++) { 2099 for (i = 0; i < enic->rq_count; i++) {
2100 intr = enic_msix_rq_intr(enic, i); 2100 intr = enic_msix_rq_intr(enic, i);
2101 enic_isr_msix_rq(enic->msix_entry[intr].vector, enic); 2101 enic_isr_msix_rq(enic->msix_entry[intr].vector,
2102 &enic->napi[i]);
2102 } 2103 }
2103 intr = enic_msix_wq_intr(enic, i); 2104 intr = enic_msix_wq_intr(enic, i);
2104 enic_isr_msix_wq(enic->msix_entry[intr].vector, enic); 2105 enic_isr_msix_wq(enic->msix_entry[intr].vector, enic);
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index 1a0eb128e607..1f42f6ac8551 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -690,6 +690,7 @@ static void block_output(struct net_device *dev, int count,
690static struct pcmcia_device_id axnet_ids[] = { 690static struct pcmcia_device_id axnet_ids[] = {
691 PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x016c, 0x0081), 691 PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x016c, 0x0081),
692 PCMCIA_DEVICE_MANF_CARD(0x018a, 0x0301), 692 PCMCIA_DEVICE_MANF_CARD(0x018a, 0x0301),
693 PCMCIA_DEVICE_MANF_CARD(0x01bf, 0x2328),
693 PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0301), 694 PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0301),
694 PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0303), 695 PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0303),
695 PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0309), 696 PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0309),
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index d05c44692f08..2c158910f7ea 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -1493,7 +1493,6 @@ static struct pcmcia_device_id pcnet_ids[] = {
1493 PCMCIA_DEVICE_MANF_CARD(0x0149, 0x4530), 1493 PCMCIA_DEVICE_MANF_CARD(0x0149, 0x4530),
1494 PCMCIA_DEVICE_MANF_CARD(0x0149, 0xc1ab), 1494 PCMCIA_DEVICE_MANF_CARD(0x0149, 0xc1ab),
1495 PCMCIA_DEVICE_MANF_CARD(0x0186, 0x0110), 1495 PCMCIA_DEVICE_MANF_CARD(0x0186, 0x0110),
1496 PCMCIA_DEVICE_MANF_CARD(0x01bf, 0x2328),
1497 PCMCIA_DEVICE_MANF_CARD(0x01bf, 0x8041), 1496 PCMCIA_DEVICE_MANF_CARD(0x01bf, 0x8041),
1498 PCMCIA_DEVICE_MANF_CARD(0x0213, 0x2452), 1497 PCMCIA_DEVICE_MANF_CARD(0x0213, 0x2452),
1499 PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0300), 1498 PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0300),
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index cb3d13e4e074..35fda5ac8120 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -64,7 +64,7 @@ config BCM63XX_PHY
64config ICPLUS_PHY 64config ICPLUS_PHY
65 tristate "Drivers for ICPlus PHYs" 65 tristate "Drivers for ICPlus PHYs"
66 ---help--- 66 ---help---
67 Currently supports the IP175C PHY. 67 Currently supports the IP175C and IP1001 PHYs.
68 68
69config REALTEK_PHY 69config REALTEK_PHY
70 tristate "Drivers for Realtek PHYs" 70 tristate "Drivers for Realtek PHYs"
diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c
index c1d2d251fe8b..9a09e24c30bc 100644
--- a/drivers/net/phy/icplus.c
+++ b/drivers/net/phy/icplus.c
@@ -30,7 +30,7 @@
30#include <asm/irq.h> 30#include <asm/irq.h>
31#include <asm/uaccess.h> 31#include <asm/uaccess.h>
32 32
33MODULE_DESCRIPTION("ICPlus IP175C PHY driver"); 33MODULE_DESCRIPTION("ICPlus IP175C/IC1001 PHY drivers");
34MODULE_AUTHOR("Michael Barkowski"); 34MODULE_AUTHOR("Michael Barkowski");
35MODULE_LICENSE("GPL"); 35MODULE_LICENSE("GPL");
36 36
@@ -89,6 +89,33 @@ static int ip175c_config_init(struct phy_device *phydev)
89 return 0; 89 return 0;
90} 90}
91 91
92static int ip1001_config_init(struct phy_device *phydev)
93{
94 int err, value;
95
96 /* Software Reset PHY */
97 value = phy_read(phydev, MII_BMCR);
98 value |= BMCR_RESET;
99 err = phy_write(phydev, MII_BMCR, value);
100 if (err < 0)
101 return err;
102
103 do {
104 value = phy_read(phydev, MII_BMCR);
105 } while (value & BMCR_RESET);
106
107 /* Additional delay (2ns) used to adjust RX clock phase
108 * at GMII/ RGMII interface */
109 value = phy_read(phydev, 16);
110 value |= 0x3;
111
112 err = phy_write(phydev, 16, value);
113 if (err < 0)
114 return err;
115
116 return err;
117}
118
92static int ip175c_read_status(struct phy_device *phydev) 119static int ip175c_read_status(struct phy_device *phydev)
93{ 120{
94 if (phydev->addr == 4) /* WAN port */ 121 if (phydev->addr == 4) /* WAN port */
@@ -121,21 +148,43 @@ static struct phy_driver ip175c_driver = {
121 .driver = { .owner = THIS_MODULE,}, 148 .driver = { .owner = THIS_MODULE,},
122}; 149};
123 150
124static int __init ip175c_init(void) 151static struct phy_driver ip1001_driver = {
152 .phy_id = 0x02430d90,
153 .name = "ICPlus IP1001",
154 .phy_id_mask = 0x0ffffff0,
155 .features = PHY_GBIT_FEATURES | SUPPORTED_Pause |
156 SUPPORTED_Asym_Pause,
157 .config_init = &ip1001_config_init,
158 .config_aneg = &genphy_config_aneg,
159 .read_status = &genphy_read_status,
160 .suspend = genphy_suspend,
161 .resume = genphy_resume,
162 .driver = { .owner = THIS_MODULE,},
163};
164
165static int __init icplus_init(void)
125{ 166{
167 int ret = 0;
168
169 ret = phy_driver_register(&ip1001_driver);
170 if (ret < 0)
171 return -ENODEV;
172
126 return phy_driver_register(&ip175c_driver); 173 return phy_driver_register(&ip175c_driver);
127} 174}
128 175
129static void __exit ip175c_exit(void) 176static void __exit icplus_exit(void)
130{ 177{
178 phy_driver_unregister(&ip1001_driver);
131 phy_driver_unregister(&ip175c_driver); 179 phy_driver_unregister(&ip175c_driver);
132} 180}
133 181
134module_init(ip175c_init); 182module_init(icplus_init);
135module_exit(ip175c_exit); 183module_exit(icplus_exit);
136 184
137static struct mdio_device_id __maybe_unused icplus_tbl[] = { 185static struct mdio_device_id __maybe_unused icplus_tbl[] = {
138 { 0x02430d80, 0x0ffffff0 }, 186 { 0x02430d80, 0x0ffffff0 },
187 { 0x02430d90, 0x0ffffff0 },
139 { } 188 { }
140}; 189};
141 190
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c
index d72fb0519a2a..78c0e3c9b2b5 100644
--- a/drivers/net/pppoe.c
+++ b/drivers/net/pppoe.c
@@ -948,7 +948,7 @@ static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb)
948 948
949abort: 949abort:
950 kfree_skb(skb); 950 kfree_skb(skb);
951 return 0; 951 return 1;
952} 952}
953 953
954/************************************************************************ 954/************************************************************************
diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h
index bdb8fe868539..4757c59a07a2 100644
--- a/drivers/net/qlge/qlge.h
+++ b/drivers/net/qlge/qlge.h
@@ -2083,6 +2083,7 @@ struct ql_adapter {
2083 u32 mailbox_in; 2083 u32 mailbox_in;
2084 u32 mailbox_out; 2084 u32 mailbox_out;
2085 struct mbox_params idc_mbc; 2085 struct mbox_params idc_mbc;
2086 struct mutex mpi_mutex;
2086 2087
2087 int tx_ring_size; 2088 int tx_ring_size;
2088 int rx_ring_size; 2089 int rx_ring_size;
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index e4dbbbfec723..3af30c452b88 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -4629,6 +4629,7 @@ static int __devinit ql_init_device(struct pci_dev *pdev,
4629 INIT_DELAYED_WORK(&qdev->mpi_idc_work, ql_mpi_idc_work); 4629 INIT_DELAYED_WORK(&qdev->mpi_idc_work, ql_mpi_idc_work);
4630 INIT_DELAYED_WORK(&qdev->mpi_core_to_log, ql_mpi_core_to_log); 4630 INIT_DELAYED_WORK(&qdev->mpi_core_to_log, ql_mpi_core_to_log);
4631 init_completion(&qdev->ide_completion); 4631 init_completion(&qdev->ide_completion);
4632 mutex_init(&qdev->mpi_mutex);
4632 4633
4633 if (!cards_found) { 4634 if (!cards_found) {
4634 dev_info(&pdev->dev, "%s\n", DRV_STRING); 4635 dev_info(&pdev->dev, "%s\n", DRV_STRING);
diff --git a/drivers/net/qlge/qlge_mpi.c b/drivers/net/qlge/qlge_mpi.c
index 100a462cc916..ff2bf8a4e247 100644
--- a/drivers/net/qlge/qlge_mpi.c
+++ b/drivers/net/qlge/qlge_mpi.c
@@ -534,6 +534,7 @@ static int ql_mailbox_command(struct ql_adapter *qdev, struct mbox_params *mbcp)
534 int status; 534 int status;
535 unsigned long count; 535 unsigned long count;
536 536
537 mutex_lock(&qdev->mpi_mutex);
537 538
538 /* Begin polled mode for MPI */ 539 /* Begin polled mode for MPI */
539 ql_write32(qdev, INTR_MASK, (INTR_MASK_PI << 16)); 540 ql_write32(qdev, INTR_MASK, (INTR_MASK_PI << 16));
@@ -603,6 +604,7 @@ done:
603end: 604end:
604 /* End polled mode for MPI */ 605 /* End polled mode for MPI */
605 ql_write32(qdev, INTR_MASK, (INTR_MASK_PI << 16) | INTR_MASK_PI); 606 ql_write32(qdev, INTR_MASK, (INTR_MASK_PI << 16) | INTR_MASK_PI);
607 mutex_unlock(&qdev->mpi_mutex);
606 return status; 608 return status;
607} 609}
608 610
@@ -1099,9 +1101,7 @@ int ql_wait_fifo_empty(struct ql_adapter *qdev)
1099static int ql_set_port_cfg(struct ql_adapter *qdev) 1101static int ql_set_port_cfg(struct ql_adapter *qdev)
1100{ 1102{
1101 int status; 1103 int status;
1102 rtnl_lock();
1103 status = ql_mb_set_port_cfg(qdev); 1104 status = ql_mb_set_port_cfg(qdev);
1104 rtnl_unlock();
1105 if (status) 1105 if (status)
1106 return status; 1106 return status;
1107 status = ql_idc_wait(qdev); 1107 status = ql_idc_wait(qdev);
@@ -1122,9 +1122,7 @@ void ql_mpi_port_cfg_work(struct work_struct *work)
1122 container_of(work, struct ql_adapter, mpi_port_cfg_work.work); 1122 container_of(work, struct ql_adapter, mpi_port_cfg_work.work);
1123 int status; 1123 int status;
1124 1124
1125 rtnl_lock();
1126 status = ql_mb_get_port_cfg(qdev); 1125 status = ql_mb_get_port_cfg(qdev);
1127 rtnl_unlock();
1128 if (status) { 1126 if (status) {
1129 netif_err(qdev, drv, qdev->ndev, 1127 netif_err(qdev, drv, qdev->ndev,
1130 "Bug: Failed to get port config data.\n"); 1128 "Bug: Failed to get port config data.\n");
@@ -1167,7 +1165,6 @@ void ql_mpi_idc_work(struct work_struct *work)
1167 u32 aen; 1165 u32 aen;
1168 int timeout; 1166 int timeout;
1169 1167
1170 rtnl_lock();
1171 aen = mbcp->mbox_out[1] >> 16; 1168 aen = mbcp->mbox_out[1] >> 16;
1172 timeout = (mbcp->mbox_out[1] >> 8) & 0xf; 1169 timeout = (mbcp->mbox_out[1] >> 8) & 0xf;
1173 1170
@@ -1231,7 +1228,6 @@ void ql_mpi_idc_work(struct work_struct *work)
1231 } 1228 }
1232 break; 1229 break;
1233 } 1230 }
1234 rtnl_unlock();
1235} 1231}
1236 1232
1237void ql_mpi_work(struct work_struct *work) 1233void ql_mpi_work(struct work_struct *work)
@@ -1242,7 +1238,7 @@ void ql_mpi_work(struct work_struct *work)
1242 struct mbox_params *mbcp = &mbc; 1238 struct mbox_params *mbcp = &mbc;
1243 int err = 0; 1239 int err = 0;
1244 1240
1245 rtnl_lock(); 1241 mutex_lock(&qdev->mpi_mutex);
1246 /* Begin polled mode for MPI */ 1242 /* Begin polled mode for MPI */
1247 ql_write32(qdev, INTR_MASK, (INTR_MASK_PI << 16)); 1243 ql_write32(qdev, INTR_MASK, (INTR_MASK_PI << 16));
1248 1244
@@ -1259,7 +1255,7 @@ void ql_mpi_work(struct work_struct *work)
1259 1255
1260 /* End polled mode for MPI */ 1256 /* End polled mode for MPI */
1261 ql_write32(qdev, INTR_MASK, (INTR_MASK_PI << 16) | INTR_MASK_PI); 1257 ql_write32(qdev, INTR_MASK, (INTR_MASK_PI << 16) | INTR_MASK_PI);
1262 rtnl_unlock(); 1258 mutex_unlock(&qdev->mpi_mutex);
1263 ql_enable_completion_interrupt(qdev, 0); 1259 ql_enable_completion_interrupt(qdev, 0);
1264} 1260}
1265 1261
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 98d792c33877..4e745af96cf1 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -744,26 +744,36 @@ static void rtl8169_xmii_reset_enable(void __iomem *ioaddr)
744 mdio_write(ioaddr, MII_BMCR, val & 0xffff); 744 mdio_write(ioaddr, MII_BMCR, val & 0xffff);
745} 745}
746 746
747static void rtl8169_check_link_status(struct net_device *dev, 747static void __rtl8169_check_link_status(struct net_device *dev,
748 struct rtl8169_private *tp, 748 struct rtl8169_private *tp,
749 void __iomem *ioaddr) 749 void __iomem *ioaddr,
750 bool pm)
750{ 751{
751 unsigned long flags; 752 unsigned long flags;
752 753
753 spin_lock_irqsave(&tp->lock, flags); 754 spin_lock_irqsave(&tp->lock, flags);
754 if (tp->link_ok(ioaddr)) { 755 if (tp->link_ok(ioaddr)) {
755 /* This is to cancel a scheduled suspend if there's one. */ 756 /* This is to cancel a scheduled suspend if there's one. */
756 pm_request_resume(&tp->pci_dev->dev); 757 if (pm)
758 pm_request_resume(&tp->pci_dev->dev);
757 netif_carrier_on(dev); 759 netif_carrier_on(dev);
758 netif_info(tp, ifup, dev, "link up\n"); 760 netif_info(tp, ifup, dev, "link up\n");
759 } else { 761 } else {
760 netif_carrier_off(dev); 762 netif_carrier_off(dev);
761 netif_info(tp, ifdown, dev, "link down\n"); 763 netif_info(tp, ifdown, dev, "link down\n");
762 pm_schedule_suspend(&tp->pci_dev->dev, 100); 764 if (pm)
765 pm_schedule_suspend(&tp->pci_dev->dev, 100);
763 } 766 }
764 spin_unlock_irqrestore(&tp->lock, flags); 767 spin_unlock_irqrestore(&tp->lock, flags);
765} 768}
766 769
770static void rtl8169_check_link_status(struct net_device *dev,
771 struct rtl8169_private *tp,
772 void __iomem *ioaddr)
773{
774 __rtl8169_check_link_status(dev, tp, ioaddr, false);
775}
776
767#define WAKE_ANY (WAKE_PHY | WAKE_MAGIC | WAKE_UCAST | WAKE_BCAST | WAKE_MCAST) 777#define WAKE_ANY (WAKE_PHY | WAKE_MAGIC | WAKE_UCAST | WAKE_BCAST | WAKE_MCAST)
768 778
769static u32 __rtl8169_get_wol(struct rtl8169_private *tp) 779static u32 __rtl8169_get_wol(struct rtl8169_private *tp)
@@ -4600,7 +4610,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
4600 } 4610 }
4601 4611
4602 if (status & LinkChg) 4612 if (status & LinkChg)
4603 rtl8169_check_link_status(dev, tp, ioaddr); 4613 __rtl8169_check_link_status(dev, tp, ioaddr, true);
4604 4614
4605 /* We need to see the lastest version of tp->intr_mask to 4615 /* We need to see the lastest version of tp->intr_mask to
4606 * avoid ignoring an MSI interrupt and having to wait for 4616 * avoid ignoring an MSI interrupt and having to wait for
@@ -4890,11 +4900,7 @@ static int rtl8169_runtime_idle(struct device *device)
4890 struct net_device *dev = pci_get_drvdata(pdev); 4900 struct net_device *dev = pci_get_drvdata(pdev);
4891 struct rtl8169_private *tp = netdev_priv(dev); 4901 struct rtl8169_private *tp = netdev_priv(dev);
4892 4902
4893 if (!tp->TxDescArray) 4903 return tp->TxDescArray ? -EBUSY : 0;
4894 return 0;
4895
4896 rtl8169_check_link_status(dev, tp, tp->mmio_addr);
4897 return -EBUSY;
4898} 4904}
4899 4905
4900static const struct dev_pm_ops rtl8169_pm_ops = { 4906static const struct dev_pm_ops rtl8169_pm_ops = {
diff --git a/drivers/net/tehuti.c b/drivers/net/tehuti.c
index 8b3dc1eb4015..296000bf5a25 100644
--- a/drivers/net/tehuti.c
+++ b/drivers/net/tehuti.c
@@ -324,7 +324,7 @@ static int bdx_fw_load(struct bdx_priv *priv)
324 ENTER; 324 ENTER;
325 master = READ_REG(priv, regINIT_SEMAPHORE); 325 master = READ_REG(priv, regINIT_SEMAPHORE);
326 if (!READ_REG(priv, regINIT_STATUS) && master) { 326 if (!READ_REG(priv, regINIT_STATUS) && master) {
327 rc = request_firmware(&fw, "tehuti/firmware.bin", &priv->pdev->dev); 327 rc = request_firmware(&fw, "tehuti/bdx.bin", &priv->pdev->dev);
328 if (rc) 328 if (rc)
329 goto out; 329 goto out;
330 bdx_tx_push_desc_safe(priv, (char *)fw->data, fw->size); 330 bdx_tx_push_desc_safe(priv, (char *)fw->data, fw->size);
@@ -2510,4 +2510,4 @@ module_exit(bdx_module_exit);
2510MODULE_LICENSE("GPL"); 2510MODULE_LICENSE("GPL");
2511MODULE_AUTHOR(DRIVER_AUTHOR); 2511MODULE_AUTHOR(DRIVER_AUTHOR);
2512MODULE_DESCRIPTION(BDX_DRV_DESC); 2512MODULE_DESCRIPTION(BDX_DRV_DESC);
2513MODULE_FIRMWARE("tehuti/firmware.bin"); 2513MODULE_FIRMWARE("tehuti/bdx.bin");
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index aea4645be7f6..6140b56cce53 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -1508,6 +1508,10 @@ static const struct usb_device_id products [] = {
1508 USB_DEVICE (0x0b95, 0x1780), 1508 USB_DEVICE (0x0b95, 0x1780),
1509 .driver_info = (unsigned long) &ax88178_info, 1509 .driver_info = (unsigned long) &ax88178_info,
1510}, { 1510}, {
1511 // Logitec LAN-GTJ/U2A
1512 USB_DEVICE (0x0789, 0x0160),
1513 .driver_info = (unsigned long) &ax88178_info,
1514}, {
1511 // Linksys USB200M Rev 2 1515 // Linksys USB200M Rev 2
1512 USB_DEVICE (0x13b1, 0x0018), 1516 USB_DEVICE (0x13b1, 0x0018),
1513 .driver_info = (unsigned long) &ax88772_info, 1517 .driver_info = (unsigned long) &ax88772_info,
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index 93c6b5f62ac4..ebcaaebf6b41 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -958,10 +958,6 @@ static void packetizeRx(struct hso_net *odev, unsigned char *ip_pkt,
958 /* Packet is complete. Inject into stack. */ 958 /* Packet is complete. Inject into stack. */
959 /* We have IP packet here */ 959 /* We have IP packet here */
960 odev->skb_rx_buf->protocol = cpu_to_be16(ETH_P_IP); 960 odev->skb_rx_buf->protocol = cpu_to_be16(ETH_P_IP);
961 /* don't check it */
962 odev->skb_rx_buf->ip_summed =
963 CHECKSUM_UNNECESSARY;
964
965 skb_reset_mac_header(odev->skb_rx_buf); 961 skb_reset_mac_header(odev->skb_rx_buf);
966 962
967 /* Ship it off to the kernel */ 963 /* Ship it off to the kernel */
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 0bbc0c323135..cc83fa71c3ff 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -166,7 +166,9 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev)
166 if (!(rcv->flags & IFF_UP)) 166 if (!(rcv->flags & IFF_UP))
167 goto tx_drop; 167 goto tx_drop;
168 168
169 if (dev->features & NETIF_F_NO_CSUM) 169 /* don't change ip_summed == CHECKSUM_PARTIAL, as that
170 will cause bad checksum on forwarded packets */
171 if (skb->ip_summed == CHECKSUM_NONE)
170 skb->ip_summed = rcv_priv->ip_summed; 172 skb->ip_summed = rcv_priv->ip_summed;
171 173
172 length = skb->len + ETH_HLEN; 174 length = skb->len + ETH_HLEN;
diff --git a/drivers/net/wan/hd64572.c b/drivers/net/wan/hd64572.c
index ea476cbd38b5..e305274f83fb 100644
--- a/drivers/net/wan/hd64572.c
+++ b/drivers/net/wan/hd64572.c
@@ -293,6 +293,7 @@ static inline void sca_tx_done(port_t *port)
293 struct net_device *dev = port->netdev; 293 struct net_device *dev = port->netdev;
294 card_t* card = port->card; 294 card_t* card = port->card;
295 u8 stat; 295 u8 stat;
296 unsigned count = 0;
296 297
297 spin_lock(&port->lock); 298 spin_lock(&port->lock);
298 299
@@ -316,10 +317,12 @@ static inline void sca_tx_done(port_t *port)
316 dev->stats.tx_bytes += readw(&desc->len); 317 dev->stats.tx_bytes += readw(&desc->len);
317 } 318 }
318 writeb(0, &desc->stat); /* Free descriptor */ 319 writeb(0, &desc->stat); /* Free descriptor */
320 count++;
319 port->txlast = (port->txlast + 1) % card->tx_ring_buffers; 321 port->txlast = (port->txlast + 1) % card->tx_ring_buffers;
320 } 322 }
321 323
322 netif_wake_queue(dev); 324 if (count)
325 netif_wake_queue(dev);
323 spin_unlock(&port->lock); 326 spin_unlock(&port->lock);
324} 327}
325 328
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index 3c983e426f25..af85458401a4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -311,6 +311,7 @@ struct iwl_cfg iwl100_bgn_cfg = {
311 .base_params = &iwl1000_base_params, 311 .base_params = &iwl1000_base_params,
312 .ht_params = &iwl1000_ht_params, 312 .ht_params = &iwl1000_ht_params,
313 .led_mode = IWL_LED_RF_STATE, 313 .led_mode = IWL_LED_RF_STATE,
314 .use_new_eeprom_reading = true,
314}; 315};
315 316
316struct iwl_cfg iwl100_bg_cfg = { 317struct iwl_cfg iwl100_bg_cfg = {
@@ -324,6 +325,7 @@ struct iwl_cfg iwl100_bg_cfg = {
324 .mod_params = &iwlagn_mod_params, 325 .mod_params = &iwlagn_mod_params,
325 .base_params = &iwl1000_base_params, 326 .base_params = &iwl1000_base_params,
326 .led_mode = IWL_LED_RF_STATE, 327 .led_mode = IWL_LED_RF_STATE,
328 .use_new_eeprom_reading = true,
327}; 329};
328 330
329MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX)); 331MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index 808942cc2991..a848ca06dc6f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -564,6 +564,7 @@ struct iwl_cfg iwl6005_2agn_cfg = {
564 .need_dc_calib = true, 564 .need_dc_calib = true,
565 .need_temp_offset_calib = true, 565 .need_temp_offset_calib = true,
566 .led_mode = IWL_LED_RF_STATE, 566 .led_mode = IWL_LED_RF_STATE,
567 .use_new_eeprom_reading = true,
567}; 568};
568 569
569struct iwl_cfg iwl6005_2abg_cfg = { 570struct iwl_cfg iwl6005_2abg_cfg = {
@@ -579,6 +580,7 @@ struct iwl_cfg iwl6005_2abg_cfg = {
579 .need_dc_calib = true, 580 .need_dc_calib = true,
580 .need_temp_offset_calib = true, 581 .need_temp_offset_calib = true,
581 .led_mode = IWL_LED_RF_STATE, 582 .led_mode = IWL_LED_RF_STATE,
583 .use_new_eeprom_reading = true,
582}; 584};
583 585
584struct iwl_cfg iwl6005_2bg_cfg = { 586struct iwl_cfg iwl6005_2bg_cfg = {
@@ -594,6 +596,7 @@ struct iwl_cfg iwl6005_2bg_cfg = {
594 .need_dc_calib = true, 596 .need_dc_calib = true,
595 .need_temp_offset_calib = true, 597 .need_temp_offset_calib = true,
596 .led_mode = IWL_LED_RF_STATE, 598 .led_mode = IWL_LED_RF_STATE,
599 .use_new_eeprom_reading = true,
597}; 600};
598 601
599struct iwl_cfg iwl6030_2agn_cfg = { 602struct iwl_cfg iwl6030_2agn_cfg = {
@@ -614,6 +617,7 @@ struct iwl_cfg iwl6030_2agn_cfg = {
614 .adv_pm = true, 617 .adv_pm = true,
615 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 618 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
616 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 619 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
620 .use_new_eeprom_reading = true,
617}; 621};
618 622
619struct iwl_cfg iwl6030_2abg_cfg = { 623struct iwl_cfg iwl6030_2abg_cfg = {
@@ -633,6 +637,7 @@ struct iwl_cfg iwl6030_2abg_cfg = {
633 .adv_pm = true, 637 .adv_pm = true,
634 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 638 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
635 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 639 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
640 .use_new_eeprom_reading = true,
636}; 641};
637 642
638struct iwl_cfg iwl6030_2bgn_cfg = { 643struct iwl_cfg iwl6030_2bgn_cfg = {
@@ -653,6 +658,7 @@ struct iwl_cfg iwl6030_2bgn_cfg = {
653 .adv_pm = true, 658 .adv_pm = true,
654 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 659 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
655 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 660 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
661 .use_new_eeprom_reading = true,
656}; 662};
657 663
658struct iwl_cfg iwl6030_2bg_cfg = { 664struct iwl_cfg iwl6030_2bg_cfg = {
@@ -672,6 +678,7 @@ struct iwl_cfg iwl6030_2bg_cfg = {
672 .adv_pm = true, 678 .adv_pm = true,
673 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 679 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
674 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 680 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
681 .use_new_eeprom_reading = true,
675}; 682};
676 683
677struct iwl_cfg iwl1030_bgn_cfg = { 684struct iwl_cfg iwl1030_bgn_cfg = {
@@ -692,6 +699,7 @@ struct iwl_cfg iwl1030_bgn_cfg = {
692 .adv_pm = true, 699 .adv_pm = true,
693 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 700 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
694 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 701 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
702 .use_new_eeprom_reading = true,
695}; 703};
696 704
697struct iwl_cfg iwl1030_bg_cfg = { 705struct iwl_cfg iwl1030_bg_cfg = {
@@ -711,6 +719,7 @@ struct iwl_cfg iwl1030_bg_cfg = {
711 .adv_pm = true, 719 .adv_pm = true,
712 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 720 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
713 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 721 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
722 .use_new_eeprom_reading = true,
714}; 723};
715 724
716/* 725/*
@@ -793,6 +802,7 @@ struct iwl_cfg iwl6150_bgn_cfg = {
793 .ht_params = &iwl6000_ht_params, 802 .ht_params = &iwl6000_ht_params,
794 .need_dc_calib = true, 803 .need_dc_calib = true,
795 .led_mode = IWL_LED_RF_STATE, 804 .led_mode = IWL_LED_RF_STATE,
805 .use_new_eeprom_reading = true,
796}; 806};
797 807
798struct iwl_cfg iwl6050_2abg_cfg = { 808struct iwl_cfg iwl6050_2abg_cfg = {
@@ -841,6 +851,7 @@ struct iwl_cfg iwl130_bgn_cfg = {
841 .adv_pm = true, 851 .adv_pm = true,
842 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 852 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
843 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 853 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
854 .use_new_eeprom_reading = true,
844}; 855};
845 856
846struct iwl_cfg iwl130_bg_cfg = { 857struct iwl_cfg iwl130_bg_cfg = {
@@ -859,6 +870,7 @@ struct iwl_cfg iwl130_bg_cfg = {
859 .adv_pm = true, 870 .adv_pm = true,
860 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 871 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
861 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 872 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
873 .use_new_eeprom_reading = true,
862}; 874};
863 875
864MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); 876MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c
index dbada761624d..cf9194baadac 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c
@@ -433,7 +433,7 @@ static s8 iwl_update_channel_txpower(struct iwl_priv *priv,
433/** 433/**
434 * iwlcore_eeprom_enhanced_txpower: process enhanced tx power info 434 * iwlcore_eeprom_enhanced_txpower: process enhanced tx power info
435 */ 435 */
436void iwlcore_eeprom_enhanced_txpower(struct iwl_priv *priv) 436static void iwlcore_eeprom_enhanced_txpower_old(struct iwl_priv *priv)
437{ 437{
438 int eeprom_section_count = 0; 438 int eeprom_section_count = 0;
439 int section, element; 439 int section, element;
@@ -460,7 +460,8 @@ void iwlcore_eeprom_enhanced_txpower(struct iwl_priv *priv)
460 * always check for valid entry before process 460 * always check for valid entry before process
461 * the information 461 * the information
462 */ 462 */
463 if (!enhanced_txpower->common || enhanced_txpower->reserved) 463 if (!(enhanced_txpower->flags || enhanced_txpower->channel) ||
464 enhanced_txpower->delta_20_in_40)
464 continue; 465 continue;
465 466
466 for (element = 0; element < eeprom_section_count; element++) { 467 for (element = 0; element < eeprom_section_count; element++) {
@@ -493,3 +494,86 @@ void iwlcore_eeprom_enhanced_txpower(struct iwl_priv *priv)
493 } 494 }
494 } 495 }
495} 496}
497
498static void
499iwlcore_eeprom_enh_txp_read_element(struct iwl_priv *priv,
500 struct iwl_eeprom_enhanced_txpwr *txp,
501 s8 max_txpower_avg)
502{
503 int ch_idx;
504 bool is_ht40 = txp->flags & IWL_EEPROM_ENH_TXP_FL_40MHZ;
505 enum ieee80211_band band;
506
507 band = txp->flags & IWL_EEPROM_ENH_TXP_FL_BAND_52G ?
508 IEEE80211_BAND_5GHZ : IEEE80211_BAND_2GHZ;
509
510 for (ch_idx = 0; ch_idx < priv->channel_count; ch_idx++) {
511 struct iwl_channel_info *ch_info = &priv->channel_info[ch_idx];
512
513 /* update matching channel or from common data only */
514 if (txp->channel != 0 && ch_info->channel != txp->channel)
515 continue;
516
517 /* update matching band only */
518 if (band != ch_info->band)
519 continue;
520
521 if (ch_info->max_power_avg < max_txpower_avg && !is_ht40) {
522 ch_info->max_power_avg = max_txpower_avg;
523 ch_info->curr_txpow = max_txpower_avg;
524 ch_info->scan_power = max_txpower_avg;
525 }
526
527 if (is_ht40 && ch_info->ht40_max_power_avg < max_txpower_avg)
528 ch_info->ht40_max_power_avg = max_txpower_avg;
529 }
530}
531
532#define EEPROM_TXP_OFFS (0x00 | INDIRECT_ADDRESS | INDIRECT_TXP_LIMIT)
533#define EEPROM_TXP_ENTRY_LEN sizeof(struct iwl_eeprom_enhanced_txpwr)
534#define EEPROM_TXP_SZ_OFFS (0x00 | INDIRECT_ADDRESS | INDIRECT_TXP_LIMIT_SIZE)
535
536static void iwlcore_eeprom_enhanced_txpower_new(struct iwl_priv *priv)
537{
538 struct iwl_eeprom_enhanced_txpwr *txp_array, *txp;
539 int idx, entries;
540 __le16 *txp_len;
541 s8 max_txp_avg, max_txp_avg_halfdbm;
542
543 BUILD_BUG_ON(sizeof(struct iwl_eeprom_enhanced_txpwr) != 8);
544
545 /* the length is in 16-bit words, but we want entries */
546 txp_len = (__le16 *) iwlagn_eeprom_query_addr(priv, EEPROM_TXP_SZ_OFFS);
547 entries = le16_to_cpup(txp_len) * 2 / EEPROM_TXP_ENTRY_LEN;
548
549 txp_array = (void *) iwlagn_eeprom_query_addr(priv, EEPROM_TXP_OFFS);
550 for (idx = 0; idx < entries; idx++) {
551 txp = &txp_array[idx];
552
553 /* skip invalid entries */
554 if (!(txp->flags & IWL_EEPROM_ENH_TXP_FL_VALID))
555 continue;
556
557 max_txp_avg = iwl_get_max_txpower_avg(priv, txp_array, idx,
558 &max_txp_avg_halfdbm);
559
560 /*
561 * Update the user limit values values to the highest
562 * power supported by any channel
563 */
564 if (max_txp_avg > priv->tx_power_user_lmt)
565 priv->tx_power_user_lmt = max_txp_avg;
566 if (max_txp_avg_halfdbm > priv->tx_power_lmt_in_half_dbm)
567 priv->tx_power_lmt_in_half_dbm = max_txp_avg_halfdbm;
568
569 iwlcore_eeprom_enh_txp_read_element(priv, txp, max_txp_avg);
570 }
571}
572
573void iwlcore_eeprom_enhanced_txpower(struct iwl_priv *priv)
574{
575 if (priv->cfg->use_new_eeprom_reading)
576 iwlcore_eeprom_enhanced_txpower_new(priv);
577 else
578 iwlcore_eeprom_enhanced_txpower_old(priv);
579}
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index d941910e7ef4..7c8010f7ce56 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -568,6 +568,12 @@ static u32 eeprom_indirect_address(const struct iwl_priv *priv, u32 address)
568 case INDIRECT_REGULATORY: 568 case INDIRECT_REGULATORY:
569 offset = iwl_eeprom_query16(priv, EEPROM_LINK_REGULATORY); 569 offset = iwl_eeprom_query16(priv, EEPROM_LINK_REGULATORY);
570 break; 570 break;
571 case INDIRECT_TXP_LIMIT:
572 offset = iwl_eeprom_query16(priv, EEPROM_LINK_TXP_LIMIT);
573 break;
574 case INDIRECT_TXP_LIMIT_SIZE:
575 offset = iwl_eeprom_query16(priv, EEPROM_LINK_TXP_LIMIT_SIZE);
576 break;
571 case INDIRECT_CALIBRATION: 577 case INDIRECT_CALIBRATION:
572 offset = iwl_eeprom_query16(priv, EEPROM_LINK_CALIBRATION); 578 offset = iwl_eeprom_query16(priv, EEPROM_LINK_CALIBRATION);
573 break; 579 break;
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 568920ac982d..9df33d6af8bb 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -412,6 +412,7 @@ struct iwl_cfg {
412 u8 scan_tx_antennas[IEEE80211_NUM_BANDS]; 412 u8 scan_tx_antennas[IEEE80211_NUM_BANDS];
413 enum iwl_led_mode led_mode; 413 enum iwl_led_mode led_mode;
414 const bool adv_pm; 414 const bool adv_pm;
415 const bool use_new_eeprom_reading; /* temporary, remove later */
415}; 416};
416 417
417/*************************** 418/***************************
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.h b/drivers/net/wireless/iwlwifi/iwl-eeprom.h
index 583916db46e4..8994b5b23593 100644
--- a/drivers/net/wireless/iwlwifi/iwl-eeprom.h
+++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.h
@@ -129,6 +129,17 @@ struct iwl_eeprom_channel {
129 s8 max_power_avg; /* max power (dBm) on this chnl, limit 31 */ 129 s8 max_power_avg; /* max power (dBm) on this chnl, limit 31 */
130} __packed; 130} __packed;
131 131
132enum iwl_eeprom_enhanced_txpwr_flags {
133 IWL_EEPROM_ENH_TXP_FL_VALID = BIT(0),
134 IWL_EEPROM_ENH_TXP_FL_BAND_52G = BIT(1),
135 IWL_EEPROM_ENH_TXP_FL_OFDM = BIT(2),
136 IWL_EEPROM_ENH_TXP_FL_40MHZ = BIT(3),
137 IWL_EEPROM_ENH_TXP_FL_HT_AP = BIT(4),
138 IWL_EEPROM_ENH_TXP_FL_RES1 = BIT(5),
139 IWL_EEPROM_ENH_TXP_FL_RES2 = BIT(6),
140 IWL_EEPROM_ENH_TXP_FL_COMMON_TYPE = BIT(7),
141};
142
132/** 143/**
133 * iwl_eeprom_enhanced_txpwr structure 144 * iwl_eeprom_enhanced_txpwr structure
134 * This structure presents the enhanced regulatory tx power limit layout 145 * This structure presents the enhanced regulatory tx power limit layout
@@ -136,21 +147,23 @@ struct iwl_eeprom_channel {
136 * Enhanced regulatory tx power portion of eeprom image can be broken down 147 * Enhanced regulatory tx power portion of eeprom image can be broken down
137 * into individual structures; each one is 8 bytes in size and contain the 148 * into individual structures; each one is 8 bytes in size and contain the
138 * following information 149 * following information
139 * @common: (desc + channel) not used by driver, should _NOT_ be "zero" 150 * @flags: entry flags
151 * @channel: channel number
140 * @chain_a_max_pwr: chain a max power in 1/2 dBm 152 * @chain_a_max_pwr: chain a max power in 1/2 dBm
141 * @chain_b_max_pwr: chain b max power in 1/2 dBm 153 * @chain_b_max_pwr: chain b max power in 1/2 dBm
142 * @chain_c_max_pwr: chain c max power in 1/2 dBm 154 * @chain_c_max_pwr: chain c max power in 1/2 dBm
143 * @reserved: not used, should be "zero" 155 * @delta_20_in_40: 20-in-40 deltas (hi/lo)
144 * @mimo2_max_pwr: mimo2 max power in 1/2 dBm 156 * @mimo2_max_pwr: mimo2 max power in 1/2 dBm
145 * @mimo3_max_pwr: mimo3 max power in 1/2 dBm 157 * @mimo3_max_pwr: mimo3 max power in 1/2 dBm
146 * 158 *
147 */ 159 */
148struct iwl_eeprom_enhanced_txpwr { 160struct iwl_eeprom_enhanced_txpwr {
149 __le16 common; 161 u8 flags;
162 u8 channel;
150 s8 chain_a_max; 163 s8 chain_a_max;
151 s8 chain_b_max; 164 s8 chain_b_max;
152 s8 chain_c_max; 165 s8 chain_c_max;
153 s8 reserved; 166 u8 delta_20_in_40;
154 s8 mimo2_max; 167 s8 mimo2_max;
155 s8 mimo3_max; 168 s8 mimo3_max;
156} __packed; 169} __packed;
@@ -195,6 +208,8 @@ struct iwl_eeprom_enhanced_txpwr {
195#define EEPROM_LINK_CALIBRATION (2*0x67) 208#define EEPROM_LINK_CALIBRATION (2*0x67)
196#define EEPROM_LINK_PROCESS_ADJST (2*0x68) 209#define EEPROM_LINK_PROCESS_ADJST (2*0x68)
197#define EEPROM_LINK_OTHERS (2*0x69) 210#define EEPROM_LINK_OTHERS (2*0x69)
211#define EEPROM_LINK_TXP_LIMIT (2*0x6a)
212#define EEPROM_LINK_TXP_LIMIT_SIZE (2*0x6b)
198 213
199/* agn regulatory - indirect access */ 214/* agn regulatory - indirect access */
200#define EEPROM_REG_BAND_1_CHANNELS ((0x08)\ 215#define EEPROM_REG_BAND_1_CHANNELS ((0x08)\
@@ -398,6 +413,8 @@ struct iwl_eeprom_calib_info {
398#define INDIRECT_CALIBRATION 0x00040000 413#define INDIRECT_CALIBRATION 0x00040000
399#define INDIRECT_PROCESS_ADJST 0x00050000 414#define INDIRECT_PROCESS_ADJST 0x00050000
400#define INDIRECT_OTHERS 0x00060000 415#define INDIRECT_OTHERS 0x00060000
416#define INDIRECT_TXP_LIMIT 0x00070000
417#define INDIRECT_TXP_LIMIT_SIZE 0x00080000
401#define INDIRECT_ADDRESS 0x00100000 418#define INDIRECT_ADDRESS 0x00100000
402 419
403/* General */ 420/* General */
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
index dee32d3681a5..632c9211e634 100644
--- a/drivers/net/wireless/libertas/cfg.c
+++ b/drivers/net/wireless/libertas/cfg.c
@@ -617,7 +617,7 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy,
617 print_ssid(ssid_buf, ssid, ssid_len), 617 print_ssid(ssid_buf, ssid, ssid_len),
618 LBS_SCAN_RSSI_TO_MBM(rssi)/100); 618 LBS_SCAN_RSSI_TO_MBM(rssi)/100);
619 619
620 if (channel || 620 if (channel &&
621 !(channel->flags & IEEE80211_CHAN_DISABLED)) 621 !(channel->flags & IEEE80211_CHAN_DISABLED))
622 cfg80211_inform_bss(wiphy, channel, 622 cfg80211_inform_bss(wiphy, channel,
623 bssid, le64_to_cpu(*(__le64 *)tsfdesc), 623 bssid, le64_to_cpu(*(__le64 *)tsfdesc),
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
index dd4d8fc9ad7a..21713a7638c4 100644
--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -43,6 +43,7 @@ MODULE_FIRMWARE("isl3887usb");
43 43
44static struct usb_device_id p54u_table[] __devinitdata = { 44static struct usb_device_id p54u_table[] __devinitdata = {
45 /* Version 1 devices (pci chip + net2280) */ 45 /* Version 1 devices (pci chip + net2280) */
46 {USB_DEVICE(0x0411, 0x0050)}, /* Buffalo WLI2-USB2-G54 */
46 {USB_DEVICE(0x045e, 0x00c2)}, /* Microsoft MN-710 */ 47 {USB_DEVICE(0x045e, 0x00c2)}, /* Microsoft MN-710 */
47 {USB_DEVICE(0x0506, 0x0a11)}, /* 3COM 3CRWE254G72 */ 48 {USB_DEVICE(0x0506, 0x0a11)}, /* 3COM 3CRWE254G72 */
48 {USB_DEVICE(0x06b9, 0x0120)}, /* Thomson SpeedTouch 120g */ 49 {USB_DEVICE(0x06b9, 0x0120)}, /* Thomson SpeedTouch 120g */
@@ -56,9 +57,13 @@ static struct usb_device_id p54u_table[] __devinitdata = {
56 {USB_DEVICE(0x0846, 0x4220)}, /* Netgear WG111 */ 57 {USB_DEVICE(0x0846, 0x4220)}, /* Netgear WG111 */
57 {USB_DEVICE(0x09aa, 0x1000)}, /* Spinnaker Proto board */ 58 {USB_DEVICE(0x09aa, 0x1000)}, /* Spinnaker Proto board */
58 {USB_DEVICE(0x0cde, 0x0006)}, /* Medion 40900, Roper Europe */ 59 {USB_DEVICE(0x0cde, 0x0006)}, /* Medion 40900, Roper Europe */
60 {USB_DEVICE(0x0db0, 0x6826)}, /* MSI UB54G (MS-6826) */
59 {USB_DEVICE(0x107b, 0x55f2)}, /* Gateway WGU-210 (Gemtek) */ 61 {USB_DEVICE(0x107b, 0x55f2)}, /* Gateway WGU-210 (Gemtek) */
60 {USB_DEVICE(0x124a, 0x4023)}, /* Shuttle PN15, Airvast WM168g, IOGear GWU513 */ 62 {USB_DEVICE(0x124a, 0x4023)}, /* Shuttle PN15, Airvast WM168g, IOGear GWU513 */
63 {USB_DEVICE(0x1435, 0x0210)}, /* Inventel UR054G */
64 {USB_DEVICE(0x15a9, 0x0002)}, /* Gemtek WUBI-100GW 802.11g */
61 {USB_DEVICE(0x1630, 0x0005)}, /* 2Wire 802.11g USB (v1) / Z-Com */ 65 {USB_DEVICE(0x1630, 0x0005)}, /* 2Wire 802.11g USB (v1) / Z-Com */
66 {USB_DEVICE(0x182d, 0x096b)}, /* Sitecom WL-107 */
62 {USB_DEVICE(0x1915, 0x2234)}, /* Linksys WUSB54G OEM */ 67 {USB_DEVICE(0x1915, 0x2234)}, /* Linksys WUSB54G OEM */
63 {USB_DEVICE(0x1915, 0x2235)}, /* Linksys WUSB54G Portable OEM */ 68 {USB_DEVICE(0x1915, 0x2235)}, /* Linksys WUSB54G Portable OEM */
64 {USB_DEVICE(0x2001, 0x3701)}, /* DLink DWL-G120 Spinnaker */ 69 {USB_DEVICE(0x2001, 0x3701)}, /* DLink DWL-G120 Spinnaker */
@@ -94,6 +99,7 @@ static struct usb_device_id p54u_table[] __devinitdata = {
94 {USB_DEVICE(0x1435, 0x0427)}, /* Inventel UR054G */ 99 {USB_DEVICE(0x1435, 0x0427)}, /* Inventel UR054G */
95 {USB_DEVICE(0x1668, 0x1050)}, /* Actiontec 802UIG-1 */ 100 {USB_DEVICE(0x1668, 0x1050)}, /* Actiontec 802UIG-1 */
96 {USB_DEVICE(0x2001, 0x3704)}, /* DLink DWL-G122 rev A2 */ 101 {USB_DEVICE(0x2001, 0x3704)}, /* DLink DWL-G122 rev A2 */
102 {USB_DEVICE(0x2001, 0x3705)}, /* D-Link DWL-G120 rev C1 */
97 {USB_DEVICE(0x413c, 0x5513)}, /* Dell WLA3310 USB Wireless Adapter */ 103 {USB_DEVICE(0x413c, 0x5513)}, /* Dell WLA3310 USB Wireless Adapter */
98 {USB_DEVICE(0x413c, 0x8102)}, /* Spinnaker DUT */ 104 {USB_DEVICE(0x413c, 0x8102)}, /* Spinnaker DUT */
99 {USB_DEVICE(0x413c, 0x8104)}, /* Cohiba Proto board */ 105 {USB_DEVICE(0x413c, 0x8104)}, /* Cohiba Proto board */
diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c
index 05bf5a27b5b0..989e16e4ab5c 100644
--- a/drivers/usb/atm/usbatm.c
+++ b/drivers/usb/atm/usbatm.c
@@ -951,7 +951,9 @@ static int usbatm_atm_init(struct usbatm_data *instance)
951 * condition: callbacks we register can be executed at once, before we have 951 * condition: callbacks we register can be executed at once, before we have
952 * initialized the struct atm_dev. To protect against this, all callbacks 952 * initialized the struct atm_dev. To protect against this, all callbacks
953 * abort if atm_dev->dev_data is NULL. */ 953 * abort if atm_dev->dev_data is NULL. */
954 atm_dev = atm_dev_register(instance->driver_name, &usbatm_atm_devops, -1, NULL); 954 atm_dev = atm_dev_register(instance->driver_name,
955 &instance->usb_intf->dev, &usbatm_atm_devops,
956 -1, NULL);
955 if (!atm_dev) { 957 if (!atm_dev) {
956 usb_err(instance, "%s: failed to register ATM device!\n", __func__); 958 usb_err(instance, "%s: failed to register ATM device!\n", __func__);
957 return -1; 959 return -1;
@@ -966,14 +968,6 @@ static int usbatm_atm_init(struct usbatm_data *instance)
966 /* temp init ATM device, set to 128kbit */ 968 /* temp init ATM device, set to 128kbit */
967 atm_dev->link_rate = 128 * 1000 / 424; 969 atm_dev->link_rate = 128 * 1000 / 424;
968 970
969 ret = sysfs_create_link(&atm_dev->class_dev.kobj,
970 &instance->usb_intf->dev.kobj, "device");
971 if (ret) {
972 atm_err(instance, "%s: sysfs_create_link failed: %d\n",
973 __func__, ret);
974 goto fail_sysfs;
975 }
976
977 if (instance->driver->atm_start && ((ret = instance->driver->atm_start(instance, atm_dev)) < 0)) { 971 if (instance->driver->atm_start && ((ret = instance->driver->atm_start(instance, atm_dev)) < 0)) {
978 atm_err(instance, "%s: atm_start failed: %d!\n", __func__, ret); 972 atm_err(instance, "%s: atm_start failed: %d!\n", __func__, ret);
979 goto fail; 973 goto fail;
@@ -992,8 +986,6 @@ static int usbatm_atm_init(struct usbatm_data *instance)
992 return 0; 986 return 0;
993 987
994 fail: 988 fail:
995 sysfs_remove_link(&atm_dev->class_dev.kobj, "device");
996 fail_sysfs:
997 instance->atm_dev = NULL; 989 instance->atm_dev = NULL;
998 atm_dev_deregister(atm_dev); /* usbatm_atm_dev_close will eventually be called */ 990 atm_dev_deregister(atm_dev); /* usbatm_atm_dev_close will eventually be called */
999 return ret; 991 return ret;
@@ -1329,7 +1321,6 @@ void usbatm_usb_disconnect(struct usb_interface *intf)
1329 1321
1330 /* ATM finalize */ 1322 /* ATM finalize */
1331 if (instance->atm_dev) { 1323 if (instance->atm_dev) {
1332 sysfs_remove_link(&instance->atm_dev->class_dev.kobj, "device");
1333 atm_dev_deregister(instance->atm_dev); 1324 atm_dev_deregister(instance->atm_dev);
1334 instance->atm_dev = NULL; 1325 instance->atm_dev = NULL;
1335 } 1326 }