diff options
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r-- | drivers/net/ixgbe/ixgbe.h | 9 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_82599.c | 18 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_common.h | 25 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_dcb_82599.c | 2 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_dcb_nl.c | 2 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_ethtool.c | 107 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_fcoe.c | 56 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 425 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_phy.c | 33 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_phy.h | 1 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_sriov.c | 30 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_type.h | 2 |
12 files changed, 397 insertions, 313 deletions
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h index ffae480587ae..9e15eb93860e 100644 --- a/drivers/net/ixgbe/ixgbe.h +++ b/drivers/net/ixgbe/ixgbe.h | |||
@@ -44,11 +44,9 @@ | |||
44 | #include <linux/dca.h> | 44 | #include <linux/dca.h> |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | #define PFX "ixgbe: " | 47 | /* common prefix used by pr_<> macros */ |
48 | #define DPRINTK(nlevel, klevel, fmt, args...) \ | 48 | #undef pr_fmt |
49 | ((void)((NETIF_MSG_##nlevel & adapter->msg_enable) && \ | 49 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
50 | printk(KERN_##klevel PFX "%s: %s: " fmt, adapter->netdev->name, \ | ||
51 | __func__ , ## args))) | ||
52 | 50 | ||
53 | /* TX/RX descriptor defines */ | 51 | /* TX/RX descriptor defines */ |
54 | #define IXGBE_DEFAULT_TXD 512 | 52 | #define IXGBE_DEFAULT_TXD 512 |
@@ -112,7 +110,6 @@ struct vf_data_storage { | |||
112 | u16 vlans_enabled; | 110 | u16 vlans_enabled; |
113 | bool clear_to_send; | 111 | bool clear_to_send; |
114 | bool pf_set_mac; | 112 | bool pf_set_mac; |
115 | int rar; | ||
116 | u16 pf_vlan; /* When set, guest VLAN config not allowed. */ | 113 | u16 pf_vlan; /* When set, guest VLAN config not allowed. */ |
117 | u16 pf_qos; | 114 | u16 pf_qos; |
118 | }; | 115 | }; |
diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c index a4e2901f2f08..3e06a61da921 100644 --- a/drivers/net/ixgbe/ixgbe_82599.c +++ b/drivers/net/ixgbe/ixgbe_82599.c | |||
@@ -206,6 +206,14 @@ static s32 ixgbe_get_link_capabilities_82599(struct ixgbe_hw *hw, | |||
206 | s32 status = 0; | 206 | s32 status = 0; |
207 | u32 autoc = 0; | 207 | u32 autoc = 0; |
208 | 208 | ||
209 | /* Determine 1G link capabilities off of SFP+ type */ | ||
210 | if (hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core0 || | ||
211 | hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core1) { | ||
212 | *speed = IXGBE_LINK_SPEED_1GB_FULL; | ||
213 | *negotiation = true; | ||
214 | goto out; | ||
215 | } | ||
216 | |||
209 | /* | 217 | /* |
210 | * Determine link capabilities based on the stored value of AUTOC, | 218 | * Determine link capabilities based on the stored value of AUTOC, |
211 | * which represents EEPROM defaults. If AUTOC value has not been | 219 | * which represents EEPROM defaults. If AUTOC value has not been |
@@ -707,9 +715,8 @@ static s32 ixgbe_setup_mac_link_smartspeed(struct ixgbe_hw *hw, | |||
707 | 715 | ||
708 | out: | 716 | out: |
709 | if (link_up && (link_speed == IXGBE_LINK_SPEED_1GB_FULL)) | 717 | if (link_up && (link_speed == IXGBE_LINK_SPEED_1GB_FULL)) |
710 | netif_info(adapter, hw, adapter->netdev, "Smartspeed has" | 718 | e_info(hw, "Smartspeed has downgraded the link speed from " |
711 | " downgraded the link speed from the maximum" | 719 | "the maximum advertised\n"); |
712 | " advertised\n"); | ||
713 | return status; | 720 | return status; |
714 | } | 721 | } |
715 | 722 | ||
@@ -2088,6 +2095,7 @@ static u32 ixgbe_get_supported_physical_layer_82599(struct ixgbe_hw *hw) | |||
2088 | u32 pma_pmd_1g = autoc & IXGBE_AUTOC_1G_PMA_PMD_MASK; | 2095 | u32 pma_pmd_1g = autoc & IXGBE_AUTOC_1G_PMA_PMD_MASK; |
2089 | u16 ext_ability = 0; | 2096 | u16 ext_ability = 0; |
2090 | u8 comp_codes_10g = 0; | 2097 | u8 comp_codes_10g = 0; |
2098 | u8 comp_codes_1g = 0; | ||
2091 | 2099 | ||
2092 | hw->phy.ops.identify(hw); | 2100 | hw->phy.ops.identify(hw); |
2093 | 2101 | ||
@@ -2168,11 +2176,15 @@ sfp_check: | |||
2168 | case ixgbe_phy_sfp_intel: | 2176 | case ixgbe_phy_sfp_intel: |
2169 | case ixgbe_phy_sfp_unknown: | 2177 | case ixgbe_phy_sfp_unknown: |
2170 | hw->phy.ops.read_i2c_eeprom(hw, | 2178 | hw->phy.ops.read_i2c_eeprom(hw, |
2179 | IXGBE_SFF_1GBE_COMP_CODES, &comp_codes_1g); | ||
2180 | hw->phy.ops.read_i2c_eeprom(hw, | ||
2171 | IXGBE_SFF_10GBE_COMP_CODES, &comp_codes_10g); | 2181 | IXGBE_SFF_10GBE_COMP_CODES, &comp_codes_10g); |
2172 | if (comp_codes_10g & IXGBE_SFF_10GBASESR_CAPABLE) | 2182 | if (comp_codes_10g & IXGBE_SFF_10GBASESR_CAPABLE) |
2173 | physical_layer = IXGBE_PHYSICAL_LAYER_10GBASE_SR; | 2183 | physical_layer = IXGBE_PHYSICAL_LAYER_10GBASE_SR; |
2174 | else if (comp_codes_10g & IXGBE_SFF_10GBASELR_CAPABLE) | 2184 | else if (comp_codes_10g & IXGBE_SFF_10GBASELR_CAPABLE) |
2175 | physical_layer = IXGBE_PHYSICAL_LAYER_10GBASE_LR; | 2185 | physical_layer = IXGBE_PHYSICAL_LAYER_10GBASE_LR; |
2186 | else if (comp_codes_1g & IXGBE_SFF_1GBASET_CAPABLE) | ||
2187 | physical_layer = IXGBE_PHYSICAL_LAYER_1000BASE_T; | ||
2176 | break; | 2188 | break; |
2177 | default: | 2189 | default: |
2178 | break; | 2190 | break; |
diff --git a/drivers/net/ixgbe/ixgbe_common.h b/drivers/net/ixgbe/ixgbe_common.h index 3080afb12bdf..5cf15aa11cac 100644 --- a/drivers/net/ixgbe/ixgbe_common.h +++ b/drivers/net/ixgbe/ixgbe_common.h | |||
@@ -105,12 +105,23 @@ s32 ixgbe_blink_led_stop_generic(struct ixgbe_hw *hw, u32 index); | |||
105 | 105 | ||
106 | #define IXGBE_WRITE_FLUSH(a) IXGBE_READ_REG(a, IXGBE_STATUS) | 106 | #define IXGBE_WRITE_FLUSH(a) IXGBE_READ_REG(a, IXGBE_STATUS) |
107 | 107 | ||
108 | #ifdef DEBUG | 108 | extern struct net_device *ixgbe_get_hw_dev(struct ixgbe_hw *hw); |
109 | extern char *ixgbe_get_hw_dev_name(struct ixgbe_hw *hw); | ||
110 | #define hw_dbg(hw, format, arg...) \ | 109 | #define hw_dbg(hw, format, arg...) \ |
111 | printk(KERN_DEBUG "%s: " format, ixgbe_get_hw_dev_name(hw), ##arg) | 110 | netdev_dbg(ixgbe_get_hw_dev(hw), format, ##arg) |
112 | #else | 111 | #define e_dev_info(format, arg...) \ |
113 | #define hw_dbg(hw, format, arg...) do {} while (0) | 112 | dev_info(&adapter->pdev->dev, format, ## arg) |
114 | #endif | 113 | #define e_dev_warn(format, arg...) \ |
115 | 114 | dev_warn(&adapter->pdev->dev, format, ## arg) | |
115 | #define e_dev_err(format, arg...) \ | ||
116 | dev_err(&adapter->pdev->dev, format, ## arg) | ||
117 | #define e_dev_notice(format, arg...) \ | ||
118 | dev_notice(&adapter->pdev->dev, format, ## arg) | ||
119 | #define e_info(msglvl, format, arg...) \ | ||
120 | netif_info(adapter, msglvl, adapter->netdev, format, ## arg) | ||
121 | #define e_err(msglvl, format, arg...) \ | ||
122 | netif_err(adapter, msglvl, adapter->netdev, format, ## arg) | ||
123 | #define e_warn(msglvl, format, arg...) \ | ||
124 | netif_warn(adapter, msglvl, adapter->netdev, format, ## arg) | ||
125 | #define e_crit(msglvl, format, arg...) \ | ||
126 | netif_crit(adapter, msglvl, adapter->netdev, format, ## arg) | ||
116 | #endif /* IXGBE_COMMON */ | 127 | #endif /* IXGBE_COMMON */ |
diff --git a/drivers/net/ixgbe/ixgbe_dcb_82599.c b/drivers/net/ixgbe/ixgbe_dcb_82599.c index 4f7a26ab411e..25b02fb425ac 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_82599.c +++ b/drivers/net/ixgbe/ixgbe_dcb_82599.c | |||
@@ -346,7 +346,7 @@ s32 ixgbe_dcb_config_pfc_82599(struct ixgbe_hw *hw, | |||
346 | */ | 346 | */ |
347 | reg = IXGBE_READ_REG(hw, IXGBE_MFLCN); | 347 | reg = IXGBE_READ_REG(hw, IXGBE_MFLCN); |
348 | reg &= ~IXGBE_MFLCN_RFCE; | 348 | reg &= ~IXGBE_MFLCN_RFCE; |
349 | reg |= IXGBE_MFLCN_RPFCE; | 349 | reg |= IXGBE_MFLCN_RPFCE | IXGBE_MFLCN_DPF; |
350 | IXGBE_WRITE_REG(hw, IXGBE_MFLCN, reg); | 350 | IXGBE_WRITE_REG(hw, IXGBE_MFLCN, reg); |
351 | out: | 351 | out: |
352 | return 0; | 352 | return 0; |
diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c index 71da325dfa80..b53b465e24af 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_nl.c +++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c | |||
@@ -121,7 +121,7 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) | |||
121 | goto out; | 121 | goto out; |
122 | 122 | ||
123 | if (!(adapter->flags & IXGBE_FLAG_MSIX_ENABLED)) { | 123 | if (!(adapter->flags & IXGBE_FLAG_MSIX_ENABLED)) { |
124 | DPRINTK(DRV, ERR, "Enable failed, needs MSI-X\n"); | 124 | e_err(drv, "Enable failed, needs MSI-X\n"); |
125 | err = 1; | 125 | err = 1; |
126 | goto out; | 126 | goto out; |
127 | } | 127 | } |
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index 3a93a81872b8..dcebc82c6f4d 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c | |||
@@ -54,14 +54,14 @@ struct ixgbe_stats { | |||
54 | sizeof(((struct ixgbe_adapter *)0)->m), \ | 54 | sizeof(((struct ixgbe_adapter *)0)->m), \ |
55 | offsetof(struct ixgbe_adapter, m) | 55 | offsetof(struct ixgbe_adapter, m) |
56 | #define IXGBE_NETDEV_STAT(m) NETDEV_STATS, \ | 56 | #define IXGBE_NETDEV_STAT(m) NETDEV_STATS, \ |
57 | sizeof(((struct net_device *)0)->m), \ | 57 | sizeof(((struct rtnl_link_stats64 *)0)->m), \ |
58 | offsetof(struct net_device, m) | 58 | offsetof(struct rtnl_link_stats64, m) |
59 | 59 | ||
60 | static struct ixgbe_stats ixgbe_gstrings_stats[] = { | 60 | static struct ixgbe_stats ixgbe_gstrings_stats[] = { |
61 | {"rx_packets", IXGBE_NETDEV_STAT(stats.rx_packets)}, | 61 | {"rx_packets", IXGBE_NETDEV_STAT(rx_packets)}, |
62 | {"tx_packets", IXGBE_NETDEV_STAT(stats.tx_packets)}, | 62 | {"tx_packets", IXGBE_NETDEV_STAT(tx_packets)}, |
63 | {"rx_bytes", IXGBE_NETDEV_STAT(stats.rx_bytes)}, | 63 | {"rx_bytes", IXGBE_NETDEV_STAT(rx_bytes)}, |
64 | {"tx_bytes", IXGBE_NETDEV_STAT(stats.tx_bytes)}, | 64 | {"tx_bytes", IXGBE_NETDEV_STAT(tx_bytes)}, |
65 | {"rx_pkts_nic", IXGBE_STAT(stats.gprc)}, | 65 | {"rx_pkts_nic", IXGBE_STAT(stats.gprc)}, |
66 | {"tx_pkts_nic", IXGBE_STAT(stats.gptc)}, | 66 | {"tx_pkts_nic", IXGBE_STAT(stats.gptc)}, |
67 | {"rx_bytes_nic", IXGBE_STAT(stats.gorc)}, | 67 | {"rx_bytes_nic", IXGBE_STAT(stats.gorc)}, |
@@ -69,27 +69,27 @@ static struct ixgbe_stats ixgbe_gstrings_stats[] = { | |||
69 | {"lsc_int", IXGBE_STAT(lsc_int)}, | 69 | {"lsc_int", IXGBE_STAT(lsc_int)}, |
70 | {"tx_busy", IXGBE_STAT(tx_busy)}, | 70 | {"tx_busy", IXGBE_STAT(tx_busy)}, |
71 | {"non_eop_descs", IXGBE_STAT(non_eop_descs)}, | 71 | {"non_eop_descs", IXGBE_STAT(non_eop_descs)}, |
72 | {"rx_errors", IXGBE_NETDEV_STAT(stats.rx_errors)}, | 72 | {"rx_errors", IXGBE_NETDEV_STAT(rx_errors)}, |
73 | {"tx_errors", IXGBE_NETDEV_STAT(stats.tx_errors)}, | 73 | {"tx_errors", IXGBE_NETDEV_STAT(tx_errors)}, |
74 | {"rx_dropped", IXGBE_NETDEV_STAT(stats.rx_dropped)}, | 74 | {"rx_dropped", IXGBE_NETDEV_STAT(rx_dropped)}, |
75 | {"tx_dropped", IXGBE_NETDEV_STAT(stats.tx_dropped)}, | 75 | {"tx_dropped", IXGBE_NETDEV_STAT(tx_dropped)}, |
76 | {"multicast", IXGBE_NETDEV_STAT(stats.multicast)}, | 76 | {"multicast", IXGBE_NETDEV_STAT(multicast)}, |
77 | {"broadcast", IXGBE_STAT(stats.bprc)}, | 77 | {"broadcast", IXGBE_STAT(stats.bprc)}, |
78 | {"rx_no_buffer_count", IXGBE_STAT(stats.rnbc[0]) }, | 78 | {"rx_no_buffer_count", IXGBE_STAT(stats.rnbc[0]) }, |
79 | {"collisions", IXGBE_NETDEV_STAT(stats.collisions)}, | 79 | {"collisions", IXGBE_NETDEV_STAT(collisions)}, |
80 | {"rx_over_errors", IXGBE_NETDEV_STAT(stats.rx_over_errors)}, | 80 | {"rx_over_errors", IXGBE_NETDEV_STAT(rx_over_errors)}, |
81 | {"rx_crc_errors", IXGBE_NETDEV_STAT(stats.rx_crc_errors)}, | 81 | {"rx_crc_errors", IXGBE_NETDEV_STAT(rx_crc_errors)}, |
82 | {"rx_frame_errors", IXGBE_NETDEV_STAT(stats.rx_frame_errors)}, | 82 | {"rx_frame_errors", IXGBE_NETDEV_STAT(rx_frame_errors)}, |
83 | {"hw_rsc_aggregated", IXGBE_STAT(rsc_total_count)}, | 83 | {"hw_rsc_aggregated", IXGBE_STAT(rsc_total_count)}, |
84 | {"hw_rsc_flushed", IXGBE_STAT(rsc_total_flush)}, | 84 | {"hw_rsc_flushed", IXGBE_STAT(rsc_total_flush)}, |
85 | {"fdir_match", IXGBE_STAT(stats.fdirmatch)}, | 85 | {"fdir_match", IXGBE_STAT(stats.fdirmatch)}, |
86 | {"fdir_miss", IXGBE_STAT(stats.fdirmiss)}, | 86 | {"fdir_miss", IXGBE_STAT(stats.fdirmiss)}, |
87 | {"rx_fifo_errors", IXGBE_NETDEV_STAT(stats.rx_fifo_errors)}, | 87 | {"rx_fifo_errors", IXGBE_NETDEV_STAT(rx_fifo_errors)}, |
88 | {"rx_missed_errors", IXGBE_NETDEV_STAT(stats.rx_missed_errors)}, | 88 | {"rx_missed_errors", IXGBE_NETDEV_STAT(rx_missed_errors)}, |
89 | {"tx_aborted_errors", IXGBE_NETDEV_STAT(stats.tx_aborted_errors)}, | 89 | {"tx_aborted_errors", IXGBE_NETDEV_STAT(tx_aborted_errors)}, |
90 | {"tx_carrier_errors", IXGBE_NETDEV_STAT(stats.tx_carrier_errors)}, | 90 | {"tx_carrier_errors", IXGBE_NETDEV_STAT(tx_carrier_errors)}, |
91 | {"tx_fifo_errors", IXGBE_NETDEV_STAT(stats.tx_fifo_errors)}, | 91 | {"tx_fifo_errors", IXGBE_NETDEV_STAT(tx_fifo_errors)}, |
92 | {"tx_heartbeat_errors", IXGBE_NETDEV_STAT(stats.tx_heartbeat_errors)}, | 92 | {"tx_heartbeat_errors", IXGBE_NETDEV_STAT(tx_heartbeat_errors)}, |
93 | {"tx_timeout_count", IXGBE_STAT(tx_timeout_count)}, | 93 | {"tx_timeout_count", IXGBE_STAT(tx_timeout_count)}, |
94 | {"tx_restart_queue", IXGBE_STAT(restart_queue)}, | 94 | {"tx_restart_queue", IXGBE_STAT(restart_queue)}, |
95 | {"rx_long_length_errors", IXGBE_STAT(stats.roc)}, | 95 | {"rx_long_length_errors", IXGBE_STAT(stats.roc)}, |
@@ -234,6 +234,13 @@ static int ixgbe_get_settings(struct net_device *netdev, | |||
234 | case ixgbe_sfp_type_not_present: | 234 | case ixgbe_sfp_type_not_present: |
235 | ecmd->port = PORT_NONE; | 235 | ecmd->port = PORT_NONE; |
236 | break; | 236 | break; |
237 | case ixgbe_sfp_type_1g_cu_core0: | ||
238 | case ixgbe_sfp_type_1g_cu_core1: | ||
239 | ecmd->port = PORT_TP; | ||
240 | ecmd->supported = SUPPORTED_TP; | ||
241 | ecmd->advertising = (ADVERTISED_1000baseT_Full | | ||
242 | ADVERTISED_TP); | ||
243 | break; | ||
237 | case ixgbe_sfp_type_unknown: | 244 | case ixgbe_sfp_type_unknown: |
238 | default: | 245 | default: |
239 | ecmd->port = PORT_OTHER; | 246 | ecmd->port = PORT_OTHER; |
@@ -294,8 +301,7 @@ static int ixgbe_set_settings(struct net_device *netdev, | |||
294 | hw->mac.autotry_restart = true; | 301 | hw->mac.autotry_restart = true; |
295 | err = hw->mac.ops.setup_link(hw, advertised, true, true); | 302 | err = hw->mac.ops.setup_link(hw, advertised, true, true); |
296 | if (err) { | 303 | if (err) { |
297 | DPRINTK(PROBE, INFO, | 304 | e_info(probe, "setup link failed with code %d\n", err); |
298 | "setup link failed with code %d\n", err); | ||
299 | hw->mac.ops.setup_link(hw, old, true, true); | 305 | hw->mac.ops.setup_link(hw, old, true, true); |
300 | } | 306 | } |
301 | } else { | 307 | } else { |
@@ -992,16 +998,18 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev, | |||
992 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | 998 | struct ixgbe_adapter *adapter = netdev_priv(netdev); |
993 | u64 *queue_stat; | 999 | u64 *queue_stat; |
994 | int stat_count = sizeof(struct ixgbe_queue_stats) / sizeof(u64); | 1000 | int stat_count = sizeof(struct ixgbe_queue_stats) / sizeof(u64); |
1001 | struct rtnl_link_stats64 temp; | ||
1002 | const struct rtnl_link_stats64 *net_stats; | ||
995 | int j, k; | 1003 | int j, k; |
996 | int i; | 1004 | int i; |
997 | char *p = NULL; | 1005 | char *p = NULL; |
998 | 1006 | ||
999 | ixgbe_update_stats(adapter); | 1007 | ixgbe_update_stats(adapter); |
1000 | dev_get_stats(netdev); | 1008 | net_stats = dev_get_stats(netdev, &temp); |
1001 | for (i = 0; i < IXGBE_GLOBAL_STATS_LEN; i++) { | 1009 | for (i = 0; i < IXGBE_GLOBAL_STATS_LEN; i++) { |
1002 | switch (ixgbe_gstrings_stats[i].type) { | 1010 | switch (ixgbe_gstrings_stats[i].type) { |
1003 | case NETDEV_STATS: | 1011 | case NETDEV_STATS: |
1004 | p = (char *) netdev + | 1012 | p = (char *) net_stats + |
1005 | ixgbe_gstrings_stats[i].stat_offset; | 1013 | ixgbe_gstrings_stats[i].stat_offset; |
1006 | break; | 1014 | break; |
1007 | case IXGBE_STATS: | 1015 | case IXGBE_STATS: |
@@ -1188,9 +1196,9 @@ static struct ixgbe_reg_test reg_test_82598[] = { | |||
1188 | writel((_test[pat] & W), (adapter->hw.hw_addr + R)); \ | 1196 | writel((_test[pat] & W), (adapter->hw.hw_addr + R)); \ |
1189 | val = readl(adapter->hw.hw_addr + R); \ | 1197 | val = readl(adapter->hw.hw_addr + R); \ |
1190 | if (val != (_test[pat] & W & M)) { \ | 1198 | if (val != (_test[pat] & W & M)) { \ |
1191 | DPRINTK(DRV, ERR, "pattern test reg %04X failed: got "\ | 1199 | e_err(drv, "pattern test reg %04X failed: got " \ |
1192 | "0x%08X expected 0x%08X\n", \ | 1200 | "0x%08X expected 0x%08X\n", \ |
1193 | R, val, (_test[pat] & W & M)); \ | 1201 | R, val, (_test[pat] & W & M)); \ |
1194 | *data = R; \ | 1202 | *data = R; \ |
1195 | writel(before, adapter->hw.hw_addr + R); \ | 1203 | writel(before, adapter->hw.hw_addr + R); \ |
1196 | return 1; \ | 1204 | return 1; \ |
@@ -1206,8 +1214,8 @@ static struct ixgbe_reg_test reg_test_82598[] = { | |||
1206 | writel((W & M), (adapter->hw.hw_addr + R)); \ | 1214 | writel((W & M), (adapter->hw.hw_addr + R)); \ |
1207 | val = readl(adapter->hw.hw_addr + R); \ | 1215 | val = readl(adapter->hw.hw_addr + R); \ |
1208 | if ((W & M) != (val & M)) { \ | 1216 | if ((W & M) != (val & M)) { \ |
1209 | DPRINTK(DRV, ERR, "set/check reg %04X test failed: got 0x%08X "\ | 1217 | e_err(drv, "set/check reg %04X test failed: got 0x%08X " \ |
1210 | "expected 0x%08X\n", R, (val & M), (W & M)); \ | 1218 | "expected 0x%08X\n", R, (val & M), (W & M)); \ |
1211 | *data = R; \ | 1219 | *data = R; \ |
1212 | writel(before, (adapter->hw.hw_addr + R)); \ | 1220 | writel(before, (adapter->hw.hw_addr + R)); \ |
1213 | return 1; \ | 1221 | return 1; \ |
@@ -1240,8 +1248,8 @@ static int ixgbe_reg_test(struct ixgbe_adapter *adapter, u64 *data) | |||
1240 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_STATUS, toggle); | 1248 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_STATUS, toggle); |
1241 | after = IXGBE_READ_REG(&adapter->hw, IXGBE_STATUS) & toggle; | 1249 | after = IXGBE_READ_REG(&adapter->hw, IXGBE_STATUS) & toggle; |
1242 | if (value != after) { | 1250 | if (value != after) { |
1243 | DPRINTK(DRV, ERR, "failed STATUS register test got: " | 1251 | e_err(drv, "failed STATUS register test got: 0x%08X " |
1244 | "0x%08X expected: 0x%08X\n", after, value); | 1252 | "expected: 0x%08X\n", after, value); |
1245 | *data = 1; | 1253 | *data = 1; |
1246 | return 1; | 1254 | return 1; |
1247 | } | 1255 | } |
@@ -1341,8 +1349,8 @@ static int ixgbe_intr_test(struct ixgbe_adapter *adapter, u64 *data) | |||
1341 | *data = 1; | 1349 | *data = 1; |
1342 | return -1; | 1350 | return -1; |
1343 | } | 1351 | } |
1344 | DPRINTK(HW, INFO, "testing %s interrupt\n", | 1352 | e_info(hw, "testing %s interrupt\n", shared_int ? |
1345 | (shared_int ? "shared" : "unshared")); | 1353 | "shared" : "unshared"); |
1346 | 1354 | ||
1347 | /* Disable all the interrupts */ | 1355 | /* Disable all the interrupts */ |
1348 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, 0xFFFFFFFF); | 1356 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, 0xFFFFFFFF); |
@@ -1847,7 +1855,7 @@ static void ixgbe_diag_test(struct net_device *netdev, | |||
1847 | if (eth_test->flags == ETH_TEST_FL_OFFLINE) { | 1855 | if (eth_test->flags == ETH_TEST_FL_OFFLINE) { |
1848 | /* Offline tests */ | 1856 | /* Offline tests */ |
1849 | 1857 | ||
1850 | DPRINTK(HW, INFO, "offline testing starting\n"); | 1858 | e_info(hw, "offline testing starting\n"); |
1851 | 1859 | ||
1852 | /* Link test performed before hardware reset so autoneg doesn't | 1860 | /* Link test performed before hardware reset so autoneg doesn't |
1853 | * interfere with test result */ | 1861 | * interfere with test result */ |
@@ -1880,17 +1888,17 @@ static void ixgbe_diag_test(struct net_device *netdev, | |||
1880 | else | 1888 | else |
1881 | ixgbe_reset(adapter); | 1889 | ixgbe_reset(adapter); |
1882 | 1890 | ||
1883 | DPRINTK(HW, INFO, "register testing starting\n"); | 1891 | e_info(hw, "register testing starting\n"); |
1884 | if (ixgbe_reg_test(adapter, &data[0])) | 1892 | if (ixgbe_reg_test(adapter, &data[0])) |
1885 | eth_test->flags |= ETH_TEST_FL_FAILED; | 1893 | eth_test->flags |= ETH_TEST_FL_FAILED; |
1886 | 1894 | ||
1887 | ixgbe_reset(adapter); | 1895 | ixgbe_reset(adapter); |
1888 | DPRINTK(HW, INFO, "eeprom testing starting\n"); | 1896 | e_info(hw, "eeprom testing starting\n"); |
1889 | if (ixgbe_eeprom_test(adapter, &data[1])) | 1897 | if (ixgbe_eeprom_test(adapter, &data[1])) |
1890 | eth_test->flags |= ETH_TEST_FL_FAILED; | 1898 | eth_test->flags |= ETH_TEST_FL_FAILED; |
1891 | 1899 | ||
1892 | ixgbe_reset(adapter); | 1900 | ixgbe_reset(adapter); |
1893 | DPRINTK(HW, INFO, "interrupt testing starting\n"); | 1901 | e_info(hw, "interrupt testing starting\n"); |
1894 | if (ixgbe_intr_test(adapter, &data[2])) | 1902 | if (ixgbe_intr_test(adapter, &data[2])) |
1895 | eth_test->flags |= ETH_TEST_FL_FAILED; | 1903 | eth_test->flags |= ETH_TEST_FL_FAILED; |
1896 | 1904 | ||
@@ -1898,14 +1906,14 @@ static void ixgbe_diag_test(struct net_device *netdev, | |||
1898 | * loopback diagnostic. */ | 1906 | * loopback diagnostic. */ |
1899 | if (adapter->flags & (IXGBE_FLAG_SRIOV_ENABLED | | 1907 | if (adapter->flags & (IXGBE_FLAG_SRIOV_ENABLED | |
1900 | IXGBE_FLAG_VMDQ_ENABLED)) { | 1908 | IXGBE_FLAG_VMDQ_ENABLED)) { |
1901 | DPRINTK(HW, INFO, "Skip MAC loopback diagnostic in VT " | 1909 | e_info(hw, "Skip MAC loopback diagnostic in VT " |
1902 | "mode\n"); | 1910 | "mode\n"); |
1903 | data[3] = 0; | 1911 | data[3] = 0; |
1904 | goto skip_loopback; | 1912 | goto skip_loopback; |
1905 | } | 1913 | } |
1906 | 1914 | ||
1907 | ixgbe_reset(adapter); | 1915 | ixgbe_reset(adapter); |
1908 | DPRINTK(HW, INFO, "loopback testing starting\n"); | 1916 | e_info(hw, "loopback testing starting\n"); |
1909 | if (ixgbe_loopback_test(adapter, &data[3])) | 1917 | if (ixgbe_loopback_test(adapter, &data[3])) |
1910 | eth_test->flags |= ETH_TEST_FL_FAILED; | 1918 | eth_test->flags |= ETH_TEST_FL_FAILED; |
1911 | 1919 | ||
@@ -1916,7 +1924,7 @@ skip_loopback: | |||
1916 | if (if_running) | 1924 | if (if_running) |
1917 | dev_open(netdev); | 1925 | dev_open(netdev); |
1918 | } else { | 1926 | } else { |
1919 | DPRINTK(HW, INFO, "online testing starting\n"); | 1927 | e_info(hw, "online testing starting\n"); |
1920 | /* Online tests */ | 1928 | /* Online tests */ |
1921 | if (ixgbe_link_test(adapter, &data[4])) | 1929 | if (ixgbe_link_test(adapter, &data[4])) |
1922 | eth_test->flags |= ETH_TEST_FL_FAILED; | 1930 | eth_test->flags |= ETH_TEST_FL_FAILED; |
@@ -2134,8 +2142,8 @@ static int ixgbe_set_coalesce(struct net_device *netdev, | |||
2134 | adapter->flags2 &= ~IXGBE_FLAG2_RSC_ENABLED; | 2142 | adapter->flags2 &= ~IXGBE_FLAG2_RSC_ENABLED; |
2135 | if (netdev->features & NETIF_F_LRO) { | 2143 | if (netdev->features & NETIF_F_LRO) { |
2136 | netdev->features &= ~NETIF_F_LRO; | 2144 | netdev->features &= ~NETIF_F_LRO; |
2137 | DPRINTK(PROBE, INFO, "rx-usecs set to 0, " | 2145 | e_info(probe, "rx-usecs set to 0, " |
2138 | "disabling LRO/RSC\n"); | 2146 | "disabling RSC\n"); |
2139 | } | 2147 | } |
2140 | need_reset = true; | 2148 | need_reset = true; |
2141 | } | 2149 | } |
@@ -2208,8 +2216,11 @@ static int ixgbe_set_flags(struct net_device *netdev, u32 data) | |||
2208 | { | 2216 | { |
2209 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | 2217 | struct ixgbe_adapter *adapter = netdev_priv(netdev); |
2210 | bool need_reset = false; | 2218 | bool need_reset = false; |
2219 | int rc; | ||
2211 | 2220 | ||
2212 | ethtool_op_set_flags(netdev, data); | 2221 | rc = ethtool_op_set_flags(netdev, data, ETH_FLAG_LRO | ETH_FLAG_NTUPLE); |
2222 | if (rc) | ||
2223 | return rc; | ||
2213 | 2224 | ||
2214 | /* if state changes we need to update adapter->flags and reset */ | 2225 | /* if state changes we need to update adapter->flags and reset */ |
2215 | if (adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE) { | 2226 | if (adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE) { |
@@ -2230,10 +2241,10 @@ static int ixgbe_set_flags(struct net_device *netdev, u32 data) | |||
2230 | break; | 2241 | break; |
2231 | } | 2242 | } |
2232 | } else if (!adapter->rx_itr_setting) { | 2243 | } else if (!adapter->rx_itr_setting) { |
2233 | netdev->features &= ~ETH_FLAG_LRO; | 2244 | netdev->features &= ~NETIF_F_LRO; |
2234 | if (data & ETH_FLAG_LRO) | 2245 | if (data & ETH_FLAG_LRO) |
2235 | DPRINTK(PROBE, INFO, "rx-usecs set to 0, " | 2246 | e_info(probe, "rx-usecs set to 0, " |
2236 | "LRO/RSC cannot be enabled.\n"); | 2247 | "LRO/RSC cannot be enabled.\n"); |
2237 | } | 2248 | } |
2238 | } | 2249 | } |
2239 | 2250 | ||
diff --git a/drivers/net/ixgbe/ixgbe_fcoe.c b/drivers/net/ixgbe/ixgbe_fcoe.c index 45182ab41d6b..072327c5e41a 100644 --- a/drivers/net/ixgbe/ixgbe_fcoe.c +++ b/drivers/net/ixgbe/ixgbe_fcoe.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | *******************************************************************************/ | 26 | *******************************************************************************/ |
27 | 27 | ||
28 | |||
29 | #include "ixgbe.h" | 28 | #include "ixgbe.h" |
30 | #ifdef CONFIG_IXGBE_DCB | 29 | #ifdef CONFIG_IXGBE_DCB |
31 | #include "ixgbe_dcb_82599.h" | 30 | #include "ixgbe_dcb_82599.h" |
@@ -165,20 +164,20 @@ int ixgbe_fcoe_ddp_get(struct net_device *netdev, u16 xid, | |||
165 | 164 | ||
166 | adapter = netdev_priv(netdev); | 165 | adapter = netdev_priv(netdev); |
167 | if (xid >= IXGBE_FCOE_DDP_MAX) { | 166 | if (xid >= IXGBE_FCOE_DDP_MAX) { |
168 | DPRINTK(DRV, WARNING, "xid=0x%x out-of-range\n", xid); | 167 | e_warn(drv, "xid=0x%x out-of-range\n", xid); |
169 | return 0; | 168 | return 0; |
170 | } | 169 | } |
171 | 170 | ||
172 | fcoe = &adapter->fcoe; | 171 | fcoe = &adapter->fcoe; |
173 | if (!fcoe->pool) { | 172 | if (!fcoe->pool) { |
174 | DPRINTK(DRV, WARNING, "xid=0x%x no ddp pool for fcoe\n", xid); | 173 | e_warn(drv, "xid=0x%x no ddp pool for fcoe\n", xid); |
175 | return 0; | 174 | return 0; |
176 | } | 175 | } |
177 | 176 | ||
178 | ddp = &fcoe->ddp[xid]; | 177 | ddp = &fcoe->ddp[xid]; |
179 | if (ddp->sgl) { | 178 | if (ddp->sgl) { |
180 | DPRINTK(DRV, ERR, "xid 0x%x w/ non-null sgl=%p nents=%d\n", | 179 | e_err(drv, "xid 0x%x w/ non-null sgl=%p nents=%d\n", |
181 | xid, ddp->sgl, ddp->sgc); | 180 | xid, ddp->sgl, ddp->sgc); |
182 | return 0; | 181 | return 0; |
183 | } | 182 | } |
184 | ixgbe_fcoe_clear_ddp(ddp); | 183 | ixgbe_fcoe_clear_ddp(ddp); |
@@ -186,14 +185,14 @@ int ixgbe_fcoe_ddp_get(struct net_device *netdev, u16 xid, | |||
186 | /* setup dma from scsi command sgl */ | 185 | /* setup dma from scsi command sgl */ |
187 | dmacount = pci_map_sg(adapter->pdev, sgl, sgc, DMA_FROM_DEVICE); | 186 | dmacount = pci_map_sg(adapter->pdev, sgl, sgc, DMA_FROM_DEVICE); |
188 | if (dmacount == 0) { | 187 | if (dmacount == 0) { |
189 | DPRINTK(DRV, ERR, "xid 0x%x DMA map error\n", xid); | 188 | e_err(drv, "xid 0x%x DMA map error\n", xid); |
190 | return 0; | 189 | return 0; |
191 | } | 190 | } |
192 | 191 | ||
193 | /* alloc the udl from our ddp pool */ | 192 | /* alloc the udl from our ddp pool */ |
194 | ddp->udl = pci_pool_alloc(fcoe->pool, GFP_KERNEL, &ddp->udp); | 193 | ddp->udl = pci_pool_alloc(fcoe->pool, GFP_ATOMIC, &ddp->udp); |
195 | if (!ddp->udl) { | 194 | if (!ddp->udl) { |
196 | DPRINTK(DRV, ERR, "failed allocated ddp context\n"); | 195 | e_err(drv, "failed allocated ddp context\n"); |
197 | goto out_noddp_unmap; | 196 | goto out_noddp_unmap; |
198 | } | 197 | } |
199 | ddp->sgl = sgl; | 198 | ddp->sgl = sgl; |
@@ -206,10 +205,9 @@ int ixgbe_fcoe_ddp_get(struct net_device *netdev, u16 xid, | |||
206 | while (len) { | 205 | while (len) { |
207 | /* max number of buffers allowed in one DDP context */ | 206 | /* max number of buffers allowed in one DDP context */ |
208 | if (j >= IXGBE_BUFFCNT_MAX) { | 207 | if (j >= IXGBE_BUFFCNT_MAX) { |
209 | netif_err(adapter, drv, adapter->netdev, | 208 | e_err(drv, "xid=%x:%d,%d,%d:addr=%llx " |
210 | "xid=%x:%d,%d,%d:addr=%llx " | 209 | "not enough descriptors\n", |
211 | "not enough descriptors\n", | 210 | xid, i, j, dmacount, (u64)addr); |
212 | xid, i, j, dmacount, (u64)addr); | ||
213 | goto out_noddp_free; | 211 | goto out_noddp_free; |
214 | } | 212 | } |
215 | 213 | ||
@@ -387,8 +385,8 @@ int ixgbe_fso(struct ixgbe_adapter *adapter, | |||
387 | struct fc_frame_header *fh; | 385 | struct fc_frame_header *fh; |
388 | 386 | ||
389 | if (skb_is_gso(skb) && (skb_shinfo(skb)->gso_type != SKB_GSO_FCOE)) { | 387 | if (skb_is_gso(skb) && (skb_shinfo(skb)->gso_type != SKB_GSO_FCOE)) { |
390 | DPRINTK(DRV, ERR, "Wrong gso type %d:expecting SKB_GSO_FCOE\n", | 388 | e_err(drv, "Wrong gso type %d:expecting SKB_GSO_FCOE\n", |
391 | skb_shinfo(skb)->gso_type); | 389 | skb_shinfo(skb)->gso_type); |
392 | return -EINVAL; | 390 | return -EINVAL; |
393 | } | 391 | } |
394 | 392 | ||
@@ -414,7 +412,7 @@ int ixgbe_fso(struct ixgbe_adapter *adapter, | |||
414 | fcoe_sof_eof |= IXGBE_ADVTXD_FCOEF_SOF; | 412 | fcoe_sof_eof |= IXGBE_ADVTXD_FCOEF_SOF; |
415 | break; | 413 | break; |
416 | default: | 414 | default: |
417 | DPRINTK(DRV, WARNING, "unknown sof = 0x%x\n", sof); | 415 | e_warn(drv, "unknown sof = 0x%x\n", sof); |
418 | return -EINVAL; | 416 | return -EINVAL; |
419 | } | 417 | } |
420 | 418 | ||
@@ -441,7 +439,7 @@ int ixgbe_fso(struct ixgbe_adapter *adapter, | |||
441 | fcoe_sof_eof |= IXGBE_ADVTXD_FCOEF_EOF_A; | 439 | fcoe_sof_eof |= IXGBE_ADVTXD_FCOEF_EOF_A; |
442 | break; | 440 | break; |
443 | default: | 441 | default: |
444 | DPRINTK(DRV, WARNING, "unknown eof = 0x%x\n", eof); | 442 | e_warn(drv, "unknown eof = 0x%x\n", eof); |
445 | return -EINVAL; | 443 | return -EINVAL; |
446 | } | 444 | } |
447 | 445 | ||
@@ -517,8 +515,7 @@ void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter) | |||
517 | adapter->pdev, IXGBE_FCPTR_MAX, | 515 | adapter->pdev, IXGBE_FCPTR_MAX, |
518 | IXGBE_FCPTR_ALIGN, PAGE_SIZE); | 516 | IXGBE_FCPTR_ALIGN, PAGE_SIZE); |
519 | if (!fcoe->pool) | 517 | if (!fcoe->pool) |
520 | DPRINTK(DRV, ERR, | 518 | e_err(drv, "failed to allocated FCoE DDP pool\n"); |
521 | "failed to allocated FCoE DDP pool\n"); | ||
522 | 519 | ||
523 | spin_lock_init(&fcoe->lock); | 520 | spin_lock_init(&fcoe->lock); |
524 | } | 521 | } |
@@ -614,7 +611,7 @@ int ixgbe_fcoe_enable(struct net_device *netdev) | |||
614 | if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) | 611 | if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) |
615 | goto out_enable; | 612 | goto out_enable; |
616 | 613 | ||
617 | DPRINTK(DRV, INFO, "Enabling FCoE offload features.\n"); | 614 | e_info(drv, "Enabling FCoE offload features.\n"); |
618 | if (netif_running(netdev)) | 615 | if (netif_running(netdev)) |
619 | netdev->netdev_ops->ndo_stop(netdev); | 616 | netdev->netdev_ops->ndo_stop(netdev); |
620 | 617 | ||
@@ -625,9 +622,6 @@ int ixgbe_fcoe_enable(struct net_device *netdev) | |||
625 | netdev->features |= NETIF_F_FCOE_CRC; | 622 | netdev->features |= NETIF_F_FCOE_CRC; |
626 | netdev->features |= NETIF_F_FSO; | 623 | netdev->features |= NETIF_F_FSO; |
627 | netdev->features |= NETIF_F_FCOE_MTU; | 624 | netdev->features |= NETIF_F_FCOE_MTU; |
628 | netdev->vlan_features |= NETIF_F_FCOE_CRC; | ||
629 | netdev->vlan_features |= NETIF_F_FSO; | ||
630 | netdev->vlan_features |= NETIF_F_FCOE_MTU; | ||
631 | netdev->fcoe_ddp_xid = IXGBE_FCOE_DDP_MAX - 1; | 625 | netdev->fcoe_ddp_xid = IXGBE_FCOE_DDP_MAX - 1; |
632 | 626 | ||
633 | ixgbe_init_interrupt_scheme(adapter); | 627 | ixgbe_init_interrupt_scheme(adapter); |
@@ -660,25 +654,21 @@ int ixgbe_fcoe_disable(struct net_device *netdev) | |||
660 | if (!(adapter->flags & IXGBE_FLAG_FCOE_ENABLED)) | 654 | if (!(adapter->flags & IXGBE_FLAG_FCOE_ENABLED)) |
661 | goto out_disable; | 655 | goto out_disable; |
662 | 656 | ||
663 | DPRINTK(DRV, INFO, "Disabling FCoE offload features.\n"); | 657 | e_info(drv, "Disabling FCoE offload features.\n"); |
658 | netdev->features &= ~NETIF_F_FCOE_CRC; | ||
659 | netdev->features &= ~NETIF_F_FSO; | ||
660 | netdev->features &= ~NETIF_F_FCOE_MTU; | ||
661 | netdev->fcoe_ddp_xid = 0; | ||
662 | netdev_features_change(netdev); | ||
663 | |||
664 | if (netif_running(netdev)) | 664 | if (netif_running(netdev)) |
665 | netdev->netdev_ops->ndo_stop(netdev); | 665 | netdev->netdev_ops->ndo_stop(netdev); |
666 | 666 | ||
667 | ixgbe_clear_interrupt_scheme(adapter); | 667 | ixgbe_clear_interrupt_scheme(adapter); |
668 | |||
669 | adapter->flags &= ~IXGBE_FLAG_FCOE_ENABLED; | 668 | adapter->flags &= ~IXGBE_FLAG_FCOE_ENABLED; |
670 | adapter->ring_feature[RING_F_FCOE].indices = 0; | 669 | adapter->ring_feature[RING_F_FCOE].indices = 0; |
671 | netdev->features &= ~NETIF_F_FCOE_CRC; | ||
672 | netdev->features &= ~NETIF_F_FSO; | ||
673 | netdev->features &= ~NETIF_F_FCOE_MTU; | ||
674 | netdev->vlan_features &= ~NETIF_F_FCOE_CRC; | ||
675 | netdev->vlan_features &= ~NETIF_F_FSO; | ||
676 | netdev->vlan_features &= ~NETIF_F_FCOE_MTU; | ||
677 | netdev->fcoe_ddp_xid = 0; | ||
678 | |||
679 | ixgbe_cleanup_fcoe(adapter); | 670 | ixgbe_cleanup_fcoe(adapter); |
680 | ixgbe_init_interrupt_scheme(adapter); | 671 | ixgbe_init_interrupt_scheme(adapter); |
681 | netdev_features_change(netdev); | ||
682 | 672 | ||
683 | if (netif_running(netdev)) | 673 | if (netif_running(netdev)) |
684 | netdev->netdev_ops->ndo_open(netdev); | 674 | netdev->netdev_ops->ndo_open(netdev); |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 74d9b6df3029..7d6a415bcf88 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -52,7 +52,7 @@ char ixgbe_driver_name[] = "ixgbe"; | |||
52 | static const char ixgbe_driver_string[] = | 52 | static const char ixgbe_driver_string[] = |
53 | "Intel(R) 10 Gigabit PCI Express Network Driver"; | 53 | "Intel(R) 10 Gigabit PCI Express Network Driver"; |
54 | 54 | ||
55 | #define DRV_VERSION "2.0.62-k2" | 55 | #define DRV_VERSION "2.0.84-k2" |
56 | const char ixgbe_driver_version[] = DRV_VERSION; | 56 | const char ixgbe_driver_version[] = DRV_VERSION; |
57 | static char ixgbe_copyright[] = "Copyright (c) 1999-2010 Intel Corporation."; | 57 | static char ixgbe_copyright[] = "Copyright (c) 1999-2010 Intel Corporation."; |
58 | 58 | ||
@@ -696,19 +696,19 @@ static inline bool ixgbe_check_tx_hang(struct ixgbe_adapter *adapter, | |||
696 | /* detected Tx unit hang */ | 696 | /* detected Tx unit hang */ |
697 | union ixgbe_adv_tx_desc *tx_desc; | 697 | union ixgbe_adv_tx_desc *tx_desc; |
698 | tx_desc = IXGBE_TX_DESC_ADV(*tx_ring, eop); | 698 | tx_desc = IXGBE_TX_DESC_ADV(*tx_ring, eop); |
699 | DPRINTK(DRV, ERR, "Detected Tx Unit Hang\n" | 699 | e_err(drv, "Detected Tx Unit Hang\n" |
700 | " Tx Queue <%d>\n" | 700 | " Tx Queue <%d>\n" |
701 | " TDH, TDT <%x>, <%x>\n" | 701 | " TDH, TDT <%x>, <%x>\n" |
702 | " next_to_use <%x>\n" | 702 | " next_to_use <%x>\n" |
703 | " next_to_clean <%x>\n" | 703 | " next_to_clean <%x>\n" |
704 | "tx_buffer_info[next_to_clean]\n" | 704 | "tx_buffer_info[next_to_clean]\n" |
705 | " time_stamp <%lx>\n" | 705 | " time_stamp <%lx>\n" |
706 | " jiffies <%lx>\n", | 706 | " jiffies <%lx>\n", |
707 | tx_ring->queue_index, | 707 | tx_ring->queue_index, |
708 | IXGBE_READ_REG(hw, tx_ring->head), | 708 | IXGBE_READ_REG(hw, tx_ring->head), |
709 | IXGBE_READ_REG(hw, tx_ring->tail), | 709 | IXGBE_READ_REG(hw, tx_ring->tail), |
710 | tx_ring->next_to_use, eop, | 710 | tx_ring->next_to_use, eop, |
711 | tx_ring->tx_buffer_info[eop].time_stamp, jiffies); | 711 | tx_ring->tx_buffer_info[eop].time_stamp, jiffies); |
712 | return true; | 712 | return true; |
713 | } | 713 | } |
714 | 714 | ||
@@ -812,9 +812,8 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_q_vector *q_vector, | |||
812 | if (adapter->detect_tx_hung) { | 812 | if (adapter->detect_tx_hung) { |
813 | if (ixgbe_check_tx_hang(adapter, tx_ring, i)) { | 813 | if (ixgbe_check_tx_hang(adapter, tx_ring, i)) { |
814 | /* schedule immediate reset if we believe we hung */ | 814 | /* schedule immediate reset if we believe we hung */ |
815 | DPRINTK(PROBE, INFO, | 815 | e_info(probe, "tx hang %d detected, resetting " |
816 | "tx hang %d detected, resetting adapter\n", | 816 | "adapter\n", adapter->tx_timeout_count + 1); |
817 | adapter->tx_timeout_count + 1); | ||
818 | ixgbe_tx_timeout(adapter->netdev); | 817 | ixgbe_tx_timeout(adapter->netdev); |
819 | } | 818 | } |
820 | } | 819 | } |
@@ -1653,10 +1652,10 @@ static void ixgbe_check_overtemp_task(struct work_struct *work) | |||
1653 | return; | 1652 | return; |
1654 | break; | 1653 | break; |
1655 | } | 1654 | } |
1656 | DPRINTK(DRV, ERR, "Network adapter has been stopped because it " | 1655 | e_crit(drv, "Network adapter has been stopped because it has " |
1657 | "has over heated. Restart the computer. If the problem " | 1656 | "over heated. Restart the computer. If the problem " |
1658 | "persists, power off the system and replace the " | 1657 | "persists, power off the system and replace the " |
1659 | "adapter\n"); | 1658 | "adapter\n"); |
1660 | /* write to clear the interrupt */ | 1659 | /* write to clear the interrupt */ |
1661 | IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP0); | 1660 | IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP0); |
1662 | } | 1661 | } |
@@ -1668,7 +1667,7 @@ static void ixgbe_check_fan_failure(struct ixgbe_adapter *adapter, u32 eicr) | |||
1668 | 1667 | ||
1669 | if ((adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE) && | 1668 | if ((adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE) && |
1670 | (eicr & IXGBE_EICR_GPI_SDP1)) { | 1669 | (eicr & IXGBE_EICR_GPI_SDP1)) { |
1671 | DPRINTK(PROBE, CRIT, "Fan has stopped, replace the adapter\n"); | 1670 | e_crit(probe, "Fan has stopped, replace the adapter\n"); |
1672 | /* write to clear the interrupt */ | 1671 | /* write to clear the interrupt */ |
1673 | IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP1); | 1672 | IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP1); |
1674 | } | 1673 | } |
@@ -2154,9 +2153,8 @@ static int ixgbe_request_msix_irqs(struct ixgbe_adapter *adapter) | |||
2154 | handler, 0, adapter->name[vector], | 2153 | handler, 0, adapter->name[vector], |
2155 | adapter->q_vector[vector]); | 2154 | adapter->q_vector[vector]); |
2156 | if (err) { | 2155 | if (err) { |
2157 | DPRINTK(PROBE, ERR, | 2156 | e_err(probe, "request_irq failed for MSIX interrupt " |
2158 | "request_irq failed for MSIX interrupt " | 2157 | "Error: %d\n", err); |
2159 | "Error: %d\n", err); | ||
2160 | goto free_queue_irqs; | 2158 | goto free_queue_irqs; |
2161 | } | 2159 | } |
2162 | } | 2160 | } |
@@ -2165,8 +2163,7 @@ static int ixgbe_request_msix_irqs(struct ixgbe_adapter *adapter) | |||
2165 | err = request_irq(adapter->msix_entries[vector].vector, | 2163 | err = request_irq(adapter->msix_entries[vector].vector, |
2166 | ixgbe_msix_lsc, 0, adapter->name[vector], netdev); | 2164 | ixgbe_msix_lsc, 0, adapter->name[vector], netdev); |
2167 | if (err) { | 2165 | if (err) { |
2168 | DPRINTK(PROBE, ERR, | 2166 | e_err(probe, "request_irq for msix_lsc failed: %d\n", err); |
2169 | "request_irq for msix_lsc failed: %d\n", err); | ||
2170 | goto free_queue_irqs; | 2167 | goto free_queue_irqs; |
2171 | } | 2168 | } |
2172 | 2169 | ||
@@ -2352,7 +2349,7 @@ static int ixgbe_request_irq(struct ixgbe_adapter *adapter) | |||
2352 | } | 2349 | } |
2353 | 2350 | ||
2354 | if (err) | 2351 | if (err) |
2355 | DPRINTK(PROBE, ERR, "request_irq failed, Error %d\n", err); | 2352 | e_err(probe, "request_irq failed, Error %d\n", err); |
2356 | 2353 | ||
2357 | return err; | 2354 | return err; |
2358 | } | 2355 | } |
@@ -2423,7 +2420,7 @@ static void ixgbe_configure_msi_and_legacy(struct ixgbe_adapter *adapter) | |||
2423 | map_vector_to_rxq(adapter, 0, 0); | 2420 | map_vector_to_rxq(adapter, 0, 0); |
2424 | map_vector_to_txq(adapter, 0, 0); | 2421 | map_vector_to_txq(adapter, 0, 0); |
2425 | 2422 | ||
2426 | DPRINTK(HW, INFO, "Legacy interrupt IVAR setup done\n"); | 2423 | e_info(hw, "Legacy interrupt IVAR setup done\n"); |
2427 | } | 2424 | } |
2428 | 2425 | ||
2429 | /** | 2426 | /** |
@@ -2803,10 +2800,8 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter) | |||
2803 | /* Perform hash on these packet types */ | 2800 | /* Perform hash on these packet types */ |
2804 | mrqc |= IXGBE_MRQC_RSS_FIELD_IPV4 | 2801 | mrqc |= IXGBE_MRQC_RSS_FIELD_IPV4 |
2805 | | IXGBE_MRQC_RSS_FIELD_IPV4_TCP | 2802 | | IXGBE_MRQC_RSS_FIELD_IPV4_TCP |
2806 | | IXGBE_MRQC_RSS_FIELD_IPV4_UDP | ||
2807 | | IXGBE_MRQC_RSS_FIELD_IPV6 | 2803 | | IXGBE_MRQC_RSS_FIELD_IPV6 |
2808 | | IXGBE_MRQC_RSS_FIELD_IPV6_TCP | 2804 | | IXGBE_MRQC_RSS_FIELD_IPV6_TCP; |
2809 | | IXGBE_MRQC_RSS_FIELD_IPV6_UDP; | ||
2810 | } | 2805 | } |
2811 | IXGBE_WRITE_REG(hw, IXGBE_MRQC, mrqc); | 2806 | IXGBE_WRITE_REG(hw, IXGBE_MRQC, mrqc); |
2812 | 2807 | ||
@@ -2995,6 +2990,48 @@ static void ixgbe_restore_vlan(struct ixgbe_adapter *adapter) | |||
2995 | } | 2990 | } |
2996 | 2991 | ||
2997 | /** | 2992 | /** |
2993 | * ixgbe_write_uc_addr_list - write unicast addresses to RAR table | ||
2994 | * @netdev: network interface device structure | ||
2995 | * | ||
2996 | * Writes unicast address list to the RAR table. | ||
2997 | * Returns: -ENOMEM on failure/insufficient address space | ||
2998 | * 0 on no addresses written | ||
2999 | * X on writing X addresses to the RAR table | ||
3000 | **/ | ||
3001 | static int ixgbe_write_uc_addr_list(struct net_device *netdev) | ||
3002 | { | ||
3003 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | ||
3004 | struct ixgbe_hw *hw = &adapter->hw; | ||
3005 | unsigned int vfn = adapter->num_vfs; | ||
3006 | unsigned int rar_entries = hw->mac.num_rar_entries - (vfn + 1); | ||
3007 | int count = 0; | ||
3008 | |||
3009 | /* return ENOMEM indicating insufficient memory for addresses */ | ||
3010 | if (netdev_uc_count(netdev) > rar_entries) | ||
3011 | return -ENOMEM; | ||
3012 | |||
3013 | if (!netdev_uc_empty(netdev) && rar_entries) { | ||
3014 | struct netdev_hw_addr *ha; | ||
3015 | /* return error if we do not support writing to RAR table */ | ||
3016 | if (!hw->mac.ops.set_rar) | ||
3017 | return -ENOMEM; | ||
3018 | |||
3019 | netdev_for_each_uc_addr(ha, netdev) { | ||
3020 | if (!rar_entries) | ||
3021 | break; | ||
3022 | hw->mac.ops.set_rar(hw, rar_entries--, ha->addr, | ||
3023 | vfn, IXGBE_RAH_AV); | ||
3024 | count++; | ||
3025 | } | ||
3026 | } | ||
3027 | /* write the addresses in reverse order to avoid write combining */ | ||
3028 | for (; rar_entries > 0 ; rar_entries--) | ||
3029 | hw->mac.ops.clear_rar(hw, rar_entries); | ||
3030 | |||
3031 | return count; | ||
3032 | } | ||
3033 | |||
3034 | /** | ||
2998 | * ixgbe_set_rx_mode - Unicast, Multicast and Promiscuous mode set | 3035 | * ixgbe_set_rx_mode - Unicast, Multicast and Promiscuous mode set |
2999 | * @netdev: network interface device structure | 3036 | * @netdev: network interface device structure |
3000 | * | 3037 | * |
@@ -3007,38 +3044,58 @@ void ixgbe_set_rx_mode(struct net_device *netdev) | |||
3007 | { | 3044 | { |
3008 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | 3045 | struct ixgbe_adapter *adapter = netdev_priv(netdev); |
3009 | struct ixgbe_hw *hw = &adapter->hw; | 3046 | struct ixgbe_hw *hw = &adapter->hw; |
3010 | u32 fctrl; | 3047 | u32 fctrl, vmolr = IXGBE_VMOLR_BAM | IXGBE_VMOLR_AUPE; |
3048 | int count; | ||
3011 | 3049 | ||
3012 | /* Check for Promiscuous and All Multicast modes */ | 3050 | /* Check for Promiscuous and All Multicast modes */ |
3013 | 3051 | ||
3014 | fctrl = IXGBE_READ_REG(hw, IXGBE_FCTRL); | 3052 | fctrl = IXGBE_READ_REG(hw, IXGBE_FCTRL); |
3015 | 3053 | ||
3054 | /* clear the bits we are changing the status of */ | ||
3055 | fctrl &= ~(IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE); | ||
3056 | |||
3016 | if (netdev->flags & IFF_PROMISC) { | 3057 | if (netdev->flags & IFF_PROMISC) { |
3017 | hw->addr_ctrl.user_set_promisc = true; | 3058 | hw->addr_ctrl.user_set_promisc = true; |
3018 | fctrl |= (IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE); | 3059 | fctrl |= (IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE); |
3060 | vmolr |= (IXGBE_VMOLR_ROPE | IXGBE_VMOLR_MPE); | ||
3019 | /* don't hardware filter vlans in promisc mode */ | 3061 | /* don't hardware filter vlans in promisc mode */ |
3020 | ixgbe_vlan_filter_disable(adapter); | 3062 | ixgbe_vlan_filter_disable(adapter); |
3021 | } else { | 3063 | } else { |
3022 | if (netdev->flags & IFF_ALLMULTI) { | 3064 | if (netdev->flags & IFF_ALLMULTI) { |
3023 | fctrl |= IXGBE_FCTRL_MPE; | 3065 | fctrl |= IXGBE_FCTRL_MPE; |
3024 | fctrl &= ~IXGBE_FCTRL_UPE; | 3066 | vmolr |= IXGBE_VMOLR_MPE; |
3025 | } else if (!hw->addr_ctrl.uc_set_promisc) { | 3067 | } else { |
3026 | fctrl &= ~(IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE); | 3068 | /* |
3069 | * Write addresses to the MTA, if the attempt fails | ||
3070 | * then we should just turn on promiscous mode so | ||
3071 | * that we can at least receive multicast traffic | ||
3072 | */ | ||
3073 | hw->mac.ops.update_mc_addr_list(hw, netdev); | ||
3074 | vmolr |= IXGBE_VMOLR_ROMPE; | ||
3027 | } | 3075 | } |
3028 | ixgbe_vlan_filter_enable(adapter); | 3076 | ixgbe_vlan_filter_enable(adapter); |
3029 | hw->addr_ctrl.user_set_promisc = false; | 3077 | hw->addr_ctrl.user_set_promisc = false; |
3078 | /* | ||
3079 | * Write addresses to available RAR registers, if there is not | ||
3080 | * sufficient space to store all the addresses then enable | ||
3081 | * unicast promiscous mode | ||
3082 | */ | ||
3083 | count = ixgbe_write_uc_addr_list(netdev); | ||
3084 | if (count < 0) { | ||
3085 | fctrl |= IXGBE_FCTRL_UPE; | ||
3086 | vmolr |= IXGBE_VMOLR_ROPE; | ||
3087 | } | ||
3030 | } | 3088 | } |
3031 | 3089 | ||
3032 | IXGBE_WRITE_REG(hw, IXGBE_FCTRL, fctrl); | 3090 | if (adapter->num_vfs) { |
3033 | |||
3034 | /* reprogram secondary unicast list */ | ||
3035 | hw->mac.ops.update_uc_addr_list(hw, netdev); | ||
3036 | |||
3037 | /* reprogram multicast list */ | ||
3038 | hw->mac.ops.update_mc_addr_list(hw, netdev); | ||
3039 | |||
3040 | if (adapter->num_vfs) | ||
3041 | ixgbe_restore_vf_multicasts(adapter); | 3091 | ixgbe_restore_vf_multicasts(adapter); |
3092 | vmolr |= IXGBE_READ_REG(hw, IXGBE_VMOLR(adapter->num_vfs)) & | ||
3093 | ~(IXGBE_VMOLR_MPE | IXGBE_VMOLR_ROMPE | | ||
3094 | IXGBE_VMOLR_ROPE); | ||
3095 | IXGBE_WRITE_REG(hw, IXGBE_VMOLR(adapter->num_vfs), vmolr); | ||
3096 | } | ||
3097 | |||
3098 | IXGBE_WRITE_REG(hw, IXGBE_FCTRL, fctrl); | ||
3042 | } | 3099 | } |
3043 | 3100 | ||
3044 | static void ixgbe_napi_enable_all(struct ixgbe_adapter *adapter) | 3101 | static void ixgbe_napi_enable_all(struct ixgbe_adapter *adapter) |
@@ -3257,8 +3314,8 @@ static inline void ixgbe_rx_desc_queue_enable(struct ixgbe_adapter *adapter, | |||
3257 | msleep(1); | 3314 | msleep(1); |
3258 | } | 3315 | } |
3259 | if (k >= IXGBE_MAX_RX_DESC_POLL) { | 3316 | if (k >= IXGBE_MAX_RX_DESC_POLL) { |
3260 | DPRINTK(DRV, ERR, "RXDCTL.ENABLE on Rx queue %d " | 3317 | e_err(drv, "RXDCTL.ENABLE on Rx queue %d not set within " |
3261 | "not set within the polling period\n", rxr); | 3318 | "the polling period\n", rxr); |
3262 | } | 3319 | } |
3263 | ixgbe_release_rx_desc(&adapter->hw, adapter->rx_ring[rxr], | 3320 | ixgbe_release_rx_desc(&adapter->hw, adapter->rx_ring[rxr], |
3264 | (adapter->rx_ring[rxr]->count - 1)); | 3321 | (adapter->rx_ring[rxr]->count - 1)); |
@@ -3387,8 +3444,7 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter) | |||
3387 | } while (--wait_loop && | 3444 | } while (--wait_loop && |
3388 | !(txdctl & IXGBE_TXDCTL_ENABLE)); | 3445 | !(txdctl & IXGBE_TXDCTL_ENABLE)); |
3389 | if (!wait_loop) | 3446 | if (!wait_loop) |
3390 | DPRINTK(DRV, ERR, "Could not enable " | 3447 | e_err(drv, "Could not enable Tx Queue %d\n", j); |
3391 | "Tx Queue %d\n", j); | ||
3392 | } | 3448 | } |
3393 | } | 3449 | } |
3394 | 3450 | ||
@@ -3436,8 +3492,7 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter) | |||
3436 | if (adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE) { | 3492 | if (adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE) { |
3437 | u32 esdp = IXGBE_READ_REG(hw, IXGBE_ESDP); | 3493 | u32 esdp = IXGBE_READ_REG(hw, IXGBE_ESDP); |
3438 | if (esdp & IXGBE_ESDP_SDP1) | 3494 | if (esdp & IXGBE_ESDP_SDP1) |
3439 | DPRINTK(DRV, CRIT, | 3495 | e_crit(drv, "Fan has stopped, replace the adapter\n"); |
3440 | "Fan has stopped, replace the adapter\n"); | ||
3441 | } | 3496 | } |
3442 | 3497 | ||
3443 | /* | 3498 | /* |
@@ -3466,7 +3521,7 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter) | |||
3466 | } else { | 3521 | } else { |
3467 | err = ixgbe_non_sfp_link_config(hw); | 3522 | err = ixgbe_non_sfp_link_config(hw); |
3468 | if (err) | 3523 | if (err) |
3469 | DPRINTK(PROBE, ERR, "link_config FAILED %d\n", err); | 3524 | e_err(probe, "link_config FAILED %d\n", err); |
3470 | } | 3525 | } |
3471 | 3526 | ||
3472 | for (i = 0; i < adapter->num_tx_queues; i++) | 3527 | for (i = 0; i < adapter->num_tx_queues; i++) |
@@ -3527,19 +3582,19 @@ void ixgbe_reset(struct ixgbe_adapter *adapter) | |||
3527 | case IXGBE_ERR_SFP_NOT_PRESENT: | 3582 | case IXGBE_ERR_SFP_NOT_PRESENT: |
3528 | break; | 3583 | break; |
3529 | case IXGBE_ERR_MASTER_REQUESTS_PENDING: | 3584 | case IXGBE_ERR_MASTER_REQUESTS_PENDING: |
3530 | dev_err(&adapter->pdev->dev, "master disable timed out\n"); | 3585 | e_dev_err("master disable timed out\n"); |
3531 | break; | 3586 | break; |
3532 | case IXGBE_ERR_EEPROM_VERSION: | 3587 | case IXGBE_ERR_EEPROM_VERSION: |
3533 | /* We are running on a pre-production device, log a warning */ | 3588 | /* We are running on a pre-production device, log a warning */ |
3534 | dev_warn(&adapter->pdev->dev, "This device is a pre-production " | 3589 | e_dev_warn("This device is a pre-production adapter/LOM. " |
3535 | "adapter/LOM. Please be aware there may be issues " | 3590 | "Please be aware there may be issuesassociated with " |
3536 | "associated with your hardware. If you are " | 3591 | "your hardware. If you are experiencing problems " |
3537 | "experiencing problems please contact your Intel or " | 3592 | "please contact your Intel or hardware " |
3538 | "hardware representative who provided you with this " | 3593 | "representative who provided you with this " |
3539 | "hardware.\n"); | 3594 | "hardware.\n"); |
3540 | break; | 3595 | break; |
3541 | default: | 3596 | default: |
3542 | dev_err(&adapter->pdev->dev, "Hardware Error: %d\n", err); | 3597 | e_dev_err("Hardware Error: %d\n", err); |
3543 | } | 3598 | } |
3544 | 3599 | ||
3545 | /* reprogram the RAR[0] in case user changed it. */ | 3600 | /* reprogram the RAR[0] in case user changed it. */ |
@@ -3920,12 +3975,12 @@ static inline bool ixgbe_set_fcoe_queues(struct ixgbe_adapter *adapter) | |||
3920 | adapter->num_tx_queues = 1; | 3975 | adapter->num_tx_queues = 1; |
3921 | #ifdef CONFIG_IXGBE_DCB | 3976 | #ifdef CONFIG_IXGBE_DCB |
3922 | if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { | 3977 | if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { |
3923 | DPRINTK(PROBE, INFO, "FCoE enabled with DCB\n"); | 3978 | e_info(probe, "FCoE enabled with DCB\n"); |
3924 | ixgbe_set_dcb_queues(adapter); | 3979 | ixgbe_set_dcb_queues(adapter); |
3925 | } | 3980 | } |
3926 | #endif | 3981 | #endif |
3927 | if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) { | 3982 | if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) { |
3928 | DPRINTK(PROBE, INFO, "FCoE enabled with RSS\n"); | 3983 | e_info(probe, "FCoE enabled with RSS\n"); |
3929 | if ((adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) || | 3984 | if ((adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) || |
3930 | (adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE)) | 3985 | (adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE)) |
3931 | ixgbe_set_fdir_queues(adapter); | 3986 | ixgbe_set_fdir_queues(adapter); |
@@ -4038,7 +4093,8 @@ static void ixgbe_acquire_msix_vectors(struct ixgbe_adapter *adapter, | |||
4038 | * This just means we'll go with either a single MSI | 4093 | * This just means we'll go with either a single MSI |
4039 | * vector or fall back to legacy interrupts. | 4094 | * vector or fall back to legacy interrupts. |
4040 | */ | 4095 | */ |
4041 | DPRINTK(HW, DEBUG, "Unable to allocate MSI-X interrupts\n"); | 4096 | netif_printk(adapter, hw, KERN_DEBUG, adapter->netdev, |
4097 | "Unable to allocate MSI-X interrupts\n"); | ||
4042 | adapter->flags &= ~IXGBE_FLAG_MSIX_ENABLED; | 4098 | adapter->flags &= ~IXGBE_FLAG_MSIX_ENABLED; |
4043 | kfree(adapter->msix_entries); | 4099 | kfree(adapter->msix_entries); |
4044 | adapter->msix_entries = NULL; | 4100 | adapter->msix_entries = NULL; |
@@ -4435,8 +4491,9 @@ static int ixgbe_set_interrupt_capability(struct ixgbe_adapter *adapter) | |||
4435 | if (!err) { | 4491 | if (!err) { |
4436 | adapter->flags |= IXGBE_FLAG_MSI_ENABLED; | 4492 | adapter->flags |= IXGBE_FLAG_MSI_ENABLED; |
4437 | } else { | 4493 | } else { |
4438 | DPRINTK(HW, DEBUG, "Unable to allocate MSI interrupt, " | 4494 | netif_printk(adapter, hw, KERN_DEBUG, adapter->netdev, |
4439 | "falling back to legacy. Error: %d\n", err); | 4495 | "Unable to allocate MSI interrupt, " |
4496 | "falling back to legacy. Error: %d\n", err); | ||
4440 | /* reset err */ | 4497 | /* reset err */ |
4441 | err = 0; | 4498 | err = 0; |
4442 | } | 4499 | } |
@@ -4557,27 +4614,25 @@ int ixgbe_init_interrupt_scheme(struct ixgbe_adapter *adapter) | |||
4557 | 4614 | ||
4558 | err = ixgbe_set_interrupt_capability(adapter); | 4615 | err = ixgbe_set_interrupt_capability(adapter); |
4559 | if (err) { | 4616 | if (err) { |
4560 | DPRINTK(PROBE, ERR, "Unable to setup interrupt capabilities\n"); | 4617 | e_dev_err("Unable to setup interrupt capabilities\n"); |
4561 | goto err_set_interrupt; | 4618 | goto err_set_interrupt; |
4562 | } | 4619 | } |
4563 | 4620 | ||
4564 | err = ixgbe_alloc_q_vectors(adapter); | 4621 | err = ixgbe_alloc_q_vectors(adapter); |
4565 | if (err) { | 4622 | if (err) { |
4566 | DPRINTK(PROBE, ERR, "Unable to allocate memory for queue " | 4623 | e_dev_err("Unable to allocate memory for queue vectors\n"); |
4567 | "vectors\n"); | ||
4568 | goto err_alloc_q_vectors; | 4624 | goto err_alloc_q_vectors; |
4569 | } | 4625 | } |
4570 | 4626 | ||
4571 | err = ixgbe_alloc_queues(adapter); | 4627 | err = ixgbe_alloc_queues(adapter); |
4572 | if (err) { | 4628 | if (err) { |
4573 | DPRINTK(PROBE, ERR, "Unable to allocate memory for queues\n"); | 4629 | e_dev_err("Unable to allocate memory for queues\n"); |
4574 | goto err_alloc_queues; | 4630 | goto err_alloc_queues; |
4575 | } | 4631 | } |
4576 | 4632 | ||
4577 | DPRINTK(DRV, INFO, "Multiqueue %s: Rx Queue count = %u, " | 4633 | e_dev_info("Multiqueue %s: Rx Queue count = %u, Tx Queue count = %u\n", |
4578 | "Tx Queue count = %u\n", | 4634 | (adapter->num_rx_queues > 1) ? "Enabled" : "Disabled", |
4579 | (adapter->num_rx_queues > 1) ? "Enabled" : | 4635 | adapter->num_rx_queues, adapter->num_tx_queues); |
4580 | "Disabled", adapter->num_rx_queues, adapter->num_tx_queues); | ||
4581 | 4636 | ||
4582 | set_bit(__IXGBE_DOWN, &adapter->state); | 4637 | set_bit(__IXGBE_DOWN, &adapter->state); |
4583 | 4638 | ||
@@ -4648,15 +4703,13 @@ static void ixgbe_sfp_task(struct work_struct *work) | |||
4648 | goto reschedule; | 4703 | goto reschedule; |
4649 | ret = hw->phy.ops.reset(hw); | 4704 | ret = hw->phy.ops.reset(hw); |
4650 | if (ret == IXGBE_ERR_SFP_NOT_SUPPORTED) { | 4705 | if (ret == IXGBE_ERR_SFP_NOT_SUPPORTED) { |
4651 | dev_err(&adapter->pdev->dev, "failed to initialize " | 4706 | e_dev_err("failed to initialize because an unsupported " |
4652 | "because an unsupported SFP+ module type " | 4707 | "SFP+ module type was detected.\n"); |
4653 | "was detected.\n" | 4708 | e_dev_err("Reload the driver after installing a " |
4654 | "Reload the driver after installing a " | 4709 | "supported module.\n"); |
4655 | "supported module.\n"); | ||
4656 | unregister_netdev(adapter->netdev); | 4710 | unregister_netdev(adapter->netdev); |
4657 | } else { | 4711 | } else { |
4658 | DPRINTK(PROBE, INFO, "detected SFP+: %d\n", | 4712 | e_info(probe, "detected SFP+: %d\n", hw->phy.sfp_type); |
4659 | hw->phy.sfp_type); | ||
4660 | } | 4713 | } |
4661 | /* don't need this routine any more */ | 4714 | /* don't need this routine any more */ |
4662 | clear_bit(__IXGBE_SFP_MODULE_NOT_FOUND, &adapter->state); | 4715 | clear_bit(__IXGBE_SFP_MODULE_NOT_FOUND, &adapter->state); |
@@ -4730,6 +4783,7 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter) | |||
4730 | #ifdef CONFIG_IXGBE_DCB | 4783 | #ifdef CONFIG_IXGBE_DCB |
4731 | /* Default traffic class to use for FCoE */ | 4784 | /* Default traffic class to use for FCoE */ |
4732 | adapter->fcoe.tc = IXGBE_FCOE_DEFTC; | 4785 | adapter->fcoe.tc = IXGBE_FCOE_DEFTC; |
4786 | adapter->fcoe.up = IXGBE_FCOE_DEFTC; | ||
4733 | #endif | 4787 | #endif |
4734 | #endif /* IXGBE_FCOE */ | 4788 | #endif /* IXGBE_FCOE */ |
4735 | } | 4789 | } |
@@ -4783,7 +4837,7 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter) | |||
4783 | 4837 | ||
4784 | /* initialize eeprom parameters */ | 4838 | /* initialize eeprom parameters */ |
4785 | if (ixgbe_init_eeprom_params_generic(hw)) { | 4839 | if (ixgbe_init_eeprom_params_generic(hw)) { |
4786 | dev_err(&pdev->dev, "EEPROM initialization failed\n"); | 4840 | e_dev_err("EEPROM initialization failed\n"); |
4787 | return -EIO; | 4841 | return -EIO; |
4788 | } | 4842 | } |
4789 | 4843 | ||
@@ -4836,8 +4890,7 @@ int ixgbe_setup_tx_resources(struct ixgbe_adapter *adapter, | |||
4836 | err: | 4890 | err: |
4837 | vfree(tx_ring->tx_buffer_info); | 4891 | vfree(tx_ring->tx_buffer_info); |
4838 | tx_ring->tx_buffer_info = NULL; | 4892 | tx_ring->tx_buffer_info = NULL; |
4839 | DPRINTK(PROBE, ERR, "Unable to allocate memory for the transmit " | 4893 | e_err(probe, "Unable to allocate memory for the Tx descriptor ring\n"); |
4840 | "descriptor ring\n"); | ||
4841 | return -ENOMEM; | 4894 | return -ENOMEM; |
4842 | } | 4895 | } |
4843 | 4896 | ||
@@ -4859,7 +4912,7 @@ static int ixgbe_setup_all_tx_resources(struct ixgbe_adapter *adapter) | |||
4859 | err = ixgbe_setup_tx_resources(adapter, adapter->tx_ring[i]); | 4912 | err = ixgbe_setup_tx_resources(adapter, adapter->tx_ring[i]); |
4860 | if (!err) | 4913 | if (!err) |
4861 | continue; | 4914 | continue; |
4862 | DPRINTK(PROBE, ERR, "Allocation for Tx Queue %u failed\n", i); | 4915 | e_err(probe, "Allocation for Tx Queue %u failed\n", i); |
4863 | break; | 4916 | break; |
4864 | } | 4917 | } |
4865 | 4918 | ||
@@ -4884,8 +4937,8 @@ int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter, | |||
4884 | if (!rx_ring->rx_buffer_info) | 4937 | if (!rx_ring->rx_buffer_info) |
4885 | rx_ring->rx_buffer_info = vmalloc(size); | 4938 | rx_ring->rx_buffer_info = vmalloc(size); |
4886 | if (!rx_ring->rx_buffer_info) { | 4939 | if (!rx_ring->rx_buffer_info) { |
4887 | DPRINTK(PROBE, ERR, | 4940 | e_err(probe, "vmalloc allocation failed for the Rx " |
4888 | "vmalloc allocation failed for the rx desc ring\n"); | 4941 | "descriptor ring\n"); |
4889 | goto alloc_failed; | 4942 | goto alloc_failed; |
4890 | } | 4943 | } |
4891 | memset(rx_ring->rx_buffer_info, 0, size); | 4944 | memset(rx_ring->rx_buffer_info, 0, size); |
@@ -4898,8 +4951,8 @@ int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter, | |||
4898 | &rx_ring->dma, GFP_KERNEL); | 4951 | &rx_ring->dma, GFP_KERNEL); |
4899 | 4952 | ||
4900 | if (!rx_ring->desc) { | 4953 | if (!rx_ring->desc) { |
4901 | DPRINTK(PROBE, ERR, | 4954 | e_err(probe, "Memory allocation failed for the Rx " |
4902 | "Memory allocation failed for the rx desc ring\n"); | 4955 | "descriptor ring\n"); |
4903 | vfree(rx_ring->rx_buffer_info); | 4956 | vfree(rx_ring->rx_buffer_info); |
4904 | goto alloc_failed; | 4957 | goto alloc_failed; |
4905 | } | 4958 | } |
@@ -4932,7 +4985,7 @@ static int ixgbe_setup_all_rx_resources(struct ixgbe_adapter *adapter) | |||
4932 | err = ixgbe_setup_rx_resources(adapter, adapter->rx_ring[i]); | 4985 | err = ixgbe_setup_rx_resources(adapter, adapter->rx_ring[i]); |
4933 | if (!err) | 4986 | if (!err) |
4934 | continue; | 4987 | continue; |
4935 | DPRINTK(PROBE, ERR, "Allocation for Rx Queue %u failed\n", i); | 4988 | e_err(probe, "Allocation for Rx Queue %u failed\n", i); |
4936 | break; | 4989 | break; |
4937 | } | 4990 | } |
4938 | 4991 | ||
@@ -5031,8 +5084,7 @@ static int ixgbe_change_mtu(struct net_device *netdev, int new_mtu) | |||
5031 | if ((new_mtu < 68) || (max_frame > IXGBE_MAX_JUMBO_FRAME_SIZE)) | 5084 | if ((new_mtu < 68) || (max_frame > IXGBE_MAX_JUMBO_FRAME_SIZE)) |
5032 | return -EINVAL; | 5085 | return -EINVAL; |
5033 | 5086 | ||
5034 | DPRINTK(PROBE, INFO, "changing MTU from %d to %d\n", | 5087 | e_info(probe, "changing MTU from %d to %d\n", netdev->mtu, new_mtu); |
5035 | netdev->mtu, new_mtu); | ||
5036 | /* must set new MTU before calling down or up */ | 5088 | /* must set new MTU before calling down or up */ |
5037 | netdev->mtu = new_mtu; | 5089 | netdev->mtu = new_mtu; |
5038 | 5090 | ||
@@ -5145,8 +5197,7 @@ static int ixgbe_resume(struct pci_dev *pdev) | |||
5145 | 5197 | ||
5146 | err = pci_enable_device_mem(pdev); | 5198 | err = pci_enable_device_mem(pdev); |
5147 | if (err) { | 5199 | if (err) { |
5148 | printk(KERN_ERR "ixgbe: Cannot enable PCI device from " | 5200 | e_dev_err("Cannot enable PCI device from suspend\n"); |
5149 | "suspend\n"); | ||
5150 | return err; | 5201 | return err; |
5151 | } | 5202 | } |
5152 | pci_set_master(pdev); | 5203 | pci_set_master(pdev); |
@@ -5155,8 +5206,7 @@ static int ixgbe_resume(struct pci_dev *pdev) | |||
5155 | 5206 | ||
5156 | err = ixgbe_init_interrupt_scheme(adapter); | 5207 | err = ixgbe_init_interrupt_scheme(adapter); |
5157 | if (err) { | 5208 | if (err) { |
5158 | printk(KERN_ERR "ixgbe: Cannot initialize interrupts for " | 5209 | e_dev_err("Cannot initialize interrupts for device\n"); |
5159 | "device\n"); | ||
5160 | return err; | 5210 | return err; |
5161 | } | 5211 | } |
5162 | 5212 | ||
@@ -5517,10 +5567,10 @@ static void ixgbe_sfp_config_module_task(struct work_struct *work) | |||
5517 | err = hw->phy.ops.identify_sfp(hw); | 5567 | err = hw->phy.ops.identify_sfp(hw); |
5518 | 5568 | ||
5519 | if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { | 5569 | if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { |
5520 | dev_err(&adapter->pdev->dev, "failed to initialize because " | 5570 | e_dev_err("failed to initialize because an unsupported SFP+ " |
5521 | "an unsupported SFP+ module type was detected.\n" | 5571 | "module type was detected.\n"); |
5522 | "Reload the driver after installing a supported " | 5572 | e_dev_err("Reload the driver after installing a supported " |
5523 | "module.\n"); | 5573 | "module.\n"); |
5524 | unregister_netdev(adapter->netdev); | 5574 | unregister_netdev(adapter->netdev); |
5525 | return; | 5575 | return; |
5526 | } | 5576 | } |
@@ -5549,8 +5599,8 @@ static void ixgbe_fdir_reinit_task(struct work_struct *work) | |||
5549 | set_bit(__IXGBE_FDIR_INIT_DONE, | 5599 | set_bit(__IXGBE_FDIR_INIT_DONE, |
5550 | &(adapter->tx_ring[i]->reinit_state)); | 5600 | &(adapter->tx_ring[i]->reinit_state)); |
5551 | } else { | 5601 | } else { |
5552 | DPRINTK(PROBE, ERR, "failed to finish FDIR re-initialization, " | 5602 | e_err(probe, "failed to finish FDIR re-initialization, " |
5553 | "ignored adding FDIR ATR filters\n"); | 5603 | "ignored adding FDIR ATR filters\n"); |
5554 | } | 5604 | } |
5555 | /* Done FDIR Re-initialization, enable transmits */ | 5605 | /* Done FDIR Re-initialization, enable transmits */ |
5556 | netif_tx_start_all_queues(adapter->netdev); | 5606 | netif_tx_start_all_queues(adapter->netdev); |
@@ -5621,16 +5671,14 @@ static void ixgbe_watchdog_task(struct work_struct *work) | |||
5621 | flow_tx = !!(rmcs & IXGBE_RMCS_TFCE_802_3X); | 5671 | flow_tx = !!(rmcs & IXGBE_RMCS_TFCE_802_3X); |
5622 | } | 5672 | } |
5623 | 5673 | ||
5624 | printk(KERN_INFO "ixgbe: %s NIC Link is Up %s, " | 5674 | e_info(drv, "NIC Link is Up %s, Flow Control: %s\n", |
5625 | "Flow Control: %s\n", | ||
5626 | netdev->name, | ||
5627 | (link_speed == IXGBE_LINK_SPEED_10GB_FULL ? | 5675 | (link_speed == IXGBE_LINK_SPEED_10GB_FULL ? |
5628 | "10 Gbps" : | 5676 | "10 Gbps" : |
5629 | (link_speed == IXGBE_LINK_SPEED_1GB_FULL ? | 5677 | (link_speed == IXGBE_LINK_SPEED_1GB_FULL ? |
5630 | "1 Gbps" : "unknown speed")), | 5678 | "1 Gbps" : "unknown speed")), |
5631 | ((flow_rx && flow_tx) ? "RX/TX" : | 5679 | ((flow_rx && flow_tx) ? "RX/TX" : |
5632 | (flow_rx ? "RX" : | 5680 | (flow_rx ? "RX" : |
5633 | (flow_tx ? "TX" : "None")))); | 5681 | (flow_tx ? "TX" : "None")))); |
5634 | 5682 | ||
5635 | netif_carrier_on(netdev); | 5683 | netif_carrier_on(netdev); |
5636 | } else { | 5684 | } else { |
@@ -5641,8 +5689,7 @@ static void ixgbe_watchdog_task(struct work_struct *work) | |||
5641 | adapter->link_up = false; | 5689 | adapter->link_up = false; |
5642 | adapter->link_speed = 0; | 5690 | adapter->link_speed = 0; |
5643 | if (netif_carrier_ok(netdev)) { | 5691 | if (netif_carrier_ok(netdev)) { |
5644 | printk(KERN_INFO "ixgbe: %s NIC Link is Down\n", | 5692 | e_info(drv, "NIC Link is Down\n"); |
5645 | netdev->name); | ||
5646 | netif_carrier_off(netdev); | 5693 | netif_carrier_off(netdev); |
5647 | } | 5694 | } |
5648 | } | 5695 | } |
@@ -5818,9 +5865,9 @@ static bool ixgbe_tx_csum(struct ixgbe_adapter *adapter, | |||
5818 | break; | 5865 | break; |
5819 | default: | 5866 | default: |
5820 | if (unlikely(net_ratelimit())) { | 5867 | if (unlikely(net_ratelimit())) { |
5821 | DPRINTK(PROBE, WARNING, | 5868 | e_warn(probe, "partial checksum " |
5822 | "partial checksum but proto=%x!\n", | 5869 | "but proto=%x!\n", |
5823 | skb->protocol); | 5870 | skb->protocol); |
5824 | } | 5871 | } |
5825 | break; | 5872 | break; |
5826 | } | 5873 | } |
@@ -5931,7 +5978,7 @@ static int ixgbe_tx_map(struct ixgbe_adapter *adapter, | |||
5931 | return count; | 5978 | return count; |
5932 | 5979 | ||
5933 | dma_error: | 5980 | dma_error: |
5934 | dev_err(&pdev->dev, "TX DMA map failed\n"); | 5981 | e_dev_err("TX DMA map failed\n"); |
5935 | 5982 | ||
5936 | /* clear timestamp and dma mappings for failed tx_buffer_info map */ | 5983 | /* clear timestamp and dma mappings for failed tx_buffer_info map */ |
5937 | tx_buffer_info->dma = 0; | 5984 | tx_buffer_info->dma = 0; |
@@ -6101,21 +6148,26 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb) | |||
6101 | struct ixgbe_adapter *adapter = netdev_priv(dev); | 6148 | struct ixgbe_adapter *adapter = netdev_priv(dev); |
6102 | int txq = smp_processor_id(); | 6149 | int txq = smp_processor_id(); |
6103 | 6150 | ||
6151 | #ifdef IXGBE_FCOE | ||
6152 | if ((skb->protocol == htons(ETH_P_FCOE)) || | ||
6153 | (skb->protocol == htons(ETH_P_FIP))) { | ||
6154 | if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) { | ||
6155 | txq &= (adapter->ring_feature[RING_F_FCOE].indices - 1); | ||
6156 | txq += adapter->ring_feature[RING_F_FCOE].mask; | ||
6157 | return txq; | ||
6158 | } else if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { | ||
6159 | txq = adapter->fcoe.up; | ||
6160 | return txq; | ||
6161 | } | ||
6162 | } | ||
6163 | #endif | ||
6164 | |||
6104 | if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) { | 6165 | if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) { |
6105 | while (unlikely(txq >= dev->real_num_tx_queues)) | 6166 | while (unlikely(txq >= dev->real_num_tx_queues)) |
6106 | txq -= dev->real_num_tx_queues; | 6167 | txq -= dev->real_num_tx_queues; |
6107 | return txq; | 6168 | return txq; |
6108 | } | 6169 | } |
6109 | 6170 | ||
6110 | #ifdef IXGBE_FCOE | ||
6111 | if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) && | ||
6112 | ((skb->protocol == htons(ETH_P_FCOE)) || | ||
6113 | (skb->protocol == htons(ETH_P_FIP)))) { | ||
6114 | txq &= (adapter->ring_feature[RING_F_FCOE].indices - 1); | ||
6115 | txq += adapter->ring_feature[RING_F_FCOE].mask; | ||
6116 | return txq; | ||
6117 | } | ||
6118 | #endif | ||
6119 | if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { | 6171 | if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { |
6120 | if (skb->priority == TC_PRIO_CONTROL) | 6172 | if (skb->priority == TC_PRIO_CONTROL) |
6121 | txq = adapter->ring_feature[RING_F_DCB].indices-1; | 6173 | txq = adapter->ring_feature[RING_F_DCB].indices-1; |
@@ -6159,18 +6211,15 @@ static netdev_tx_t ixgbe_xmit_frame(struct sk_buff *skb, | |||
6159 | tx_ring = adapter->tx_ring[skb->queue_mapping]; | 6211 | tx_ring = adapter->tx_ring[skb->queue_mapping]; |
6160 | 6212 | ||
6161 | #ifdef IXGBE_FCOE | 6213 | #ifdef IXGBE_FCOE |
6162 | if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) { | 6214 | /* for FCoE with DCB, we force the priority to what |
6163 | #ifdef CONFIG_IXGBE_DCB | 6215 | * was specified by the switch */ |
6164 | /* for FCoE with DCB, we force the priority to what | 6216 | if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED && |
6165 | * was specified by the switch */ | 6217 | (skb->protocol == htons(ETH_P_FCOE) || |
6166 | if ((skb->protocol == htons(ETH_P_FCOE)) || | 6218 | skb->protocol == htons(ETH_P_FIP))) { |
6167 | (skb->protocol == htons(ETH_P_FIP))) { | 6219 | tx_flags &= ~(IXGBE_TX_FLAGS_VLAN_PRIO_MASK |
6168 | tx_flags &= ~(IXGBE_TX_FLAGS_VLAN_PRIO_MASK | 6220 | << IXGBE_TX_FLAGS_VLAN_SHIFT); |
6169 | << IXGBE_TX_FLAGS_VLAN_SHIFT); | 6221 | tx_flags |= ((adapter->fcoe.up << 13) |
6170 | tx_flags |= ((adapter->fcoe.up << 13) | 6222 | << IXGBE_TX_FLAGS_VLAN_SHIFT); |
6171 | << IXGBE_TX_FLAGS_VLAN_SHIFT); | ||
6172 | } | ||
6173 | #endif | ||
6174 | /* flag for FCoE offloads */ | 6223 | /* flag for FCoE offloads */ |
6175 | if (skb->protocol == htons(ETH_P_FCOE)) | 6224 | if (skb->protocol == htons(ETH_P_FCOE)) |
6176 | tx_flags |= IXGBE_TX_FLAGS_FCOE; | 6225 | tx_flags |= IXGBE_TX_FLAGS_FCOE; |
@@ -6430,8 +6479,7 @@ static void __devinit ixgbe_probe_vf(struct ixgbe_adapter *adapter, | |||
6430 | adapter->flags |= IXGBE_FLAG_SRIOV_ENABLED; | 6479 | adapter->flags |= IXGBE_FLAG_SRIOV_ENABLED; |
6431 | err = pci_enable_sriov(adapter->pdev, adapter->num_vfs); | 6480 | err = pci_enable_sriov(adapter->pdev, adapter->num_vfs); |
6432 | if (err) { | 6481 | if (err) { |
6433 | DPRINTK(PROBE, ERR, | 6482 | e_err(probe, "Failed to enable PCI sriov: %d\n", err); |
6434 | "Failed to enable PCI sriov: %d\n", err); | ||
6435 | goto err_novfs; | 6483 | goto err_novfs; |
6436 | } | 6484 | } |
6437 | /* If call to enable VFs succeeded then allocate memory | 6485 | /* If call to enable VFs succeeded then allocate memory |
@@ -6455,9 +6503,8 @@ static void __devinit ixgbe_probe_vf(struct ixgbe_adapter *adapter, | |||
6455 | } | 6503 | } |
6456 | 6504 | ||
6457 | /* Oh oh */ | 6505 | /* Oh oh */ |
6458 | DPRINTK(PROBE, ERR, | 6506 | e_err(probe, "Unable to allocate memory for VF Data Storage - " |
6459 | "Unable to allocate memory for VF " | 6507 | "SRIOV disabled\n"); |
6460 | "Data Storage - SRIOV disabled\n"); | ||
6461 | pci_disable_sriov(adapter->pdev); | 6508 | pci_disable_sriov(adapter->pdev); |
6462 | 6509 | ||
6463 | err_novfs: | 6510 | err_novfs: |
@@ -6514,8 +6561,8 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
6514 | err = dma_set_coherent_mask(&pdev->dev, | 6561 | err = dma_set_coherent_mask(&pdev->dev, |
6515 | DMA_BIT_MASK(32)); | 6562 | DMA_BIT_MASK(32)); |
6516 | if (err) { | 6563 | if (err) { |
6517 | dev_err(&pdev->dev, "No usable DMA " | 6564 | dev_err(&pdev->dev, |
6518 | "configuration, aborting\n"); | 6565 | "No usable DMA configuration, aborting\n"); |
6519 | goto err_dma; | 6566 | goto err_dma; |
6520 | } | 6567 | } |
6521 | } | 6568 | } |
@@ -6526,7 +6573,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
6526 | IORESOURCE_MEM), ixgbe_driver_name); | 6573 | IORESOURCE_MEM), ixgbe_driver_name); |
6527 | if (err) { | 6574 | if (err) { |
6528 | dev_err(&pdev->dev, | 6575 | dev_err(&pdev->dev, |
6529 | "pci_request_selected_regions failed 0x%x\n", err); | 6576 | "pci_request_selected_regions failed 0x%x\n", err); |
6530 | goto err_pci_reg; | 6577 | goto err_pci_reg; |
6531 | } | 6578 | } |
6532 | 6579 | ||
@@ -6637,8 +6684,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
6637 | if (adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE) { | 6684 | if (adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE) { |
6638 | u32 esdp = IXGBE_READ_REG(hw, IXGBE_ESDP); | 6685 | u32 esdp = IXGBE_READ_REG(hw, IXGBE_ESDP); |
6639 | if (esdp & IXGBE_ESDP_SDP1) | 6686 | if (esdp & IXGBE_ESDP_SDP1) |
6640 | DPRINTK(PROBE, CRIT, | 6687 | e_crit(probe, "Fan has stopped, replace the adapter\n"); |
6641 | "Fan has stopped, replace the adapter\n"); | ||
6642 | } | 6688 | } |
6643 | 6689 | ||
6644 | /* reset_hw fills in the perm_addr as well */ | 6690 | /* reset_hw fills in the perm_addr as well */ |
@@ -6657,13 +6703,13 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
6657 | round_jiffies(jiffies + (2 * HZ))); | 6703 | round_jiffies(jiffies + (2 * HZ))); |
6658 | err = 0; | 6704 | err = 0; |
6659 | } else if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { | 6705 | } else if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { |
6660 | dev_err(&adapter->pdev->dev, "failed to initialize because " | 6706 | e_dev_err("failed to initialize because an unsupported SFP+ " |
6661 | "an unsupported SFP+ module type was detected.\n" | 6707 | "module type was detected.\n"); |
6662 | "Reload the driver after installing a supported " | 6708 | e_dev_err("Reload the driver after installing a supported " |
6663 | "module.\n"); | 6709 | "module.\n"); |
6664 | goto err_sw_init; | 6710 | goto err_sw_init; |
6665 | } else if (err) { | 6711 | } else if (err) { |
6666 | dev_err(&adapter->pdev->dev, "HW Init failed: %d\n", err); | 6712 | e_dev_err("HW Init failed: %d\n", err); |
6667 | goto err_sw_init; | 6713 | goto err_sw_init; |
6668 | } | 6714 | } |
6669 | 6715 | ||
@@ -6707,6 +6753,11 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
6707 | adapter->flags &= ~IXGBE_FLAG_FCOE_CAPABLE; | 6753 | adapter->flags &= ~IXGBE_FLAG_FCOE_CAPABLE; |
6708 | } | 6754 | } |
6709 | } | 6755 | } |
6756 | if (adapter->flags & IXGBE_FLAG_FCOE_CAPABLE) { | ||
6757 | netdev->vlan_features |= NETIF_F_FCOE_CRC; | ||
6758 | netdev->vlan_features |= NETIF_F_FSO; | ||
6759 | netdev->vlan_features |= NETIF_F_FCOE_MTU; | ||
6760 | } | ||
6710 | #endif /* IXGBE_FCOE */ | 6761 | #endif /* IXGBE_FCOE */ |
6711 | if (pci_using_dac) | 6762 | if (pci_using_dac) |
6712 | netdev->features |= NETIF_F_HIGHDMA; | 6763 | netdev->features |= NETIF_F_HIGHDMA; |
@@ -6716,7 +6767,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
6716 | 6767 | ||
6717 | /* make sure the EEPROM is good */ | 6768 | /* make sure the EEPROM is good */ |
6718 | if (hw->eeprom.ops.validate_checksum(hw, NULL) < 0) { | 6769 | if (hw->eeprom.ops.validate_checksum(hw, NULL) < 0) { |
6719 | dev_err(&pdev->dev, "The EEPROM Checksum Is Not Valid\n"); | 6770 | e_dev_err("The EEPROM Checksum Is Not Valid\n"); |
6720 | err = -EIO; | 6771 | err = -EIO; |
6721 | goto err_eeprom; | 6772 | goto err_eeprom; |
6722 | } | 6773 | } |
@@ -6725,7 +6776,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
6725 | memcpy(netdev->perm_addr, hw->mac.perm_addr, netdev->addr_len); | 6776 | memcpy(netdev->perm_addr, hw->mac.perm_addr, netdev->addr_len); |
6726 | 6777 | ||
6727 | if (ixgbe_validate_mac_addr(netdev->perm_addr)) { | 6778 | if (ixgbe_validate_mac_addr(netdev->perm_addr)) { |
6728 | dev_err(&pdev->dev, "invalid MAC address\n"); | 6779 | e_dev_err("invalid MAC address\n"); |
6729 | err = -EIO; | 6780 | err = -EIO; |
6730 | goto err_eeprom; | 6781 | goto err_eeprom; |
6731 | } | 6782 | } |
@@ -6760,7 +6811,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
6760 | hw->mac.ops.get_bus_info(hw); | 6811 | hw->mac.ops.get_bus_info(hw); |
6761 | 6812 | ||
6762 | /* print bus type/speed/width info */ | 6813 | /* print bus type/speed/width info */ |
6763 | dev_info(&pdev->dev, "(PCI Express:%s:%s) %pM\n", | 6814 | e_dev_info("(PCI Express:%s:%s) %pM\n", |
6764 | ((hw->bus.speed == ixgbe_bus_speed_5000) ? "5.0Gb/s": | 6815 | ((hw->bus.speed == ixgbe_bus_speed_5000) ? "5.0Gb/s": |
6765 | (hw->bus.speed == ixgbe_bus_speed_2500) ? "2.5Gb/s":"Unknown"), | 6816 | (hw->bus.speed == ixgbe_bus_speed_2500) ? "2.5Gb/s":"Unknown"), |
6766 | ((hw->bus.width == ixgbe_bus_width_pcie_x8) ? "Width x8" : | 6817 | ((hw->bus.width == ixgbe_bus_width_pcie_x8) ? "Width x8" : |
@@ -6770,20 +6821,20 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
6770 | netdev->dev_addr); | 6821 | netdev->dev_addr); |
6771 | ixgbe_read_pba_num_generic(hw, &part_num); | 6822 | ixgbe_read_pba_num_generic(hw, &part_num); |
6772 | if (ixgbe_is_sfp(hw) && hw->phy.sfp_type != ixgbe_sfp_type_not_present) | 6823 | if (ixgbe_is_sfp(hw) && hw->phy.sfp_type != ixgbe_sfp_type_not_present) |
6773 | dev_info(&pdev->dev, "MAC: %d, PHY: %d, SFP+: %d, PBA No: %06x-%03x\n", | 6824 | e_dev_info("MAC: %d, PHY: %d, SFP+: %d, " |
6774 | hw->mac.type, hw->phy.type, hw->phy.sfp_type, | 6825 | "PBA No: %06x-%03x\n", |
6775 | (part_num >> 8), (part_num & 0xff)); | 6826 | hw->mac.type, hw->phy.type, hw->phy.sfp_type, |
6827 | (part_num >> 8), (part_num & 0xff)); | ||
6776 | else | 6828 | else |
6777 | dev_info(&pdev->dev, "MAC: %d, PHY: %d, PBA No: %06x-%03x\n", | 6829 | e_dev_info("MAC: %d, PHY: %d, PBA No: %06x-%03x\n", |
6778 | hw->mac.type, hw->phy.type, | 6830 | hw->mac.type, hw->phy.type, |
6779 | (part_num >> 8), (part_num & 0xff)); | 6831 | (part_num >> 8), (part_num & 0xff)); |
6780 | 6832 | ||
6781 | if (hw->bus.width <= ixgbe_bus_width_pcie_x4) { | 6833 | if (hw->bus.width <= ixgbe_bus_width_pcie_x4) { |
6782 | dev_warn(&pdev->dev, "PCI-Express bandwidth available for " | 6834 | e_dev_warn("PCI-Express bandwidth available for this card is " |
6783 | "this card is not sufficient for optimal " | 6835 | "not sufficient for optimal performance.\n"); |
6784 | "performance.\n"); | 6836 | e_dev_warn("For optimal performance a x8 PCI-Express slot " |
6785 | dev_warn(&pdev->dev, "For optimal performance a x8 " | 6837 | "is required.\n"); |
6786 | "PCI-Express slot is required.\n"); | ||
6787 | } | 6838 | } |
6788 | 6839 | ||
6789 | /* save off EEPROM version number */ | 6840 | /* save off EEPROM version number */ |
@@ -6794,12 +6845,12 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
6794 | 6845 | ||
6795 | if (err == IXGBE_ERR_EEPROM_VERSION) { | 6846 | if (err == IXGBE_ERR_EEPROM_VERSION) { |
6796 | /* We are running on a pre-production device, log a warning */ | 6847 | /* We are running on a pre-production device, log a warning */ |
6797 | dev_warn(&pdev->dev, "This device is a pre-production " | 6848 | e_dev_warn("This device is a pre-production adapter/LOM. " |
6798 | "adapter/LOM. Please be aware there may be issues " | 6849 | "Please be aware there may be issues associated " |
6799 | "associated with your hardware. If you are " | 6850 | "with your hardware. If you are experiencing " |
6800 | "experiencing problems please contact your Intel or " | 6851 | "problems please contact your Intel or hardware " |
6801 | "hardware representative who provided you with this " | 6852 | "representative who provided you with this " |
6802 | "hardware.\n"); | 6853 | "hardware.\n"); |
6803 | } | 6854 | } |
6804 | strcpy(netdev->name, "eth%d"); | 6855 | strcpy(netdev->name, "eth%d"); |
6805 | err = register_netdev(netdev); | 6856 | err = register_netdev(netdev); |
@@ -6822,8 +6873,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
6822 | } | 6873 | } |
6823 | #endif | 6874 | #endif |
6824 | if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) { | 6875 | if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) { |
6825 | DPRINTK(PROBE, INFO, "IOV is enabled with %d VFs\n", | 6876 | e_info(probe, "IOV is enabled with %d VFs\n", adapter->num_vfs); |
6826 | adapter->num_vfs); | ||
6827 | for (i = 0; i < adapter->num_vfs; i++) | 6877 | for (i = 0; i < adapter->num_vfs; i++) |
6828 | ixgbe_vf_configuration(pdev, (i | 0x10000000)); | 6878 | ixgbe_vf_configuration(pdev, (i | 0x10000000)); |
6829 | } | 6879 | } |
@@ -6831,7 +6881,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
6831 | /* add san mac addr to netdev */ | 6881 | /* add san mac addr to netdev */ |
6832 | ixgbe_add_sanmac_netdev(netdev); | 6882 | ixgbe_add_sanmac_netdev(netdev); |
6833 | 6883 | ||
6834 | dev_info(&pdev->dev, "Intel(R) 10 Gigabit Network Connection\n"); | 6884 | e_dev_info("Intel(R) 10 Gigabit Network Connection\n"); |
6835 | cards_found++; | 6885 | cards_found++; |
6836 | return 0; | 6886 | return 0; |
6837 | 6887 | ||
@@ -6921,7 +6971,7 @@ static void __devexit ixgbe_remove(struct pci_dev *pdev) | |||
6921 | pci_release_selected_regions(pdev, pci_select_bars(pdev, | 6971 | pci_release_selected_regions(pdev, pci_select_bars(pdev, |
6922 | IORESOURCE_MEM)); | 6972 | IORESOURCE_MEM)); |
6923 | 6973 | ||
6924 | DPRINTK(PROBE, INFO, "complete\n"); | 6974 | e_dev_info("complete\n"); |
6925 | 6975 | ||
6926 | free_netdev(netdev); | 6976 | free_netdev(netdev); |
6927 | 6977 | ||
@@ -6971,8 +7021,7 @@ static pci_ers_result_t ixgbe_io_slot_reset(struct pci_dev *pdev) | |||
6971 | int err; | 7021 | int err; |
6972 | 7022 | ||
6973 | if (pci_enable_device_mem(pdev)) { | 7023 | if (pci_enable_device_mem(pdev)) { |
6974 | DPRINTK(PROBE, ERR, | 7024 | e_err(probe, "Cannot re-enable PCI device after reset.\n"); |
6975 | "Cannot re-enable PCI device after reset.\n"); | ||
6976 | result = PCI_ERS_RESULT_DISCONNECT; | 7025 | result = PCI_ERS_RESULT_DISCONNECT; |
6977 | } else { | 7026 | } else { |
6978 | pci_set_master(pdev); | 7027 | pci_set_master(pdev); |
@@ -6988,8 +7037,8 @@ static pci_ers_result_t ixgbe_io_slot_reset(struct pci_dev *pdev) | |||
6988 | 7037 | ||
6989 | err = pci_cleanup_aer_uncorrect_error_status(pdev); | 7038 | err = pci_cleanup_aer_uncorrect_error_status(pdev); |
6990 | if (err) { | 7039 | if (err) { |
6991 | dev_err(&pdev->dev, | 7040 | e_dev_err("pci_cleanup_aer_uncorrect_error_status " |
6992 | "pci_cleanup_aer_uncorrect_error_status failed 0x%0x\n", err); | 7041 | "failed 0x%0x\n", err); |
6993 | /* non-fatal, continue */ | 7042 | /* non-fatal, continue */ |
6994 | } | 7043 | } |
6995 | 7044 | ||
@@ -7010,7 +7059,7 @@ static void ixgbe_io_resume(struct pci_dev *pdev) | |||
7010 | 7059 | ||
7011 | if (netif_running(netdev)) { | 7060 | if (netif_running(netdev)) { |
7012 | if (ixgbe_up(adapter)) { | 7061 | if (ixgbe_up(adapter)) { |
7013 | DPRINTK(PROBE, INFO, "ixgbe_up failed after reset\n"); | 7062 | e_info(probe, "ixgbe_up failed after reset\n"); |
7014 | return; | 7063 | return; |
7015 | } | 7064 | } |
7016 | } | 7065 | } |
@@ -7046,10 +7095,9 @@ static struct pci_driver ixgbe_driver = { | |||
7046 | static int __init ixgbe_init_module(void) | 7095 | static int __init ixgbe_init_module(void) |
7047 | { | 7096 | { |
7048 | int ret; | 7097 | int ret; |
7049 | printk(KERN_INFO "%s: %s - version %s\n", ixgbe_driver_name, | 7098 | pr_info("%s - version %s\n", ixgbe_driver_string, |
7050 | ixgbe_driver_string, ixgbe_driver_version); | 7099 | ixgbe_driver_version); |
7051 | 7100 | pr_info("%s\n", ixgbe_copyright); | |
7052 | printk(KERN_INFO "%s: %s\n", ixgbe_driver_name, ixgbe_copyright); | ||
7053 | 7101 | ||
7054 | #ifdef CONFIG_IXGBE_DCA | 7102 | #ifdef CONFIG_IXGBE_DCA |
7055 | dca_register_notify(&dca_notifier); | 7103 | dca_register_notify(&dca_notifier); |
@@ -7088,18 +7136,17 @@ static int ixgbe_notify_dca(struct notifier_block *nb, unsigned long event, | |||
7088 | } | 7136 | } |
7089 | 7137 | ||
7090 | #endif /* CONFIG_IXGBE_DCA */ | 7138 | #endif /* CONFIG_IXGBE_DCA */ |
7091 | #ifdef DEBUG | 7139 | |
7092 | /** | 7140 | /** |
7093 | * ixgbe_get_hw_dev_name - return device name string | 7141 | * ixgbe_get_hw_dev return device |
7094 | * used by hardware layer to print debugging information | 7142 | * used by hardware layer to print debugging information |
7095 | **/ | 7143 | **/ |
7096 | char *ixgbe_get_hw_dev_name(struct ixgbe_hw *hw) | 7144 | struct net_device *ixgbe_get_hw_dev(struct ixgbe_hw *hw) |
7097 | { | 7145 | { |
7098 | struct ixgbe_adapter *adapter = hw->back; | 7146 | struct ixgbe_adapter *adapter = hw->back; |
7099 | return adapter->netdev->name; | 7147 | return adapter->netdev; |
7100 | } | 7148 | } |
7101 | 7149 | ||
7102 | #endif | ||
7103 | module_exit(ixgbe_exit_module); | 7150 | module_exit(ixgbe_exit_module); |
7104 | 7151 | ||
7105 | /* ixgbe_main.c */ | 7152 | /* ixgbe_main.c */ |
diff --git a/drivers/net/ixgbe/ixgbe_phy.c b/drivers/net/ixgbe/ixgbe_phy.c index 48325a5beff2..6c0d42e33f21 100644 --- a/drivers/net/ixgbe/ixgbe_phy.c +++ b/drivers/net/ixgbe/ixgbe_phy.c | |||
@@ -577,6 +577,8 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) | |||
577 | * 6 SFP_SR/LR_CORE1 - 82599-specific | 577 | * 6 SFP_SR/LR_CORE1 - 82599-specific |
578 | * 7 SFP_act_lmt_DA_CORE0 - 82599-specific | 578 | * 7 SFP_act_lmt_DA_CORE0 - 82599-specific |
579 | * 8 SFP_act_lmt_DA_CORE1 - 82599-specific | 579 | * 8 SFP_act_lmt_DA_CORE1 - 82599-specific |
580 | * 9 SFP_1g_cu_CORE0 - 82599-specific | ||
581 | * 10 SFP_1g_cu_CORE1 - 82599-specific | ||
580 | */ | 582 | */ |
581 | if (hw->mac.type == ixgbe_mac_82598EB) { | 583 | if (hw->mac.type == ixgbe_mac_82598EB) { |
582 | if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) | 584 | if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) |
@@ -625,6 +627,13 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) | |||
625 | else | 627 | else |
626 | hw->phy.sfp_type = | 628 | hw->phy.sfp_type = |
627 | ixgbe_sfp_type_srlr_core1; | 629 | ixgbe_sfp_type_srlr_core1; |
630 | else if (comp_codes_1g & IXGBE_SFF_1GBASET_CAPABLE) | ||
631 | if (hw->bus.lan_id == 0) | ||
632 | hw->phy.sfp_type = | ||
633 | ixgbe_sfp_type_1g_cu_core0; | ||
634 | else | ||
635 | hw->phy.sfp_type = | ||
636 | ixgbe_sfp_type_1g_cu_core1; | ||
628 | else | 637 | else |
629 | hw->phy.sfp_type = ixgbe_sfp_type_unknown; | 638 | hw->phy.sfp_type = ixgbe_sfp_type_unknown; |
630 | } | 639 | } |
@@ -696,8 +705,10 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) | |||
696 | goto out; | 705 | goto out; |
697 | } | 706 | } |
698 | 707 | ||
699 | /* 1G SFP modules are not supported */ | 708 | /* Verify supported 1G SFP modules */ |
700 | if (comp_codes_10g == 0) { | 709 | if (comp_codes_10g == 0 && |
710 | !(hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core1 || | ||
711 | hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core0)) { | ||
701 | hw->phy.type = ixgbe_phy_sfp_unsupported; | 712 | hw->phy.type = ixgbe_phy_sfp_unsupported; |
702 | status = IXGBE_ERR_SFP_NOT_SUPPORTED; | 713 | status = IXGBE_ERR_SFP_NOT_SUPPORTED; |
703 | goto out; | 714 | goto out; |
@@ -711,7 +722,9 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) | |||
711 | 722 | ||
712 | /* This is guaranteed to be 82599, no need to check for NULL */ | 723 | /* This is guaranteed to be 82599, no need to check for NULL */ |
713 | hw->mac.ops.get_device_caps(hw, &enforce_sfp); | 724 | hw->mac.ops.get_device_caps(hw, &enforce_sfp); |
714 | if (!(enforce_sfp & IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP)) { | 725 | if (!(enforce_sfp & IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP) && |
726 | !((hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core0) || | ||
727 | (hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core1))) { | ||
715 | /* Make sure we're a supported PHY type */ | 728 | /* Make sure we're a supported PHY type */ |
716 | if (hw->phy.type == ixgbe_phy_sfp_intel) { | 729 | if (hw->phy.type == ixgbe_phy_sfp_intel) { |
717 | status = 0; | 730 | status = 0; |
@@ -742,6 +755,7 @@ s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw, | |||
742 | u16 *data_offset) | 755 | u16 *data_offset) |
743 | { | 756 | { |
744 | u16 sfp_id; | 757 | u16 sfp_id; |
758 | u16 sfp_type = hw->phy.sfp_type; | ||
745 | 759 | ||
746 | if (hw->phy.sfp_type == ixgbe_sfp_type_unknown) | 760 | if (hw->phy.sfp_type == ixgbe_sfp_type_unknown) |
747 | return IXGBE_ERR_SFP_NOT_SUPPORTED; | 761 | return IXGBE_ERR_SFP_NOT_SUPPORTED; |
@@ -753,6 +767,17 @@ s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw, | |||
753 | (hw->phy.sfp_type == ixgbe_sfp_type_da_cu)) | 767 | (hw->phy.sfp_type == ixgbe_sfp_type_da_cu)) |
754 | return IXGBE_ERR_SFP_NOT_SUPPORTED; | 768 | return IXGBE_ERR_SFP_NOT_SUPPORTED; |
755 | 769 | ||
770 | /* | ||
771 | * Limiting active cables and 1G Phys must be initialized as | ||
772 | * SR modules | ||
773 | */ | ||
774 | if (sfp_type == ixgbe_sfp_type_da_act_lmt_core0 || | ||
775 | sfp_type == ixgbe_sfp_type_1g_cu_core0) | ||
776 | sfp_type = ixgbe_sfp_type_srlr_core0; | ||
777 | else if (sfp_type == ixgbe_sfp_type_da_act_lmt_core1 || | ||
778 | sfp_type == ixgbe_sfp_type_1g_cu_core1) | ||
779 | sfp_type = ixgbe_sfp_type_srlr_core1; | ||
780 | |||
756 | /* Read offset to PHY init contents */ | 781 | /* Read offset to PHY init contents */ |
757 | hw->eeprom.ops.read(hw, IXGBE_PHY_INIT_OFFSET_NL, list_offset); | 782 | hw->eeprom.ops.read(hw, IXGBE_PHY_INIT_OFFSET_NL, list_offset); |
758 | 783 | ||
@@ -769,7 +794,7 @@ s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw, | |||
769 | hw->eeprom.ops.read(hw, *list_offset, &sfp_id); | 794 | hw->eeprom.ops.read(hw, *list_offset, &sfp_id); |
770 | 795 | ||
771 | while (sfp_id != IXGBE_PHY_INIT_END_NL) { | 796 | while (sfp_id != IXGBE_PHY_INIT_END_NL) { |
772 | if (sfp_id == hw->phy.sfp_type) { | 797 | if (sfp_id == sfp_type) { |
773 | (*list_offset)++; | 798 | (*list_offset)++; |
774 | hw->eeprom.ops.read(hw, *list_offset, data_offset); | 799 | hw->eeprom.ops.read(hw, *list_offset, data_offset); |
775 | if ((!*data_offset) || (*data_offset == 0xFFFF)) { | 800 | if ((!*data_offset) || (*data_offset == 0xFFFF)) { |
diff --git a/drivers/net/ixgbe/ixgbe_phy.h b/drivers/net/ixgbe/ixgbe_phy.h index ef4ba834c593..fb3898f12fc5 100644 --- a/drivers/net/ixgbe/ixgbe_phy.h +++ b/drivers/net/ixgbe/ixgbe_phy.h | |||
@@ -48,6 +48,7 @@ | |||
48 | #define IXGBE_SFF_DA_SPEC_ACTIVE_LIMITING 0x4 | 48 | #define IXGBE_SFF_DA_SPEC_ACTIVE_LIMITING 0x4 |
49 | #define IXGBE_SFF_1GBASESX_CAPABLE 0x1 | 49 | #define IXGBE_SFF_1GBASESX_CAPABLE 0x1 |
50 | #define IXGBE_SFF_1GBASELX_CAPABLE 0x2 | 50 | #define IXGBE_SFF_1GBASELX_CAPABLE 0x2 |
51 | #define IXGBE_SFF_1GBASET_CAPABLE 0x8 | ||
51 | #define IXGBE_SFF_10GBASESR_CAPABLE 0x10 | 52 | #define IXGBE_SFF_10GBASESR_CAPABLE 0x10 |
52 | #define IXGBE_SFF_10GBASELR_CAPABLE 0x20 | 53 | #define IXGBE_SFF_10GBASELR_CAPABLE 0x20 |
53 | #define IXGBE_I2C_EEPROM_READ_MASK 0x100 | 54 | #define IXGBE_I2C_EEPROM_READ_MASK 0x100 |
diff --git a/drivers/net/ixgbe/ixgbe_sriov.c b/drivers/net/ixgbe/ixgbe_sriov.c index f6cee94ec8e8..49661a138e22 100644 --- a/drivers/net/ixgbe/ixgbe_sriov.c +++ b/drivers/net/ixgbe/ixgbe_sriov.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | *******************************************************************************/ | 26 | *******************************************************************************/ |
27 | 27 | ||
28 | |||
29 | #include <linux/types.h> | 28 | #include <linux/types.h> |
30 | #include <linux/module.h> | 29 | #include <linux/module.h> |
31 | #include <linux/pci.h> | 30 | #include <linux/pci.h> |
@@ -138,6 +137,7 @@ static void ixgbe_set_vmvir(struct ixgbe_adapter *adapter, u32 vid, u32 vf) | |||
138 | inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf) | 137 | inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf) |
139 | { | 138 | { |
140 | struct ixgbe_hw *hw = &adapter->hw; | 139 | struct ixgbe_hw *hw = &adapter->hw; |
140 | int rar_entry = hw->mac.num_rar_entries - (vf + 1); | ||
141 | 141 | ||
142 | /* reset offloads to defaults */ | 142 | /* reset offloads to defaults */ |
143 | if (adapter->vfinfo[vf].pf_vlan) { | 143 | if (adapter->vfinfo[vf].pf_vlan) { |
@@ -159,26 +159,17 @@ inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf) | |||
159 | /* Flush and reset the mta with the new values */ | 159 | /* Flush and reset the mta with the new values */ |
160 | ixgbe_set_rx_mode(adapter->netdev); | 160 | ixgbe_set_rx_mode(adapter->netdev); |
161 | 161 | ||
162 | if (adapter->vfinfo[vf].rar > 0) { | 162 | hw->mac.ops.clear_rar(hw, rar_entry); |
163 | adapter->hw.mac.ops.clear_rar(&adapter->hw, | ||
164 | adapter->vfinfo[vf].rar); | ||
165 | adapter->vfinfo[vf].rar = -1; | ||
166 | } | ||
167 | } | 163 | } |
168 | 164 | ||
169 | int ixgbe_set_vf_mac(struct ixgbe_adapter *adapter, | 165 | int ixgbe_set_vf_mac(struct ixgbe_adapter *adapter, |
170 | int vf, unsigned char *mac_addr) | 166 | int vf, unsigned char *mac_addr) |
171 | { | 167 | { |
172 | struct ixgbe_hw *hw = &adapter->hw; | 168 | struct ixgbe_hw *hw = &adapter->hw; |
173 | 169 | int rar_entry = hw->mac.num_rar_entries - (vf + 1); | |
174 | adapter->vfinfo[vf].rar = hw->mac.ops.set_rar(hw, vf + 1, mac_addr, | ||
175 | vf, IXGBE_RAH_AV); | ||
176 | if (adapter->vfinfo[vf].rar < 0) { | ||
177 | DPRINTK(DRV, ERR, "Could not set MAC Filter for VF %d\n", vf); | ||
178 | return -1; | ||
179 | } | ||
180 | 170 | ||
181 | memcpy(adapter->vfinfo[vf].vf_mac_addresses, mac_addr, 6); | 171 | memcpy(adapter->vfinfo[vf].vf_mac_addresses, mac_addr, 6); |
172 | hw->mac.ops.set_rar(hw, rar_entry, mac_addr, vf, IXGBE_RAH_AV); | ||
182 | 173 | ||
183 | return 0; | 174 | return 0; |
184 | } | 175 | } |
@@ -194,11 +185,8 @@ int ixgbe_vf_configuration(struct pci_dev *pdev, unsigned int event_mask) | |||
194 | 185 | ||
195 | if (enable) { | 186 | if (enable) { |
196 | random_ether_addr(vf_mac_addr); | 187 | random_ether_addr(vf_mac_addr); |
197 | DPRINTK(PROBE, INFO, "IOV: VF %d is enabled " | 188 | e_info(probe, "IOV: VF %d is enabled MAC %pM\n", |
198 | "mac %02X:%02X:%02X:%02X:%02X:%02X\n", | 189 | vfn, vf_mac_addr); |
199 | vfn, | ||
200 | vf_mac_addr[0], vf_mac_addr[1], vf_mac_addr[2], | ||
201 | vf_mac_addr[3], vf_mac_addr[4], vf_mac_addr[5]); | ||
202 | /* | 190 | /* |
203 | * Store away the VF "permananet" MAC address, it will ask | 191 | * Store away the VF "permananet" MAC address, it will ask |
204 | * for it later. | 192 | * for it later. |
@@ -243,7 +231,7 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf) | |||
243 | retval = ixgbe_read_mbx(hw, msgbuf, mbx_size, vf); | 231 | retval = ixgbe_read_mbx(hw, msgbuf, mbx_size, vf); |
244 | 232 | ||
245 | if (retval) | 233 | if (retval) |
246 | printk(KERN_ERR "Error receiving message from VF\n"); | 234 | pr_err("Error receiving message from VF\n"); |
247 | 235 | ||
248 | /* this is a message we already processed, do nothing */ | 236 | /* this is a message we already processed, do nothing */ |
249 | if (msgbuf[0] & (IXGBE_VT_MSGTYPE_ACK | IXGBE_VT_MSGTYPE_NACK)) | 237 | if (msgbuf[0] & (IXGBE_VT_MSGTYPE_ACK | IXGBE_VT_MSGTYPE_NACK)) |
@@ -257,7 +245,7 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf) | |||
257 | if (msgbuf[0] == IXGBE_VF_RESET) { | 245 | if (msgbuf[0] == IXGBE_VF_RESET) { |
258 | unsigned char *vf_mac = adapter->vfinfo[vf].vf_mac_addresses; | 246 | unsigned char *vf_mac = adapter->vfinfo[vf].vf_mac_addresses; |
259 | u8 *addr = (u8 *)(&msgbuf[1]); | 247 | u8 *addr = (u8 *)(&msgbuf[1]); |
260 | DPRINTK(PROBE, INFO, "VF Reset msg received from vf %d\n", vf); | 248 | e_info(probe, "VF Reset msg received from vf %d\n", vf); |
261 | adapter->vfinfo[vf].clear_to_send = false; | 249 | adapter->vfinfo[vf].clear_to_send = false; |
262 | ixgbe_vf_reset_msg(adapter, vf); | 250 | ixgbe_vf_reset_msg(adapter, vf); |
263 | adapter->vfinfo[vf].clear_to_send = true; | 251 | adapter->vfinfo[vf].clear_to_send = true; |
@@ -310,7 +298,7 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf) | |||
310 | retval = ixgbe_set_vf_vlan(adapter, add, vid, vf); | 298 | retval = ixgbe_set_vf_vlan(adapter, add, vid, vf); |
311 | break; | 299 | break; |
312 | default: | 300 | default: |
313 | DPRINTK(DRV, ERR, "Unhandled Msg %8.8x\n", msgbuf[0]); | 301 | e_err(drv, "Unhandled Msg %8.8x\n", msgbuf[0]); |
314 | retval = IXGBE_ERR_MBX; | 302 | retval = IXGBE_ERR_MBX; |
315 | break; | 303 | break; |
316 | } | 304 | } |
diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h index cdd1998f18c7..9587d975d66c 100644 --- a/drivers/net/ixgbe/ixgbe_type.h +++ b/drivers/net/ixgbe/ixgbe_type.h | |||
@@ -2214,6 +2214,8 @@ enum ixgbe_sfp_type { | |||
2214 | ixgbe_sfp_type_srlr_core1 = 6, | 2214 | ixgbe_sfp_type_srlr_core1 = 6, |
2215 | ixgbe_sfp_type_da_act_lmt_core0 = 7, | 2215 | ixgbe_sfp_type_da_act_lmt_core0 = 7, |
2216 | ixgbe_sfp_type_da_act_lmt_core1 = 8, | 2216 | ixgbe_sfp_type_da_act_lmt_core1 = 8, |
2217 | ixgbe_sfp_type_1g_cu_core0 = 9, | ||
2218 | ixgbe_sfp_type_1g_cu_core1 = 10, | ||
2217 | ixgbe_sfp_type_not_present = 0xFFFE, | 2219 | ixgbe_sfp_type_not_present = 0xFFFE, |
2218 | ixgbe_sfp_type_unknown = 0xFFFF | 2220 | ixgbe_sfp_type_unknown = 0xFFFF |
2219 | }; | 2221 | }; |