]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
Merge tag 'nfc-next-4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo...
[mirror_ubuntu-hirsute-kernel.git] / drivers / net / ethernet / intel / ixgbe / ixgbe_82599.c
index fa8d4f40ac2af1835605ff5fc3748ccd89311b19..47afed74a54d9791d64f1fd7d919424d207fd824 100644 (file)
@@ -1,7 +1,7 @@
 /*******************************************************************************
 
   Intel 10 Gigabit PCI Express Linux driver
-  Copyright(c) 1999 - 2015 Intel Corporation.
+  Copyright(c) 1999 - 2016 Intel Corporation.
 
   This program is free software; you can redistribute it and/or modify it
   under the terms and conditions of the GNU General Public License,
@@ -1296,17 +1296,17 @@ s32 ixgbe_init_fdir_perfect_82599(struct ixgbe_hw *hw, u32 fdirctrl)
 #define IXGBE_COMPUTE_SIG_HASH_ITERATION(_n) \
 do { \
        u32 n = (_n); \
-       if (IXGBE_ATR_COMMON_HASH_KEY & (0x01 << n)) \
+       if (IXGBE_ATR_COMMON_HASH_KEY & BIT(n)) \
                common_hash ^= lo_hash_dword >> n; \
-       else if (IXGBE_ATR_BUCKET_HASH_KEY & (0x01 << n)) \
+       else if (IXGBE_ATR_BUCKET_HASH_KEY & BIT(n)) \
                bucket_hash ^= lo_hash_dword >> n; \
-       else if (IXGBE_ATR_SIGNATURE_HASH_KEY & (0x01 << n)) \
+       else if (IXGBE_ATR_SIGNATURE_HASH_KEY & BIT(n)) \
                sig_hash ^= lo_hash_dword << (16 - n); \
-       if (IXGBE_ATR_COMMON_HASH_KEY & (0x01 << (n + 16))) \
+       if (IXGBE_ATR_COMMON_HASH_KEY & BIT(n + 16)) \
                common_hash ^= hi_hash_dword >> n; \
-       else if (IXGBE_ATR_BUCKET_HASH_KEY & (0x01 << (n + 16))) \
+       else if (IXGBE_ATR_BUCKET_HASH_KEY & BIT(n + 16)) \
                bucket_hash ^= hi_hash_dword >> n; \
-       else if (IXGBE_ATR_SIGNATURE_HASH_KEY & (0x01 << (n + 16))) \
+       else if (IXGBE_ATR_SIGNATURE_HASH_KEY & BIT(n + 16)) \
                sig_hash ^= hi_hash_dword << (16 - n); \
 } while (0)
 
@@ -1440,9 +1440,9 @@ s32 ixgbe_fdir_add_signature_filter_82599(struct ixgbe_hw *hw,
 #define IXGBE_COMPUTE_BKT_HASH_ITERATION(_n) \
 do { \
        u32 n = (_n); \
-       if (IXGBE_ATR_BUCKET_HASH_KEY & (0x01 << n)) \
+       if (IXGBE_ATR_BUCKET_HASH_KEY & BIT(n)) \
                bucket_hash ^= lo_hash_dword >> n; \
-       if (IXGBE_ATR_BUCKET_HASH_KEY & (0x01 << (n + 16))) \
+       if (IXGBE_ATR_BUCKET_HASH_KEY & BIT(n + 16)) \
                bucket_hash ^= hi_hash_dword >> n; \
 } while (0)
 
@@ -1633,6 +1633,7 @@ s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw,
        switch (hw->mac.type) {
        case ixgbe_mac_X550:
        case ixgbe_mac_X550EM_x:
+       case ixgbe_mac_x550em_a:
                IXGBE_WRITE_REG(hw, IXGBE_FDIRSCTPM, ~fdirtcpm);
                break;
        default:
@@ -2181,7 +2182,7 @@ release_i2c_access:
        return status;
 }
 
-static struct ixgbe_mac_operations mac_ops_82599 = {
+static const struct ixgbe_mac_operations mac_ops_82599 = {
        .init_hw                = &ixgbe_init_hw_generic,
        .reset_hw               = &ixgbe_reset_hw_82599,
        .start_hw               = &ixgbe_start_hw_82599,
@@ -2220,6 +2221,7 @@ static struct ixgbe_mac_operations mac_ops_82599 = {
        .clear_vfta             = &ixgbe_clear_vfta_generic,
        .set_vfta               = &ixgbe_set_vfta_generic,
        .fc_enable              = &ixgbe_fc_enable_generic,
+       .setup_fc               = ixgbe_setup_fc_generic,
        .set_fw_drv_ver         = &ixgbe_set_fw_drv_ver_generic,
        .init_uta_tables        = &ixgbe_init_uta_tables_generic,
        .setup_sfp              = &ixgbe_setup_sfp_modules_82599,
@@ -2227,6 +2229,7 @@ static struct ixgbe_mac_operations mac_ops_82599 = {
        .set_vlan_anti_spoofing = &ixgbe_set_vlan_anti_spoofing,
        .acquire_swfw_sync      = &ixgbe_acquire_swfw_sync,
        .release_swfw_sync      = &ixgbe_release_swfw_sync,
+       .init_swfw_sync         = NULL,
        .get_thermal_sensor_data = &ixgbe_get_thermal_sensor_data_generic,
        .init_thermal_sensor_thresh = &ixgbe_init_thermal_sensor_thresh_generic,
        .prot_autoc_read        = &prot_autoc_read_82599,
@@ -2235,7 +2238,7 @@ static struct ixgbe_mac_operations mac_ops_82599 = {
        .disable_rx             = &ixgbe_disable_rx_generic,
 };
 
-static struct ixgbe_eeprom_operations eeprom_ops_82599 = {
+static const struct ixgbe_eeprom_operations eeprom_ops_82599 = {
        .init_params            = &ixgbe_init_eeprom_params_generic,
        .read                   = &ixgbe_read_eeprom_82599,
        .read_buffer            = &ixgbe_read_eeprom_buffer_82599,
@@ -2246,7 +2249,7 @@ static struct ixgbe_eeprom_operations eeprom_ops_82599 = {
        .update_checksum        = &ixgbe_update_eeprom_checksum_generic,
 };
 
-static struct ixgbe_phy_operations phy_ops_82599 = {
+static const struct ixgbe_phy_operations phy_ops_82599 = {
        .identify               = &ixgbe_identify_phy_82599,
        .identify_sfp           = &ixgbe_identify_module_generic,
        .init                   = &ixgbe_init_phy_ops_82599,
@@ -2263,7 +2266,7 @@ static struct ixgbe_phy_operations phy_ops_82599 = {
        .check_overtemp         = &ixgbe_tn_check_overtemp,
 };
 
-struct ixgbe_info ixgbe_82599_info = {
+const struct ixgbe_info ixgbe_82599_info = {
        .mac                    = ixgbe_mac_82599EB,
        .get_invariants         = &ixgbe_get_invariants_82599,
        .mac_ops                = &mac_ops_82599,