aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/arcnet/com20020-pci.c21
-rw-r--r--drivers/net/ethernet/3com/3c589_cs.c7
-rw-r--r--drivers/net/ethernet/agere/et131x.c6
-rw-r--r--drivers/net/ethernet/apm/xgene/xgene_enet_main.c2
-rw-r--r--drivers/net/ethernet/broadcom/b44.c2
-rw-r--r--drivers/net/ethernet/broadcom/bgmac.c7
-rw-r--r--drivers/net/ethernet/broadcom/tg3.c2
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/main.c1
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic.h11
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c34
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c19
-rw-r--r--drivers/net/ethernet/sun/sunvnet.c23
-rw-r--r--drivers/net/ipvlan/ipvlan.h2
-rw-r--r--drivers/net/phy/micrel.c28
-rw-r--r--drivers/net/usb/hso.c2
-rw-r--r--drivers/net/usb/r8152.c59
-rw-r--r--drivers/net/vxlan.c38
-rw-r--r--drivers/net/wireless/b43/main.c4
-rw-r--r--drivers/net/wireless/b43legacy/main.c2
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c2
-rw-r--r--drivers/net/wireless/rtlwifi/pci.c5
21 files changed, 212 insertions, 65 deletions
diff --git a/drivers/net/arcnet/com20020-pci.c b/drivers/net/arcnet/com20020-pci.c
index 945f532078e9..96edc1346124 100644
--- a/drivers/net/arcnet/com20020-pci.c
+++ b/drivers/net/arcnet/com20020-pci.c
@@ -214,8 +214,17 @@ static struct com20020_pci_card_info card_info_sohard = {
214 .flags = ARC_CAN_10MBIT, 214 .flags = ARC_CAN_10MBIT,
215}; 215};
216 216
217static struct com20020_pci_card_info card_info_eae = { 217static struct com20020_pci_card_info card_info_eae_arc1 = {
218 .name = "EAE PLX-PCI", 218 .name = "EAE PLX-PCI ARC1",
219 .devcount = 1,
220 .chan_map_tbl = {
221 { 2, 0x00, 0x08 },
222 },
223 .flags = ARC_CAN_10MBIT,
224};
225
226static struct com20020_pci_card_info card_info_eae_ma1 = {
227 .name = "EAE PLX-PCI MA1",
219 .devcount = 2, 228 .devcount = 2,
220 .chan_map_tbl = { 229 .chan_map_tbl = {
221 { 2, 0x00, 0x08 }, 230 { 2, 0x00, 0x08 },
@@ -359,9 +368,15 @@ static const struct pci_device_id com20020pci_id_table[] = {
359 }, 368 },
360 { 369 {
361 0x10B5, 0x9050, 370 0x10B5, 0x9050,
371 0x10B5, 0x3263,
372 0, 0,
373 (kernel_ulong_t)&card_info_eae_arc1
374 },
375 {
376 0x10B5, 0x9050,
362 0x10B5, 0x3292, 377 0x10B5, 0x3292,
363 0, 0, 378 0, 0,
364 (kernel_ulong_t)&card_info_eae 379 (kernel_ulong_t)&card_info_eae_ma1
365 }, 380 },
366 { 381 {
367 0x14BA, 0x6000, 382 0x14BA, 0x6000,
diff --git a/drivers/net/ethernet/3com/3c589_cs.c b/drivers/net/ethernet/3com/3c589_cs.c
index f18647c23559..c5a320507556 100644
--- a/drivers/net/ethernet/3com/3c589_cs.c
+++ b/drivers/net/ethernet/3com/3c589_cs.c
@@ -518,11 +518,8 @@ static int el3_open(struct net_device *dev)
518 netif_start_queue(dev); 518 netif_start_queue(dev);
519 519
520 tc589_reset(dev); 520 tc589_reset(dev);
521 init_timer(&lp->media); 521 setup_timer(&lp->media, media_check, (unsigned long)dev);
522 lp->media.function = media_check; 522 mod_timer(&lp->media, jiffies + HZ);
523 lp->media.data = (unsigned long) dev;
524 lp->media.expires = jiffies + HZ;
525 add_timer(&lp->media);
526 523
527 dev_dbg(&link->dev, "%s: opened, status %4.4x.\n", 524 dev_dbg(&link->dev, "%s: opened, status %4.4x.\n",
528 dev->name, inw(dev->base_addr + EL3_STATUS)); 525 dev->name, inw(dev->base_addr + EL3_STATUS));
diff --git a/drivers/net/ethernet/agere/et131x.c b/drivers/net/ethernet/agere/et131x.c
index 384dc163851b..e0f3d197e7f2 100644
--- a/drivers/net/ethernet/agere/et131x.c
+++ b/drivers/net/ethernet/agere/et131x.c
@@ -3127,7 +3127,8 @@ static void et131x_error_timer_handler(unsigned long data)
3127 } 3127 }
3128 3128
3129 /* This is a periodic timer, so reschedule */ 3129 /* This is a periodic timer, so reschedule */
3130 mod_timer(&adapter->error_timer, jiffies + TX_ERROR_PERIOD * HZ / 1000); 3130 mod_timer(&adapter->error_timer, jiffies +
3131 msecs_to_jiffies(TX_ERROR_PERIOD));
3131} 3132}
3132 3133
3133static void et131x_adapter_memory_free(struct et131x_adapter *adapter) 3134static void et131x_adapter_memory_free(struct et131x_adapter *adapter)
@@ -3647,7 +3648,8 @@ static int et131x_open(struct net_device *netdev)
3647 3648
3648 /* Start the timer to track NIC errors */ 3649 /* Start the timer to track NIC errors */
3649 init_timer(&adapter->error_timer); 3650 init_timer(&adapter->error_timer);
3650 adapter->error_timer.expires = jiffies + TX_ERROR_PERIOD * HZ / 1000; 3651 adapter->error_timer.expires = jiffies +
3652 msecs_to_jiffies(TX_ERROR_PERIOD);
3651 adapter->error_timer.function = et131x_error_timer_handler; 3653 adapter->error_timer.function = et131x_error_timer_handler;
3652 adapter->error_timer.data = (unsigned long)adapter; 3654 adapter->error_timer.data = (unsigned long)adapter;
3653 add_timer(&adapter->error_timer); 3655 add_timer(&adapter->error_timer);
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
index 44b15373d6b3..4de62b210c85 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
@@ -1030,12 +1030,14 @@ static const struct acpi_device_id xgene_enet_acpi_match[] = {
1030MODULE_DEVICE_TABLE(acpi, xgene_enet_acpi_match); 1030MODULE_DEVICE_TABLE(acpi, xgene_enet_acpi_match);
1031#endif 1031#endif
1032 1032
1033#ifdef CONFIG_OF
1033static struct of_device_id xgene_enet_of_match[] = { 1034static struct of_device_id xgene_enet_of_match[] = {
1034 {.compatible = "apm,xgene-enet",}, 1035 {.compatible = "apm,xgene-enet",},
1035 {}, 1036 {},
1036}; 1037};
1037 1038
1038MODULE_DEVICE_TABLE(of, xgene_enet_of_match); 1039MODULE_DEVICE_TABLE(of, xgene_enet_of_match);
1040#endif
1039 1041
1040static struct platform_driver xgene_enet_driver = { 1042static struct platform_driver xgene_enet_driver = {
1041 .driver = { 1043 .driver = {
diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c
index d86d6baf9681..bd5916a60cb5 100644
--- a/drivers/net/ethernet/broadcom/b44.c
+++ b/drivers/net/ethernet/broadcom/b44.c
@@ -121,7 +121,7 @@ static struct pci_driver b44_pci_driver = {
121 121
122static const struct ssb_device_id b44_ssb_tbl[] = { 122static const struct ssb_device_id b44_ssb_tbl[] = {
123 SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_ETHERNET, SSB_ANY_REV), 123 SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_ETHERNET, SSB_ANY_REV),
124 SSB_DEVTABLE_END 124 {},
125}; 125};
126MODULE_DEVICE_TABLE(ssb, b44_ssb_tbl); 126MODULE_DEVICE_TABLE(ssb, b44_ssb_tbl);
127 127
diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
index 3007d95fbb9f..676ffe093180 100644
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
@@ -21,7 +21,7 @@
21static const struct bcma_device_id bgmac_bcma_tbl[] = { 21static const struct bcma_device_id bgmac_bcma_tbl[] = {
22 BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_4706_MAC_GBIT, BCMA_ANY_REV, BCMA_ANY_CLASS), 22 BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_4706_MAC_GBIT, BCMA_ANY_REV, BCMA_ANY_CLASS),
23 BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_MAC_GBIT, BCMA_ANY_REV, BCMA_ANY_CLASS), 23 BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_MAC_GBIT, BCMA_ANY_REV, BCMA_ANY_CLASS),
24 BCMA_CORETABLE_END 24 {},
25}; 25};
26MODULE_DEVICE_TABLE(bcma, bgmac_bcma_tbl); 26MODULE_DEVICE_TABLE(bcma, bgmac_bcma_tbl);
27 27
@@ -1412,6 +1412,7 @@ static void bgmac_mii_unregister(struct bgmac *bgmac)
1412/* http://bcm-v4.sipsolutions.net/mac-gbit/gmac/chipattach */ 1412/* http://bcm-v4.sipsolutions.net/mac-gbit/gmac/chipattach */
1413static int bgmac_probe(struct bcma_device *core) 1413static int bgmac_probe(struct bcma_device *core)
1414{ 1414{
1415 struct bcma_chipinfo *ci = &core->bus->chipinfo;
1415 struct net_device *net_dev; 1416 struct net_device *net_dev;
1416 struct bgmac *bgmac; 1417 struct bgmac *bgmac;
1417 struct ssb_sprom *sprom = &core->bus->sprom; 1418 struct ssb_sprom *sprom = &core->bus->sprom;
@@ -1474,8 +1475,8 @@ static int bgmac_probe(struct bcma_device *core)
1474 bgmac_chip_reset(bgmac); 1475 bgmac_chip_reset(bgmac);
1475 1476
1476 /* For Northstar, we have to take all GMAC core out of reset */ 1477 /* For Northstar, we have to take all GMAC core out of reset */
1477 if (core->id.id == BCMA_CHIP_ID_BCM4707 || 1478 if (ci->id == BCMA_CHIP_ID_BCM4707 ||
1478 core->id.id == BCMA_CHIP_ID_BCM53018) { 1479 ci->id == BCMA_CHIP_ID_BCM53018) {
1479 struct bcma_device *ns_core; 1480 struct bcma_device *ns_core;
1480 int ns_gmac; 1481 int ns_gmac;
1481 1482
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 615a6dbde047..23a019cee279 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -17855,8 +17855,10 @@ static int tg3_init_one(struct pci_dev *pdev,
17855 */ 17855 */
17856 if ((tr32(HOSTCC_MODE) & HOSTCC_MODE_ENABLE) || 17856 if ((tr32(HOSTCC_MODE) & HOSTCC_MODE_ENABLE) ||
17857 (tr32(WDMAC_MODE) & WDMAC_MODE_ENABLE)) { 17857 (tr32(WDMAC_MODE) & WDMAC_MODE_ENABLE)) {
17858 tg3_full_lock(tp, 0);
17858 tw32(MEMARB_MODE, MEMARB_MODE_ENABLE); 17859 tw32(MEMARB_MODE, MEMARB_MODE_ENABLE);
17859 tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); 17860 tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
17861 tg3_full_unlock(tp);
17860 } 17862 }
17861 17863
17862 err = tg3_test_dma(tp); 17864 err = tg3_test_dma(tp);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
index d6651937d899..5394a8486558 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -291,6 +291,7 @@ static void copy_rw_fields(void *to, struct mlx5_caps *from)
291 MLX5_SET(cmd_hca_cap, to, log_max_ra_req_dc, from->gen.log_max_ra_req_dc); 291 MLX5_SET(cmd_hca_cap, to, log_max_ra_req_dc, from->gen.log_max_ra_req_dc);
292 MLX5_SET(cmd_hca_cap, to, log_max_ra_res_dc, from->gen.log_max_ra_res_dc); 292 MLX5_SET(cmd_hca_cap, to, log_max_ra_res_dc, from->gen.log_max_ra_res_dc);
293 MLX5_SET(cmd_hca_cap, to, pkey_table_size, to_fw_pkey_sz(from->gen.pkey_table_size)); 293 MLX5_SET(cmd_hca_cap, to, pkey_table_size, to_fw_pkey_sz(from->gen.pkey_table_size));
294 MLX5_SET(cmd_hca_cap, to, log_uar_page_sz, PAGE_SHIFT - 12);
294 v64 = from->gen.flags & MLX5_CAP_BITS_RW_MASK; 295 v64 = from->gen.flags & MLX5_CAP_BITS_RW_MASK;
295 *flags_off = cpu_to_be64(v64); 296 *flags_off = cpu_to_be64(v64);
296} 297}
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
index e56c1bb36141..fa4317611fd6 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
@@ -848,10 +848,17 @@ struct qlcnic_cardrsp_tx_ctx {
848#define QLCNIC_MAC_VLAN_ADD 3 848#define QLCNIC_MAC_VLAN_ADD 3
849#define QLCNIC_MAC_VLAN_DEL 4 849#define QLCNIC_MAC_VLAN_DEL 4
850 850
851enum qlcnic_mac_type {
852 QLCNIC_UNICAST_MAC,
853 QLCNIC_MULTICAST_MAC,
854 QLCNIC_BROADCAST_MAC,
855};
856
851struct qlcnic_mac_vlan_list { 857struct qlcnic_mac_vlan_list {
852 struct list_head list; 858 struct list_head list;
853 uint8_t mac_addr[ETH_ALEN+2]; 859 uint8_t mac_addr[ETH_ALEN+2];
854 u16 vlan_id; 860 u16 vlan_id;
861 enum qlcnic_mac_type mac_type;
855}; 862};
856 863
857/* MAC Learn */ 864/* MAC Learn */
@@ -1615,7 +1622,9 @@ void qlcnic_watchdog_task(struct work_struct *work);
1615void qlcnic_post_rx_buffers(struct qlcnic_adapter *adapter, 1622void qlcnic_post_rx_buffers(struct qlcnic_adapter *adapter,
1616 struct qlcnic_host_rds_ring *rds_ring, u8 ring_id); 1623 struct qlcnic_host_rds_ring *rds_ring, u8 ring_id);
1617void qlcnic_set_multi(struct net_device *netdev); 1624void qlcnic_set_multi(struct net_device *netdev);
1618int qlcnic_nic_add_mac(struct qlcnic_adapter *, const u8 *, u16); 1625void qlcnic_flush_mcast_mac(struct qlcnic_adapter *);
1626int qlcnic_nic_add_mac(struct qlcnic_adapter *, const u8 *, u16,
1627 enum qlcnic_mac_type);
1619int qlcnic_nic_del_mac(struct qlcnic_adapter *, const u8 *); 1628int qlcnic_nic_del_mac(struct qlcnic_adapter *, const u8 *);
1620void qlcnic_82xx_free_mac_list(struct qlcnic_adapter *adapter); 1629void qlcnic_82xx_free_mac_list(struct qlcnic_adapter *adapter);
1621int qlcnic_82xx_read_phys_port_id(struct qlcnic_adapter *); 1630int qlcnic_82xx_read_phys_port_id(struct qlcnic_adapter *);
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
index 69b46c051cc0..3e0f705a4311 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
@@ -487,7 +487,8 @@ int qlcnic_nic_del_mac(struct qlcnic_adapter *adapter, const u8 *addr)
487 return err; 487 return err;
488} 488}
489 489
490int qlcnic_nic_add_mac(struct qlcnic_adapter *adapter, const u8 *addr, u16 vlan) 490int qlcnic_nic_add_mac(struct qlcnic_adapter *adapter, const u8 *addr, u16 vlan,
491 enum qlcnic_mac_type mac_type)
491{ 492{
492 struct qlcnic_mac_vlan_list *cur; 493 struct qlcnic_mac_vlan_list *cur;
493 struct list_head *head; 494 struct list_head *head;
@@ -513,10 +514,29 @@ int qlcnic_nic_add_mac(struct qlcnic_adapter *adapter, const u8 *addr, u16 vlan)
513 } 514 }
514 515
515 cur->vlan_id = vlan; 516 cur->vlan_id = vlan;
517 cur->mac_type = mac_type;
518
516 list_add_tail(&cur->list, &adapter->mac_list); 519 list_add_tail(&cur->list, &adapter->mac_list);
517 return 0; 520 return 0;
518} 521}
519 522
523void qlcnic_flush_mcast_mac(struct qlcnic_adapter *adapter)
524{
525 struct qlcnic_mac_vlan_list *cur;
526 struct list_head *head, *tmp;
527
528 list_for_each_safe(head, tmp, &adapter->mac_list) {
529 cur = list_entry(head, struct qlcnic_mac_vlan_list, list);
530 if (cur->mac_type != QLCNIC_MULTICAST_MAC)
531 continue;
532
533 qlcnic_sre_macaddr_change(adapter, cur->mac_addr,
534 cur->vlan_id, QLCNIC_MAC_DEL);
535 list_del(&cur->list);
536 kfree(cur);
537 }
538}
539
520static void __qlcnic_set_multi(struct net_device *netdev, u16 vlan) 540static void __qlcnic_set_multi(struct net_device *netdev, u16 vlan)
521{ 541{
522 struct qlcnic_adapter *adapter = netdev_priv(netdev); 542 struct qlcnic_adapter *adapter = netdev_priv(netdev);
@@ -530,8 +550,9 @@ static void __qlcnic_set_multi(struct net_device *netdev, u16 vlan)
530 if (!test_bit(__QLCNIC_FW_ATTACHED, &adapter->state)) 550 if (!test_bit(__QLCNIC_FW_ATTACHED, &adapter->state))
531 return; 551 return;
532 552
533 qlcnic_nic_add_mac(adapter, adapter->mac_addr, vlan); 553 qlcnic_nic_add_mac(adapter, adapter->mac_addr, vlan,
534 qlcnic_nic_add_mac(adapter, bcast_addr, vlan); 554 QLCNIC_UNICAST_MAC);
555 qlcnic_nic_add_mac(adapter, bcast_addr, vlan, QLCNIC_BROADCAST_MAC);
535 556
536 if (netdev->flags & IFF_PROMISC) { 557 if (netdev->flags & IFF_PROMISC) {
537 if (!(adapter->flags & QLCNIC_PROMISC_DISABLED)) 558 if (!(adapter->flags & QLCNIC_PROMISC_DISABLED))
@@ -540,8 +561,10 @@ static void __qlcnic_set_multi(struct net_device *netdev, u16 vlan)
540 (netdev_mc_count(netdev) > ahw->max_mc_count)) { 561 (netdev_mc_count(netdev) > ahw->max_mc_count)) {
541 mode = VPORT_MISS_MODE_ACCEPT_MULTI; 562 mode = VPORT_MISS_MODE_ACCEPT_MULTI;
542 } else if (!netdev_mc_empty(netdev)) { 563 } else if (!netdev_mc_empty(netdev)) {
564 qlcnic_flush_mcast_mac(adapter);
543 netdev_for_each_mc_addr(ha, netdev) 565 netdev_for_each_mc_addr(ha, netdev)
544 qlcnic_nic_add_mac(adapter, ha->addr, vlan); 566 qlcnic_nic_add_mac(adapter, ha->addr, vlan,
567 QLCNIC_MULTICAST_MAC);
545 } 568 }
546 569
547 /* configure unicast MAC address, if there is not sufficient space 570 /* configure unicast MAC address, if there is not sufficient space
@@ -551,7 +574,8 @@ static void __qlcnic_set_multi(struct net_device *netdev, u16 vlan)
551 mode = VPORT_MISS_MODE_ACCEPT_ALL; 574 mode = VPORT_MISS_MODE_ACCEPT_ALL;
552 } else if (!netdev_uc_empty(netdev)) { 575 } else if (!netdev_uc_empty(netdev)) {
553 netdev_for_each_uc_addr(ha, netdev) 576 netdev_for_each_uc_addr(ha, netdev)
554 qlcnic_nic_add_mac(adapter, ha->addr, vlan); 577 qlcnic_nic_add_mac(adapter, ha->addr, vlan,
578 QLCNIC_UNICAST_MAC);
555 } 579 }
556 580
557 if (mode == VPORT_MISS_MODE_ACCEPT_ALL && 581 if (mode == VPORT_MISS_MODE_ACCEPT_ALL &&
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
index 1659c804f1d5..e6312465fe45 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
@@ -1489,7 +1489,8 @@ out:
1489 return ret; 1489 return ret;
1490} 1490}
1491 1491
1492static void qlcnic_vf_add_mc_list(struct net_device *netdev, const u8 *mac) 1492static void qlcnic_vf_add_mc_list(struct net_device *netdev, const u8 *mac,
1493 enum qlcnic_mac_type mac_type)
1493{ 1494{
1494 struct qlcnic_adapter *adapter = netdev_priv(netdev); 1495 struct qlcnic_adapter *adapter = netdev_priv(netdev);
1495 struct qlcnic_sriov *sriov = adapter->ahw->sriov; 1496 struct qlcnic_sriov *sriov = adapter->ahw->sriov;
@@ -1500,17 +1501,18 @@ static void qlcnic_vf_add_mc_list(struct net_device *netdev, const u8 *mac)
1500 vf = &adapter->ahw->sriov->vf_info[0]; 1501 vf = &adapter->ahw->sriov->vf_info[0];
1501 1502
1502 if (!qlcnic_sriov_check_any_vlan(vf)) { 1503 if (!qlcnic_sriov_check_any_vlan(vf)) {
1503 qlcnic_nic_add_mac(adapter, mac, 0); 1504 qlcnic_nic_add_mac(adapter, mac, 0, mac_type);
1504 } else { 1505 } else {
1505 spin_lock(&vf->vlan_list_lock); 1506 spin_lock(&vf->vlan_list_lock);
1506 for (i = 0; i < sriov->num_allowed_vlans; i++) { 1507 for (i = 0; i < sriov->num_allowed_vlans; i++) {
1507 vlan_id = vf->sriov_vlans[i]; 1508 vlan_id = vf->sriov_vlans[i];
1508 if (vlan_id) 1509 if (vlan_id)
1509 qlcnic_nic_add_mac(adapter, mac, vlan_id); 1510 qlcnic_nic_add_mac(adapter, mac, vlan_id,
1511 mac_type);
1510 } 1512 }
1511 spin_unlock(&vf->vlan_list_lock); 1513 spin_unlock(&vf->vlan_list_lock);
1512 if (qlcnic_84xx_check(adapter)) 1514 if (qlcnic_84xx_check(adapter))
1513 qlcnic_nic_add_mac(adapter, mac, 0); 1515 qlcnic_nic_add_mac(adapter, mac, 0, mac_type);
1514 } 1516 }
1515} 1517}
1516 1518
@@ -1549,10 +1551,12 @@ void qlcnic_sriov_vf_set_multi(struct net_device *netdev)
1549 (netdev_mc_count(netdev) > ahw->max_mc_count)) { 1551 (netdev_mc_count(netdev) > ahw->max_mc_count)) {
1550 mode = VPORT_MISS_MODE_ACCEPT_MULTI; 1552 mode = VPORT_MISS_MODE_ACCEPT_MULTI;
1551 } else { 1553 } else {
1552 qlcnic_vf_add_mc_list(netdev, bcast_addr); 1554 qlcnic_vf_add_mc_list(netdev, bcast_addr, QLCNIC_BROADCAST_MAC);
1553 if (!netdev_mc_empty(netdev)) { 1555 if (!netdev_mc_empty(netdev)) {
1556 qlcnic_flush_mcast_mac(adapter);
1554 netdev_for_each_mc_addr(ha, netdev) 1557 netdev_for_each_mc_addr(ha, netdev)
1555 qlcnic_vf_add_mc_list(netdev, ha->addr); 1558 qlcnic_vf_add_mc_list(netdev, ha->addr,
1559 QLCNIC_MULTICAST_MAC);
1556 } 1560 }
1557 } 1561 }
1558 1562
@@ -1563,7 +1567,8 @@ void qlcnic_sriov_vf_set_multi(struct net_device *netdev)
1563 mode = VPORT_MISS_MODE_ACCEPT_ALL; 1567 mode = VPORT_MISS_MODE_ACCEPT_ALL;
1564 } else if (!netdev_uc_empty(netdev)) { 1568 } else if (!netdev_uc_empty(netdev)) {
1565 netdev_for_each_uc_addr(ha, netdev) 1569 netdev_for_each_uc_addr(ha, netdev)
1566 qlcnic_vf_add_mc_list(netdev, ha->addr); 1570 qlcnic_vf_add_mc_list(netdev, ha->addr,
1571 QLCNIC_UNICAST_MAC);
1567 } 1572 }
1568 1573
1569 if (adapter->pdev->is_virtfn) { 1574 if (adapter->pdev->is_virtfn) {
diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c
index 2b10b85d8a08..22e0cad1b4b5 100644
--- a/drivers/net/ethernet/sun/sunvnet.c
+++ b/drivers/net/ethernet/sun/sunvnet.c
@@ -1192,23 +1192,16 @@ static int vnet_handle_offloads(struct vnet_port *port, struct sk_buff *skb)
1192 skb_pull(skb, maclen); 1192 skb_pull(skb, maclen);
1193 1193
1194 if (port->tso && gso_size < datalen) { 1194 if (port->tso && gso_size < datalen) {
1195 if (skb_unclone(skb, GFP_ATOMIC))
1196 goto out_dropped;
1197
1195 /* segment to TSO size */ 1198 /* segment to TSO size */
1196 skb_shinfo(skb)->gso_size = datalen; 1199 skb_shinfo(skb)->gso_size = datalen;
1197 skb_shinfo(skb)->gso_segs = gso_segs; 1200 skb_shinfo(skb)->gso_segs = gso_segs;
1198
1199 segs = skb_gso_segment(skb, dev->features & ~NETIF_F_TSO);
1200
1201 /* restore gso_size & gso_segs */
1202 skb_shinfo(skb)->gso_size = gso_size;
1203 skb_shinfo(skb)->gso_segs = DIV_ROUND_UP(skb->len - hlen,
1204 gso_size);
1205 } else
1206 segs = skb_gso_segment(skb, dev->features & ~NETIF_F_TSO);
1207 if (IS_ERR(segs)) {
1208 dev->stats.tx_dropped++;
1209 dev_kfree_skb_any(skb);
1210 return NETDEV_TX_OK;
1211 } 1201 }
1202 segs = skb_gso_segment(skb, dev->features & ~NETIF_F_TSO);
1203 if (IS_ERR(segs))
1204 goto out_dropped;
1212 1205
1213 skb_push(skb, maclen); 1206 skb_push(skb, maclen);
1214 skb_reset_mac_header(skb); 1207 skb_reset_mac_header(skb);
@@ -1246,6 +1239,10 @@ static int vnet_handle_offloads(struct vnet_port *port, struct sk_buff *skb)
1246 if (!(status & NETDEV_TX_MASK)) 1239 if (!(status & NETDEV_TX_MASK))
1247 dev_kfree_skb_any(skb); 1240 dev_kfree_skb_any(skb);
1248 return status; 1241 return status;
1242out_dropped:
1243 dev->stats.tx_dropped++;
1244 dev_kfree_skb_any(skb);
1245 return NETDEV_TX_OK;
1249} 1246}
1250 1247
1251static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev) 1248static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
diff --git a/drivers/net/ipvlan/ipvlan.h b/drivers/net/ipvlan/ipvlan.h
index 2729f64b3e7e..924ea98bd531 100644
--- a/drivers/net/ipvlan/ipvlan.h
+++ b/drivers/net/ipvlan/ipvlan.h
@@ -67,7 +67,7 @@ struct ipvl_dev {
67 struct list_head addrs; 67 struct list_head addrs;
68 int ipv4cnt; 68 int ipv4cnt;
69 int ipv6cnt; 69 int ipv6cnt;
70 struct ipvl_pcpu_stats *pcpu_stats; 70 struct ipvl_pcpu_stats __percpu *pcpu_stats;
71 DECLARE_BITMAP(mac_filters, IPVLAN_MAC_FILTER_SIZE); 71 DECLARE_BITMAP(mac_filters, IPVLAN_MAC_FILTER_SIZE);
72 netdev_features_t sfeatures; 72 netdev_features_t sfeatures;
73 u32 msg_enable; 73 u32 msg_enable;
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 3ad8ca76196d..1190fd8f0088 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -32,6 +32,7 @@
32/* Operation Mode Strap Override */ 32/* Operation Mode Strap Override */
33#define MII_KSZPHY_OMSO 0x16 33#define MII_KSZPHY_OMSO 0x16
34#define KSZPHY_OMSO_B_CAST_OFF BIT(9) 34#define KSZPHY_OMSO_B_CAST_OFF BIT(9)
35#define KSZPHY_OMSO_NAND_TREE_ON BIT(5)
35#define KSZPHY_OMSO_RMII_OVERRIDE BIT(1) 36#define KSZPHY_OMSO_RMII_OVERRIDE BIT(1)
36#define KSZPHY_OMSO_MII_OVERRIDE BIT(0) 37#define KSZPHY_OMSO_MII_OVERRIDE BIT(0)
37 38
@@ -76,6 +77,7 @@ struct kszphy_type {
76 u32 led_mode_reg; 77 u32 led_mode_reg;
77 u16 interrupt_level_mask; 78 u16 interrupt_level_mask;
78 bool has_broadcast_disable; 79 bool has_broadcast_disable;
80 bool has_nand_tree_disable;
79 bool has_rmii_ref_clk_sel; 81 bool has_rmii_ref_clk_sel;
80}; 82};
81 83
@@ -89,6 +91,7 @@ struct kszphy_priv {
89static const struct kszphy_type ksz8021_type = { 91static const struct kszphy_type ksz8021_type = {
90 .led_mode_reg = MII_KSZPHY_CTRL_2, 92 .led_mode_reg = MII_KSZPHY_CTRL_2,
91 .has_broadcast_disable = true, 93 .has_broadcast_disable = true,
94 .has_nand_tree_disable = true,
92 .has_rmii_ref_clk_sel = true, 95 .has_rmii_ref_clk_sel = true,
93}; 96};
94 97
@@ -98,11 +101,13 @@ static const struct kszphy_type ksz8041_type = {
98 101
99static const struct kszphy_type ksz8051_type = { 102static const struct kszphy_type ksz8051_type = {
100 .led_mode_reg = MII_KSZPHY_CTRL_2, 103 .led_mode_reg = MII_KSZPHY_CTRL_2,
104 .has_nand_tree_disable = true,
101}; 105};
102 106
103static const struct kszphy_type ksz8081_type = { 107static const struct kszphy_type ksz8081_type = {
104 .led_mode_reg = MII_KSZPHY_CTRL_2, 108 .led_mode_reg = MII_KSZPHY_CTRL_2,
105 .has_broadcast_disable = true, 109 .has_broadcast_disable = true,
110 .has_nand_tree_disable = true,
106 .has_rmii_ref_clk_sel = true, 111 .has_rmii_ref_clk_sel = true,
107}; 112};
108 113
@@ -231,6 +236,26 @@ out:
231 return ret; 236 return ret;
232} 237}
233 238
239static int kszphy_nand_tree_disable(struct phy_device *phydev)
240{
241 int ret;
242
243 ret = phy_read(phydev, MII_KSZPHY_OMSO);
244 if (ret < 0)
245 goto out;
246
247 if (!(ret & KSZPHY_OMSO_NAND_TREE_ON))
248 return 0;
249
250 ret = phy_write(phydev, MII_KSZPHY_OMSO,
251 ret & ~KSZPHY_OMSO_NAND_TREE_ON);
252out:
253 if (ret)
254 dev_err(&phydev->dev, "failed to disable NAND tree mode\n");
255
256 return ret;
257}
258
234static int kszphy_config_init(struct phy_device *phydev) 259static int kszphy_config_init(struct phy_device *phydev)
235{ 260{
236 struct kszphy_priv *priv = phydev->priv; 261 struct kszphy_priv *priv = phydev->priv;
@@ -245,6 +270,9 @@ static int kszphy_config_init(struct phy_device *phydev)
245 if (type->has_broadcast_disable) 270 if (type->has_broadcast_disable)
246 kszphy_broadcast_disable(phydev); 271 kszphy_broadcast_disable(phydev);
247 272
273 if (type->has_nand_tree_disable)
274 kszphy_nand_tree_disable(phydev);
275
248 if (priv->rmii_ref_clk_sel) { 276 if (priv->rmii_ref_clk_sel) {
249 ret = kszphy_rmii_clk_sel(phydev, priv->rmii_ref_clk_sel_val); 277 ret = kszphy_rmii_clk_sel(phydev, priv->rmii_ref_clk_sel_val);
250 if (ret) { 278 if (ret) {
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index 6b8efcabb816..9cdfb3fe9c15 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -914,7 +914,7 @@ static void packetizeRx(struct hso_net *odev, unsigned char *ip_pkt,
914 /* We got no receive buffer. */ 914 /* We got no receive buffer. */
915 D1("could not allocate memory"); 915 D1("could not allocate memory");
916 odev->rx_parse_state = WAIT_SYNC; 916 odev->rx_parse_state = WAIT_SYNC;
917 return; 917 continue;
918 } 918 }
919 919
920 /* Copy what we got so far. make room for iphdr 920 /* Copy what we got so far. make room for iphdr
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 5980ac6c48dd..438fc6bcaef1 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -40,6 +40,7 @@
40#define PLA_RXFIFO_CTRL0 0xc0a0 40#define PLA_RXFIFO_CTRL0 0xc0a0
41#define PLA_RXFIFO_CTRL1 0xc0a4 41#define PLA_RXFIFO_CTRL1 0xc0a4
42#define PLA_RXFIFO_CTRL2 0xc0a8 42#define PLA_RXFIFO_CTRL2 0xc0a8
43#define PLA_DMY_REG0 0xc0b0
43#define PLA_FMC 0xc0b4 44#define PLA_FMC 0xc0b4
44#define PLA_CFG_WOL 0xc0b6 45#define PLA_CFG_WOL 0xc0b6
45#define PLA_TEREDO_CFG 0xc0bc 46#define PLA_TEREDO_CFG 0xc0bc
@@ -90,8 +91,14 @@
90#define PLA_BP_7 0xfc36 91#define PLA_BP_7 0xfc36
91#define PLA_BP_EN 0xfc38 92#define PLA_BP_EN 0xfc38
92 93
94#define USB_USB2PHY 0xb41e
95#define USB_SSPHYLINK2 0xb428
93#define USB_U2P3_CTRL 0xb460 96#define USB_U2P3_CTRL 0xb460
97#define USB_CSR_DUMMY1 0xb464
98#define USB_CSR_DUMMY2 0xb466
94#define USB_DEV_STAT 0xb808 99#define USB_DEV_STAT 0xb808
100#define USB_CONNECT_TIMER 0xcbf8
101#define USB_BURST_SIZE 0xcfc0
95#define USB_USB_CTRL 0xd406 102#define USB_USB_CTRL 0xd406
96#define USB_PHY_CTRL 0xd408 103#define USB_PHY_CTRL 0xd408
97#define USB_TX_AGG 0xd40a 104#define USB_TX_AGG 0xd40a
@@ -170,6 +177,9 @@
170#define TXFIFO_THR_NORMAL 0x00400008 177#define TXFIFO_THR_NORMAL 0x00400008
171#define TXFIFO_THR_NORMAL2 0x01000008 178#define TXFIFO_THR_NORMAL2 0x01000008
172 179
180/* PLA_DMY_REG0 */
181#define ECM_ALDPS 0x0002
182
173/* PLA_FMC */ 183/* PLA_FMC */
174#define FMC_FCR_MCU_EN 0x0001 184#define FMC_FCR_MCU_EN 0x0001
175 185
@@ -289,6 +299,20 @@
289/* PLA_BOOT_CTRL */ 299/* PLA_BOOT_CTRL */
290#define AUTOLOAD_DONE 0x0002 300#define AUTOLOAD_DONE 0x0002
291 301
302/* USB_USB2PHY */
303#define USB2PHY_SUSPEND 0x0001
304#define USB2PHY_L1 0x0002
305
306/* USB_SSPHYLINK2 */
307#define pwd_dn_scale_mask 0x3ffe
308#define pwd_dn_scale(x) ((x) << 1)
309
310/* USB_CSR_DUMMY1 */
311#define DYNAMIC_BURST 0x0001
312
313/* USB_CSR_DUMMY2 */
314#define EP4_FULL_FC 0x0001
315
292/* USB_DEV_STAT */ 316/* USB_DEV_STAT */
293#define STAT_SPEED_MASK 0x0006 317#define STAT_SPEED_MASK 0x0006
294#define STAT_SPEED_HIGH 0x0000 318#define STAT_SPEED_HIGH 0x0000
@@ -334,9 +358,13 @@
334#define TIMER11_EN 0x0001 358#define TIMER11_EN 0x0001
335 359
336/* USB_LPM_CTRL */ 360/* USB_LPM_CTRL */
361/* bit 4 ~ 5: fifo empty boundary */
362#define FIFO_EMPTY_1FB 0x30 /* 0x1fb * 64 = 32448 bytes */
363/* bit 2 ~ 3: LMP timer */
337#define LPM_TIMER_MASK 0x0c 364#define LPM_TIMER_MASK 0x0c
338#define LPM_TIMER_500MS 0x04 /* 500 ms */ 365#define LPM_TIMER_500MS 0x04 /* 500 ms */
339#define LPM_TIMER_500US 0x0c /* 500 us */ 366#define LPM_TIMER_500US 0x0c /* 500 us */
367#define ROK_EXIT_LPM 0x02
340 368
341/* USB_AFE_CTRL2 */ 369/* USB_AFE_CTRL2 */
342#define SEN_VAL_MASK 0xf800 370#define SEN_VAL_MASK 0xf800
@@ -3230,6 +3258,32 @@ static void r8153_init(struct r8152 *tp)
3230 3258
3231 r8153_u2p3en(tp, false); 3259 r8153_u2p3en(tp, false);
3232 3260
3261 if (tp->version == RTL_VER_04) {
3262 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_SSPHYLINK2);
3263 ocp_data &= ~pwd_dn_scale_mask;
3264 ocp_data |= pwd_dn_scale(96);
3265 ocp_write_word(tp, MCU_TYPE_USB, USB_SSPHYLINK2, ocp_data);
3266
3267 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_USB2PHY);
3268 ocp_data |= USB2PHY_L1 | USB2PHY_SUSPEND;
3269 ocp_write_byte(tp, MCU_TYPE_USB, USB_USB2PHY, ocp_data);
3270 } else if (tp->version == RTL_VER_05) {
3271 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_DMY_REG0);
3272 ocp_data &= ~ECM_ALDPS;
3273 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_DMY_REG0, ocp_data);
3274
3275 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_CSR_DUMMY1);
3276 if (ocp_read_word(tp, MCU_TYPE_USB, USB_BURST_SIZE) == 0)
3277 ocp_data &= ~DYNAMIC_BURST;
3278 else
3279 ocp_data |= DYNAMIC_BURST;
3280 ocp_write_byte(tp, MCU_TYPE_USB, USB_CSR_DUMMY1, ocp_data);
3281 }
3282
3283 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_CSR_DUMMY2);
3284 ocp_data |= EP4_FULL_FC;
3285 ocp_write_byte(tp, MCU_TYPE_USB, USB_CSR_DUMMY2, ocp_data);
3286
3233 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_WDT11_CTRL); 3287 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_WDT11_CTRL);
3234 ocp_data &= ~TIMER11_EN; 3288 ocp_data &= ~TIMER11_EN;
3235 ocp_write_word(tp, MCU_TYPE_USB, USB_WDT11_CTRL, ocp_data); 3289 ocp_write_word(tp, MCU_TYPE_USB, USB_WDT11_CTRL, ocp_data);
@@ -3238,8 +3292,7 @@ static void r8153_init(struct r8152 *tp)
3238 ocp_data &= ~LED_MODE_MASK; 3292 ocp_data &= ~LED_MODE_MASK;
3239 ocp_write_word(tp, MCU_TYPE_PLA, PLA_LED_FEATURE, ocp_data); 3293 ocp_write_word(tp, MCU_TYPE_PLA, PLA_LED_FEATURE, ocp_data);
3240 3294
3241 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_LPM_CTRL); 3295 ocp_data = FIFO_EMPTY_1FB | ROK_EXIT_LPM;
3242 ocp_data &= ~LPM_TIMER_MASK;
3243 if (tp->version == RTL_VER_04 && tp->udev->speed != USB_SPEED_SUPER) 3296 if (tp->version == RTL_VER_04 && tp->udev->speed != USB_SPEED_SUPER)
3244 ocp_data |= LPM_TIMER_500MS; 3297 ocp_data |= LPM_TIMER_500MS;
3245 else 3298 else
@@ -3251,6 +3304,8 @@ static void r8153_init(struct r8152 *tp)
3251 ocp_data |= SEN_VAL_NORMAL | SEL_RXIDLE; 3304 ocp_data |= SEN_VAL_NORMAL | SEL_RXIDLE;
3252 ocp_write_word(tp, MCU_TYPE_USB, USB_AFE_CTRL2, ocp_data); 3305 ocp_write_word(tp, MCU_TYPE_USB, USB_AFE_CTRL2, ocp_data);
3253 3306
3307 ocp_write_word(tp, MCU_TYPE_USB, USB_CONNECT_TIMER, 0x0001);
3308
3254 r8153_power_cut_en(tp, false); 3309 r8153_power_cut_en(tp, false);
3255 r8153_u1u2en(tp, true); 3310 r8153_u1u2en(tp, true);
3256 3311
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 0e57e862c399..1e0a775ea882 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -555,12 +555,13 @@ static int vxlan_fdb_append(struct vxlan_fdb *f,
555static struct vxlanhdr *vxlan_gro_remcsum(struct sk_buff *skb, 555static struct vxlanhdr *vxlan_gro_remcsum(struct sk_buff *skb,
556 unsigned int off, 556 unsigned int off,
557 struct vxlanhdr *vh, size_t hdrlen, 557 struct vxlanhdr *vh, size_t hdrlen,
558 u32 data) 558 u32 data, struct gro_remcsum *grc,
559 bool nopartial)
559{ 560{
560 size_t start, offset, plen; 561 size_t start, offset, plen;
561 562
562 if (skb->remcsum_offload) 563 if (skb->remcsum_offload)
563 return vh; 564 return NULL;
564 565
565 if (!NAPI_GRO_CB(skb)->csum_valid) 566 if (!NAPI_GRO_CB(skb)->csum_valid)
566 return NULL; 567 return NULL;
@@ -579,7 +580,8 @@ static struct vxlanhdr *vxlan_gro_remcsum(struct sk_buff *skb,
579 return NULL; 580 return NULL;
580 } 581 }
581 582
582 skb_gro_remcsum_process(skb, (void *)vh + hdrlen, start, offset); 583 skb_gro_remcsum_process(skb, (void *)vh + hdrlen,
584 start, offset, grc, nopartial);
583 585
584 skb->remcsum_offload = 1; 586 skb->remcsum_offload = 1;
585 587
@@ -597,6 +599,9 @@ static struct sk_buff **vxlan_gro_receive(struct sk_buff **head,
597 struct vxlan_sock *vs = container_of(uoff, struct vxlan_sock, 599 struct vxlan_sock *vs = container_of(uoff, struct vxlan_sock,
598 udp_offloads); 600 udp_offloads);
599 u32 flags; 601 u32 flags;
602 struct gro_remcsum grc;
603
604 skb_gro_remcsum_init(&grc);
600 605
601 off_vx = skb_gro_offset(skb); 606 off_vx = skb_gro_offset(skb);
602 hlen = off_vx + sizeof(*vh); 607 hlen = off_vx + sizeof(*vh);
@@ -614,7 +619,9 @@ static struct sk_buff **vxlan_gro_receive(struct sk_buff **head,
614 619
615 if ((flags & VXLAN_HF_RCO) && (vs->flags & VXLAN_F_REMCSUM_RX)) { 620 if ((flags & VXLAN_HF_RCO) && (vs->flags & VXLAN_F_REMCSUM_RX)) {
616 vh = vxlan_gro_remcsum(skb, off_vx, vh, sizeof(struct vxlanhdr), 621 vh = vxlan_gro_remcsum(skb, off_vx, vh, sizeof(struct vxlanhdr),
617 ntohl(vh->vx_vni)); 622 ntohl(vh->vx_vni), &grc,
623 !!(vs->flags &
624 VXLAN_F_REMCSUM_NOPARTIAL));
618 625
619 if (!vh) 626 if (!vh)
620 goto out; 627 goto out;
@@ -637,6 +644,7 @@ static struct sk_buff **vxlan_gro_receive(struct sk_buff **head,
637 pp = eth_gro_receive(head, skb); 644 pp = eth_gro_receive(head, skb);
638 645
639out: 646out:
647 skb_gro_remcsum_cleanup(skb, &grc);
640 NAPI_GRO_CB(skb)->flush |= flush; 648 NAPI_GRO_CB(skb)->flush |= flush;
641 649
642 return pp; 650 return pp;
@@ -1150,16 +1158,10 @@ static void vxlan_igmp_leave(struct work_struct *work)
1150} 1158}
1151 1159
1152static struct vxlanhdr *vxlan_remcsum(struct sk_buff *skb, struct vxlanhdr *vh, 1160static struct vxlanhdr *vxlan_remcsum(struct sk_buff *skb, struct vxlanhdr *vh,
1153 size_t hdrlen, u32 data) 1161 size_t hdrlen, u32 data, bool nopartial)
1154{ 1162{
1155 size_t start, offset, plen; 1163 size_t start, offset, plen;
1156 1164
1157 if (skb->remcsum_offload) {
1158 /* Already processed in GRO path */
1159 skb->remcsum_offload = 0;
1160 return vh;
1161 }
1162
1163 start = (data & VXLAN_RCO_MASK) << VXLAN_RCO_SHIFT; 1165 start = (data & VXLAN_RCO_MASK) << VXLAN_RCO_SHIFT;
1164 offset = start + ((data & VXLAN_RCO_UDP) ? 1166 offset = start + ((data & VXLAN_RCO_UDP) ?
1165 offsetof(struct udphdr, check) : 1167 offsetof(struct udphdr, check) :
@@ -1172,7 +1174,8 @@ static struct vxlanhdr *vxlan_remcsum(struct sk_buff *skb, struct vxlanhdr *vh,
1172 1174
1173 vh = (struct vxlanhdr *)(udp_hdr(skb) + 1); 1175 vh = (struct vxlanhdr *)(udp_hdr(skb) + 1);
1174 1176
1175 skb_remcsum_process(skb, (void *)vh + hdrlen, start, offset); 1177 skb_remcsum_process(skb, (void *)vh + hdrlen, start, offset,
1178 nopartial);
1176 1179
1177 return vh; 1180 return vh;
1178} 1181}
@@ -1209,7 +1212,8 @@ static int vxlan_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
1209 goto drop; 1212 goto drop;
1210 1213
1211 if ((flags & VXLAN_HF_RCO) && (vs->flags & VXLAN_F_REMCSUM_RX)) { 1214 if ((flags & VXLAN_HF_RCO) && (vs->flags & VXLAN_F_REMCSUM_RX)) {
1212 vxh = vxlan_remcsum(skb, vxh, sizeof(struct vxlanhdr), vni); 1215 vxh = vxlan_remcsum(skb, vxh, sizeof(struct vxlanhdr), vni,
1216 !!(vs->flags & VXLAN_F_REMCSUM_NOPARTIAL));
1213 if (!vxh) 1217 if (!vxh)
1214 goto drop; 1218 goto drop;
1215 1219
@@ -2438,6 +2442,7 @@ static const struct nla_policy vxlan_policy[IFLA_VXLAN_MAX + 1] = {
2438 [IFLA_VXLAN_REMCSUM_TX] = { .type = NLA_U8 }, 2442 [IFLA_VXLAN_REMCSUM_TX] = { .type = NLA_U8 },
2439 [IFLA_VXLAN_REMCSUM_RX] = { .type = NLA_U8 }, 2443 [IFLA_VXLAN_REMCSUM_RX] = { .type = NLA_U8 },
2440 [IFLA_VXLAN_GBP] = { .type = NLA_FLAG, }, 2444 [IFLA_VXLAN_GBP] = { .type = NLA_FLAG, },
2445 [IFLA_VXLAN_REMCSUM_NOPARTIAL] = { .type = NLA_FLAG },
2441}; 2446};
2442 2447
2443static int vxlan_validate(struct nlattr *tb[], struct nlattr *data[]) 2448static int vxlan_validate(struct nlattr *tb[], struct nlattr *data[])
@@ -2761,6 +2766,9 @@ static int vxlan_newlink(struct net *src_net, struct net_device *dev,
2761 if (data[IFLA_VXLAN_GBP]) 2766 if (data[IFLA_VXLAN_GBP])
2762 vxlan->flags |= VXLAN_F_GBP; 2767 vxlan->flags |= VXLAN_F_GBP;
2763 2768
2769 if (data[IFLA_VXLAN_REMCSUM_NOPARTIAL])
2770 vxlan->flags |= VXLAN_F_REMCSUM_NOPARTIAL;
2771
2764 if (vxlan_find_vni(src_net, vni, use_ipv6 ? AF_INET6 : AF_INET, 2772 if (vxlan_find_vni(src_net, vni, use_ipv6 ? AF_INET6 : AF_INET,
2765 vxlan->dst_port, vxlan->flags)) { 2773 vxlan->dst_port, vxlan->flags)) {
2766 pr_info("duplicate VNI %u\n", vni); 2774 pr_info("duplicate VNI %u\n", vni);
@@ -2910,6 +2918,10 @@ static int vxlan_fill_info(struct sk_buff *skb, const struct net_device *dev)
2910 nla_put_flag(skb, IFLA_VXLAN_GBP)) 2918 nla_put_flag(skb, IFLA_VXLAN_GBP))
2911 goto nla_put_failure; 2919 goto nla_put_failure;
2912 2920
2921 if (vxlan->flags & VXLAN_F_REMCSUM_NOPARTIAL &&
2922 nla_put_flag(skb, IFLA_VXLAN_REMCSUM_NOPARTIAL))
2923 goto nla_put_failure;
2924
2913 return 0; 2925 return 0;
2914 2926
2915nla_put_failure: 2927nla_put_failure:
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 2c9088633ec6..ccbdb05b28cd 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -127,7 +127,7 @@ static const struct bcma_device_id b43_bcma_tbl[] = {
127 BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x1E, BCMA_ANY_CLASS), 127 BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x1E, BCMA_ANY_CLASS),
128 BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x28, BCMA_ANY_CLASS), 128 BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x28, BCMA_ANY_CLASS),
129 BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x2A, BCMA_ANY_CLASS), 129 BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x2A, BCMA_ANY_CLASS),
130 BCMA_CORETABLE_END 130 {},
131}; 131};
132MODULE_DEVICE_TABLE(bcma, b43_bcma_tbl); 132MODULE_DEVICE_TABLE(bcma, b43_bcma_tbl);
133#endif 133#endif
@@ -144,7 +144,7 @@ static const struct ssb_device_id b43_ssb_tbl[] = {
144 SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 13), 144 SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 13),
145 SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 15), 145 SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 15),
146 SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 16), 146 SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 16),
147 SSB_DEVTABLE_END 147 {},
148}; 148};
149MODULE_DEVICE_TABLE(ssb, b43_ssb_tbl); 149MODULE_DEVICE_TABLE(ssb, b43_ssb_tbl);
150#endif 150#endif
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 1aec2146a2bf..4e58c0069830 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -86,7 +86,7 @@ MODULE_PARM_DESC(fwpostfix, "Postfix for the firmware files to load.");
86static const struct ssb_device_id b43legacy_ssb_tbl[] = { 86static const struct ssb_device_id b43legacy_ssb_tbl[] = {
87 SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 2), 87 SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 2),
88 SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 4), 88 SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 4),
89 SSB_DEVTABLE_END 89 {},
90}; 90};
91MODULE_DEVICE_TABLE(ssb, b43legacy_ssb_tbl); 91MODULE_DEVICE_TABLE(ssb, b43legacy_ssb_tbl);
92 92
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
index f95b52442281..48135063347e 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
@@ -99,7 +99,7 @@ static struct bcma_device_id brcms_coreid_table[] = {
99 BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 17, BCMA_ANY_CLASS), 99 BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 17, BCMA_ANY_CLASS),
100 BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 23, BCMA_ANY_CLASS), 100 BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 23, BCMA_ANY_CLASS),
101 BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 24, BCMA_ANY_CLASS), 101 BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 24, BCMA_ANY_CLASS),
102 BCMA_CORETABLE_END 102 {},
103}; 103};
104MODULE_DEVICE_TABLE(bcma, brcms_coreid_table); 104MODULE_DEVICE_TABLE(bcma, brcms_coreid_table);
105 105
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index ec456f0d972e..a62170ea0481 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -822,11 +822,8 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
822 822
823 /* get a new skb - if fail, old one will be reused */ 823 /* get a new skb - if fail, old one will be reused */
824 new_skb = dev_alloc_skb(rtlpci->rxbuffersize); 824 new_skb = dev_alloc_skb(rtlpci->rxbuffersize);
825 if (unlikely(!new_skb)) { 825 if (unlikely(!new_skb))
826 pr_err("Allocation of new skb failed in %s\n",
827 __func__);
828 goto no_new; 826 goto no_new;
829 }
830 if (rtlpriv->use_new_trx_flow) { 827 if (rtlpriv->use_new_trx_flow) {
831 buffer_desc = 828 buffer_desc =
832 &rtlpci->rx_ring[rxring_idx].buffer_desc 829 &rtlpci->rx_ring[rxring_idx].buffer_desc