aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vmxnet3/vmxnet3_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/vmxnet3/vmxnet3_drv.c')
-rw-r--r--drivers/net/vmxnet3/vmxnet3_drv.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 3f60e0e3097b..e3658e10db39 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -1563,8 +1563,7 @@ vmxnet3_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp)
1563 adapter->vlan_grp = grp; 1563 adapter->vlan_grp = grp;
1564 1564
1565 /* update FEATURES to device */ 1565 /* update FEATURES to device */
1566 set_flag_le64(&devRead->misc.uptFeatures, 1566 devRead->misc.uptFeatures |= UPT1_F_RXVLAN;
1567 UPT1_F_RXVLAN);
1568 VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, 1567 VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
1569 VMXNET3_CMD_UPDATE_FEATURE); 1568 VMXNET3_CMD_UPDATE_FEATURE);
1570 /* 1569 /*
@@ -1587,7 +1586,7 @@ vmxnet3_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp)
1587 struct Vmxnet3_DSDevRead *devRead = &shared->devRead; 1586 struct Vmxnet3_DSDevRead *devRead = &shared->devRead;
1588 adapter->vlan_grp = NULL; 1587 adapter->vlan_grp = NULL;
1589 1588
1590 if (le64_to_cpu(devRead->misc.uptFeatures) & UPT1_F_RXVLAN) { 1589 if (devRead->misc.uptFeatures & UPT1_F_RXVLAN) {
1591 int i; 1590 int i;
1592 1591
1593 for (i = 0; i < VMXNET3_VFT_SIZE; i++) { 1592 for (i = 0; i < VMXNET3_VFT_SIZE; i++) {
@@ -1600,8 +1599,7 @@ vmxnet3_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp)
1600 VMXNET3_CMD_UPDATE_VLAN_FILTERS); 1599 VMXNET3_CMD_UPDATE_VLAN_FILTERS);
1601 1600
1602 /* update FEATURES to device */ 1601 /* update FEATURES to device */
1603 reset_flag_le64(&devRead->misc.uptFeatures, 1602 devRead->misc.uptFeatures &= ~UPT1_F_RXVLAN;
1604 UPT1_F_RXVLAN);
1605 VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, 1603 VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
1606 VMXNET3_CMD_UPDATE_FEATURE); 1604 VMXNET3_CMD_UPDATE_FEATURE);
1607 } 1605 }
@@ -1762,15 +1760,15 @@ vmxnet3_setup_driver_shared(struct vmxnet3_adapter *adapter)
1762 1760
1763 /* set up feature flags */ 1761 /* set up feature flags */
1764 if (adapter->rxcsum) 1762 if (adapter->rxcsum)
1765 set_flag_le64(&devRead->misc.uptFeatures, UPT1_F_RXCSUM); 1763 devRead->misc.uptFeatures |= UPT1_F_RXCSUM;
1766 1764
1767 if (adapter->lro) { 1765 if (adapter->lro) {
1768 set_flag_le64(&devRead->misc.uptFeatures, UPT1_F_LRO); 1766 devRead->misc.uptFeatures |= UPT1_F_LRO;
1769 devRead->misc.maxNumRxSG = cpu_to_le16(1 + MAX_SKB_FRAGS); 1767 devRead->misc.maxNumRxSG = cpu_to_le16(1 + MAX_SKB_FRAGS);
1770 } 1768 }
1771 if ((adapter->netdev->features & NETIF_F_HW_VLAN_RX) && 1769 if ((adapter->netdev->features & NETIF_F_HW_VLAN_RX) &&
1772 adapter->vlan_grp) { 1770 adapter->vlan_grp) {
1773 set_flag_le64(&devRead->misc.uptFeatures, UPT1_F_RXVLAN); 1771 devRead->misc.uptFeatures |= UPT1_F_RXVLAN;
1774 } 1772 }
1775 1773
1776 devRead->misc.mtu = cpu_to_le32(adapter->netdev->mtu); 1774 devRead->misc.mtu = cpu_to_le32(adapter->netdev->mtu);
@@ -2577,7 +2575,7 @@ vmxnet3_suspend(struct device *device)
2577 memcpy(pmConf->filters[i].pattern, netdev->dev_addr, ETH_ALEN); 2575 memcpy(pmConf->filters[i].pattern, netdev->dev_addr, ETH_ALEN);
2578 pmConf->filters[i].mask[0] = 0x3F; /* LSB ETH_ALEN bits */ 2576 pmConf->filters[i].mask[0] = 0x3F; /* LSB ETH_ALEN bits */
2579 2577
2580 set_flag_le16(&pmConf->wakeUpEvents, VMXNET3_PM_WAKEUP_FILTER); 2578 pmConf->wakeUpEvents |= VMXNET3_PM_WAKEUP_FILTER;
2581 i++; 2579 i++;
2582 } 2580 }
2583 2581
@@ -2619,13 +2617,13 @@ vmxnet3_suspend(struct device *device)
2619 pmConf->filters[i].mask[5] = 0x03; /* IPv4 TIP */ 2617 pmConf->filters[i].mask[5] = 0x03; /* IPv4 TIP */
2620 in_dev_put(in_dev); 2618 in_dev_put(in_dev);
2621 2619
2622 set_flag_le16(&pmConf->wakeUpEvents, VMXNET3_PM_WAKEUP_FILTER); 2620 pmConf->wakeUpEvents |= VMXNET3_PM_WAKEUP_FILTER;
2623 i++; 2621 i++;
2624 } 2622 }
2625 2623
2626skip_arp: 2624skip_arp:
2627 if (adapter->wol & WAKE_MAGIC) 2625 if (adapter->wol & WAKE_MAGIC)
2628 set_flag_le16(&pmConf->wakeUpEvents, VMXNET3_PM_WAKEUP_MAGIC); 2626 pmConf->wakeUpEvents |= VMXNET3_PM_WAKEUP_MAGIC;
2629 2627
2630 pmConf->numFilters = i; 2628 pmConf->numFilters = i;
2631 2629
@@ -2667,7 +2665,7 @@ vmxnet3_resume(struct device *device)
2667 adapter->shared->devRead.pmConfDesc.confVer = cpu_to_le32(1); 2665 adapter->shared->devRead.pmConfDesc.confVer = cpu_to_le32(1);
2668 adapter->shared->devRead.pmConfDesc.confLen = cpu_to_le32(sizeof( 2666 adapter->shared->devRead.pmConfDesc.confLen = cpu_to_le32(sizeof(
2669 *pmConf)); 2667 *pmConf));
2670 adapter->shared->devRead.pmConfDesc.confPA = cpu_to_le32(virt_to_phys( 2668 adapter->shared->devRead.pmConfDesc.confPA = cpu_to_le64(virt_to_phys(
2671 pmConf)); 2669 pmConf));
2672 2670
2673 netif_device_attach(netdev); 2671 netif_device_attach(netdev);