diff options
Diffstat (limited to 'drivers/net/ixgb')
-rw-r--r-- | drivers/net/ixgb/ixgb_ee.c | 32 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_ethtool.c | 2 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_hw.c | 14 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 12 |
4 files changed, 31 insertions, 29 deletions
diff --git a/drivers/net/ixgb/ixgb_ee.c b/drivers/net/ixgb/ixgb_ee.c index 813993f9c65..c982ab9f900 100644 --- a/drivers/net/ixgb/ixgb_ee.c +++ b/drivers/net/ixgb/ixgb_ee.c @@ -296,12 +296,12 @@ ixgb_wait_eeprom_command(struct ixgb_hw *hw) eecd_reg = IXGB_READ_REG(hw, EECD); if (eecd_reg & IXGB_EECD_DO) - return (true); + return true; udelay(50); } ASSERT(0); - return (false); + return false; } /****************************************************************************** @@ -327,9 +327,9 @@ ixgb_validate_eeprom_checksum(struct ixgb_hw *hw) checksum += ixgb_read_eeprom(hw, i); if (checksum == (u16) EEPROM_SUM) - return (true); + return true; else - return (false); + return false; } /****************************************************************************** @@ -439,7 +439,7 @@ ixgb_read_eeprom(struct ixgb_hw *hw, /* End this read operation */ ixgb_standby_eeprom(hw); - return (data); + return data; } /****************************************************************************** @@ -476,16 +476,16 @@ ixgb_get_eeprom_data(struct ixgb_hw *hw) /* clear the init_ctrl_reg_1 to signify that the cache is * invalidated */ ee_map->init_ctrl_reg_1 = cpu_to_le16(EEPROM_ICW1_SIGNATURE_CLEAR); - return (false); + return false; } if ((ee_map->init_ctrl_reg_1 & cpu_to_le16(EEPROM_ICW1_SIGNATURE_MASK)) != cpu_to_le16(EEPROM_ICW1_SIGNATURE_VALID)) { pr_debug("Signature invalid\n"); - return(false); + return false; } - return(true); + return true; } /****************************************************************************** @@ -505,7 +505,7 @@ ixgb_check_and_get_eeprom_data (struct ixgb_hw* hw) if ((ee_map->init_ctrl_reg_1 & cpu_to_le16(EEPROM_ICW1_SIGNATURE_MASK)) == cpu_to_le16(EEPROM_ICW1_SIGNATURE_VALID)) { - return (true); + return true; } else { return ixgb_get_eeprom_data(hw); } @@ -526,10 +526,10 @@ ixgb_get_eeprom_word(struct ixgb_hw *hw, u16 index) if ((index < IXGB_EEPROM_SIZE) && (ixgb_check_and_get_eeprom_data(hw) == true)) { - return(hw->eeprom[index]); + return hw->eeprom[index]; } - return(0); + return 0; } /****************************************************************************** @@ -570,10 +570,10 @@ u32 ixgb_get_ee_pba_number(struct ixgb_hw *hw) { if (ixgb_check_and_get_eeprom_data(hw) == true) - return (le16_to_cpu(hw->eeprom[EEPROM_PBA_1_2_REG]) - | (le16_to_cpu(hw->eeprom[EEPROM_PBA_3_4_REG])<<16)); + return le16_to_cpu(hw->eeprom[EEPROM_PBA_1_2_REG]) + | (le16_to_cpu(hw->eeprom[EEPROM_PBA_3_4_REG])<<16); - return(0); + return 0; } @@ -591,8 +591,8 @@ ixgb_get_ee_device_id(struct ixgb_hw *hw) struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; if (ixgb_check_and_get_eeprom_data(hw) == true) - return (le16_to_cpu(ee_map->device_id)); + return le16_to_cpu(ee_map->device_id); - return (0); + return 0; } diff --git a/drivers/net/ixgb/ixgb_ethtool.c b/drivers/net/ixgb/ixgb_ethtool.c index a4ed96caae6..43994c19999 100644 --- a/drivers/net/ixgb/ixgb_ethtool.c +++ b/drivers/net/ixgb/ixgb_ethtool.c @@ -410,7 +410,7 @@ static int ixgb_get_eeprom_len(struct net_device *netdev) { /* return size in bytes */ - return (IXGB_EEPROM_SIZE << 1); + return IXGB_EEPROM_SIZE << 1; } static int diff --git a/drivers/net/ixgb/ixgb_hw.c b/drivers/net/ixgb/ixgb_hw.c index 397acabccab..6cb2e42ff4c 100644 --- a/drivers/net/ixgb/ixgb_hw.c +++ b/drivers/net/ixgb/ixgb_hw.c @@ -167,7 +167,7 @@ ixgb_adapter_stop(struct ixgb_hw *hw) /* Clear any pending interrupt events. */ icr_reg = IXGB_READ_REG(hw, ICR); - return (ctrl_reg & IXGB_CTRL0_RST); + return ctrl_reg & IXGB_CTRL0_RST; } @@ -209,7 +209,7 @@ ixgb_identify_xpak_vendor(struct ixgb_hw *hw) xpak_vendor = ixgb_xpak_vendor_infineon; } - return (xpak_vendor); + return xpak_vendor; } /****************************************************************************** @@ -273,7 +273,7 @@ ixgb_identify_phy(struct ixgb_hw *hw) if (hw->subsystem_vendor_id == SUN_SUBVENDOR_ID) phy_type = ixgb_phy_type_bcm; - return (phy_type); + return phy_type; } /****************************************************************************** @@ -366,7 +366,7 @@ ixgb_init_hw(struct ixgb_hw *hw) /* 82597EX errata: Call check-for-link in case lane deskew is locked */ ixgb_check_for_link(hw); - return (status); + return status; } /****************************************************************************** @@ -531,7 +531,7 @@ ixgb_hash_mc_addr(struct ixgb_hw *hw, } hash_value &= 0xFFF; - return (hash_value); + return hash_value; } /****************************************************************************** @@ -715,7 +715,7 @@ ixgb_setup_fc(struct ixgb_hw *hw) } IXGB_WRITE_REG(hw, FCRTH, hw->fc.high_water); } - return (status); + return status; } /****************************************************************************** @@ -1140,7 +1140,7 @@ mac_addr_valid(u8 *mac_addr) pr_debug("MAC address is all zeros\n"); is_valid = false; } - return (is_valid); + return is_valid; } /****************************************************************************** diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index 45fc89b9ba6..666207a9c03 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c @@ -446,8 +446,10 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) NETIF_F_HW_VLAN_FILTER; netdev->features |= NETIF_F_TSO; - if (pci_using_dac) + if (pci_using_dac) { netdev->features |= NETIF_F_HIGHDMA; + netdev->vlan_features |= NETIF_F_HIGHDMA; + } /* make sure the EEPROM is good */ @@ -470,7 +472,7 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) adapter->part_num = ixgb_get_ee_pba_number(&adapter->hw); init_timer(&adapter->watchdog_timer); - adapter->watchdog_timer.function = &ixgb_watchdog; + adapter->watchdog_timer.function = ixgb_watchdog; adapter->watchdog_timer.data = (unsigned long)adapter; INIT_WORK(&adapter->tx_timeout_task, ixgb_tx_timeout_task); @@ -1905,7 +1907,7 @@ ixgb_rx_checksum(struct ixgb_adapter *adapter, */ if ((rx_desc->status & IXGB_RX_DESC_STATUS_IXSM) || (!(rx_desc->status & IXGB_RX_DESC_STATUS_TCPCS))) { - skb->ip_summed = CHECKSUM_NONE; + skb_checksum_none_assert(skb); return; } @@ -1913,7 +1915,7 @@ ixgb_rx_checksum(struct ixgb_adapter *adapter, /* now look at the TCP checksum error bit */ if (rx_desc->errors & IXGB_RX_DESC_ERRORS_TCPE) { /* let the stack verify checksum errors */ - skb->ip_summed = CHECKSUM_NONE; + skb_checksum_none_assert(skb); adapter->hw_csum_rx_error++; } else { /* TCP checksum is good */ @@ -2221,7 +2223,7 @@ ixgb_restore_vlan(struct ixgb_adapter *adapter) if (adapter->vlgrp) { u16 vid; - for (vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) { + for (vid = 0; vid < VLAN_N_VID; vid++) { if (!vlan_group_get_device(adapter->vlgrp, vid)) continue; ixgb_vlan_rx_add_vid(adapter->netdev, vid); |