aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-09-24 08:21:49 -0400
committerDavid S. Miller <davem@davemloft.net>2016-09-24 08:21:49 -0400
commit3eb193e0b2ed447ac1d3dcc597cb9018c9f84611 (patch)
tree881035b712a2278f509240ef56854b1a1fae5666 /drivers/net/ethernet/intel
parent1678c1134fd4aa26ae498a31b1b90c6401da9af8 (diff)
parent0c339bf9ac2eed861d34a9dd40aee2a2d490ec36 (diff)
Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says: ==================== 10GbE Intel Wired LAN Driver Updates 2016-09-23 This series contains updates to ixgbe and ixgbevf. Emil provides several changes, first simplifies the logic for setting VLAN filtering by checking the VMDQ flag and the old 82598 MAC, instead of having to maintain a list of MAC types. Then made two functions static that are used only within the file, a by-product is sparse is now happy. Added spinlocks to make sure that the MTU configuration is handled properly. Fixed an issue where when SR-IOV is enabled while the ixgbevf driver is loaded would result in all mailbox requests being rejected by ixgbe, so call ixgbe_sriov_reinit() before pci_enable_sriov() to ensure mailbox requests are properly handled. Mark resolves a NULL pointer issue by simply setting the read and write *_ref_mdi pointers for x550em_a devices. Then clearly indicates within ethtool that all MACs support pause frames and made sure that the advertising is set to the requested mode. Fixed an issue where MDIO_PRTAD_NONE was not being used consistently to indicate no PHY address. Alex fixes an issue, where the support for multiple queues when SR-IOV is enabled was added but the support was not reported. With that, fix an issue where the hardware redirection table could support more queues then the PF currently has when SR-IOV is enabled, so use the RSS mask to trim off the bits that are not used. Lastly, instead of limiting the VFs if we do not use 4 queues for RSS in the PF, we can instead just limit the RSS queues used to a power of 2. We can now support use cases where VFs are using more queues than the PF is currently using and can support RSS if so desired. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c29
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c7
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c51
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c4
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c4
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c8
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c4
7 files changed, 62 insertions, 45 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index 9547191e26c9..f49f80380aa5 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -313,6 +313,25 @@ static int ixgbe_get_settings(struct net_device *netdev,
313 break; 313 break;
314 } 314 }
315 315
316 /* Indicate pause support */
317 ecmd->supported |= SUPPORTED_Pause;
318
319 switch (hw->fc.requested_mode) {
320 case ixgbe_fc_full:
321 ecmd->advertising |= ADVERTISED_Pause;
322 break;
323 case ixgbe_fc_rx_pause:
324 ecmd->advertising |= ADVERTISED_Pause |
325 ADVERTISED_Asym_Pause;
326 break;
327 case ixgbe_fc_tx_pause:
328 ecmd->advertising |= ADVERTISED_Asym_Pause;
329 break;
330 default:
331 ecmd->advertising &= ~(ADVERTISED_Pause |
332 ADVERTISED_Asym_Pause);
333 }
334
316 if (netif_carrier_ok(netdev)) { 335 if (netif_carrier_ok(netdev)) {
317 switch (adapter->link_speed) { 336 switch (adapter->link_speed) {
318 case IXGBE_LINK_SPEED_10GB_FULL: 337 case IXGBE_LINK_SPEED_10GB_FULL:
@@ -2928,9 +2947,13 @@ static u32 ixgbe_rss_indir_size(struct net_device *netdev)
2928static void ixgbe_get_reta(struct ixgbe_adapter *adapter, u32 *indir) 2947static void ixgbe_get_reta(struct ixgbe_adapter *adapter, u32 *indir)
2929{ 2948{
2930 int i, reta_size = ixgbe_rss_indir_tbl_entries(adapter); 2949 int i, reta_size = ixgbe_rss_indir_tbl_entries(adapter);
2950 u16 rss_m = adapter->ring_feature[RING_F_RSS].mask;
2951
2952 if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED)
2953 rss_m = adapter->ring_feature[RING_F_RSS].indices - 1;
2931 2954
2932 for (i = 0; i < reta_size; i++) 2955 for (i = 0; i < reta_size; i++)
2933 indir[i] = adapter->rss_indir_tbl[i]; 2956 indir[i] = adapter->rss_indir_tbl[i] & rss_m;
2934} 2957}
2935 2958
2936static int ixgbe_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key, 2959static int ixgbe_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key,
@@ -3041,8 +3064,8 @@ static unsigned int ixgbe_max_channels(struct ixgbe_adapter *adapter)
3041 /* We only support one q_vector without MSI-X */ 3064 /* We only support one q_vector without MSI-X */
3042 max_combined = 1; 3065 max_combined = 1;
3043 } else if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) { 3066 } else if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) {
3044 /* SR-IOV currently only allows one queue on the PF */ 3067 /* Limit value based on the queue mask */
3045 max_combined = 1; 3068 max_combined = adapter->ring_feature[RING_F_RSS].mask + 1;
3046 } else if (tcs > 1) { 3069 } else if (tcs > 1) {
3047 /* For DCB report channels per traffic class */ 3070 /* For DCB report channels per traffic class */
3048 if (adapter->hw.mac.type == ixgbe_mac_82598EB) { 3071 if (adapter->hw.mac.type == ixgbe_mac_82598EB) {
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
index bcdc88444ceb..15ab337fd7ad 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
@@ -515,15 +515,16 @@ static bool ixgbe_set_sriov_queues(struct ixgbe_adapter *adapter)
515 vmdq_i = min_t(u16, IXGBE_MAX_VMDQ_INDICES, vmdq_i); 515 vmdq_i = min_t(u16, IXGBE_MAX_VMDQ_INDICES, vmdq_i);
516 516
517 /* 64 pool mode with 2 queues per pool */ 517 /* 64 pool mode with 2 queues per pool */
518 if ((vmdq_i > 32) || (rss_i < 4) || (vmdq_i > 16 && pools)) { 518 if ((vmdq_i > 32) || (vmdq_i > 16 && pools)) {
519 vmdq_m = IXGBE_82599_VMDQ_2Q_MASK; 519 vmdq_m = IXGBE_82599_VMDQ_2Q_MASK;
520 rss_m = IXGBE_RSS_2Q_MASK; 520 rss_m = IXGBE_RSS_2Q_MASK;
521 rss_i = min_t(u16, rss_i, 2); 521 rss_i = min_t(u16, rss_i, 2);
522 /* 32 pool mode with 4 queues per pool */ 522 /* 32 pool mode with up to 4 queues per pool */
523 } else { 523 } else {
524 vmdq_m = IXGBE_82599_VMDQ_4Q_MASK; 524 vmdq_m = IXGBE_82599_VMDQ_4Q_MASK;
525 rss_m = IXGBE_RSS_4Q_MASK; 525 rss_m = IXGBE_RSS_4Q_MASK;
526 rss_i = 4; 526 /* We can support 4, 2, or 1 queues */
527 rss_i = (rss_i > 3) ? 4 : (rss_i > 1) ? 2 : 1;
527 } 528 }
528 529
529#ifdef IXGBE_FCOE 530#ifdef IXGBE_FCOE
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index d76bc1a313ea..a244d9a67264 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -3248,7 +3248,8 @@ static void ixgbe_setup_mtqc(struct ixgbe_adapter *adapter)
3248 mtqc |= IXGBE_MTQC_RT_ENA | IXGBE_MTQC_8TC_8TQ; 3248 mtqc |= IXGBE_MTQC_RT_ENA | IXGBE_MTQC_8TC_8TQ;
3249 else if (tcs > 1) 3249 else if (tcs > 1)
3250 mtqc |= IXGBE_MTQC_RT_ENA | IXGBE_MTQC_4TC_4TQ; 3250 mtqc |= IXGBE_MTQC_RT_ENA | IXGBE_MTQC_4TC_4TQ;
3251 else if (adapter->ring_feature[RING_F_RSS].indices == 4) 3251 else if (adapter->ring_feature[RING_F_VMDQ].mask ==
3252 IXGBE_82599_VMDQ_4Q_MASK)
3252 mtqc |= IXGBE_MTQC_32VF; 3253 mtqc |= IXGBE_MTQC_32VF;
3253 else 3254 else
3254 mtqc |= IXGBE_MTQC_64VF; 3255 mtqc |= IXGBE_MTQC_64VF;
@@ -3475,12 +3476,12 @@ static void ixgbe_setup_reta(struct ixgbe_adapter *adapter)
3475 u32 reta_entries = ixgbe_rss_indir_tbl_entries(adapter); 3476 u32 reta_entries = ixgbe_rss_indir_tbl_entries(adapter);
3476 u16 rss_i = adapter->ring_feature[RING_F_RSS].indices; 3477 u16 rss_i = adapter->ring_feature[RING_F_RSS].indices;
3477 3478
3478 /* Program table for at least 2 queues w/ SR-IOV so that VFs can 3479 /* Program table for at least 4 queues w/ SR-IOV so that VFs can
3479 * make full use of any rings they may have. We will use the 3480 * make full use of any rings they may have. We will use the
3480 * PSRTYPE register to control how many rings we use within the PF. 3481 * PSRTYPE register to control how many rings we use within the PF.
3481 */ 3482 */
3482 if ((adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) && (rss_i < 2)) 3483 if ((adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) && (rss_i < 4))
3483 rss_i = 2; 3484 rss_i = 4;
3484 3485
3485 /* Fill out hash function seeds */ 3486 /* Fill out hash function seeds */
3486 for (i = 0; i < 10; i++) 3487 for (i = 0; i < 10; i++)
@@ -3544,7 +3545,8 @@ static void ixgbe_setup_mrqc(struct ixgbe_adapter *adapter)
3544 mrqc = IXGBE_MRQC_VMDQRT8TCEN; /* 8 TCs */ 3545 mrqc = IXGBE_MRQC_VMDQRT8TCEN; /* 8 TCs */
3545 else if (tcs > 1) 3546 else if (tcs > 1)
3546 mrqc = IXGBE_MRQC_VMDQRT4TCEN; /* 4 TCs */ 3547 mrqc = IXGBE_MRQC_VMDQRT4TCEN; /* 4 TCs */
3547 else if (adapter->ring_feature[RING_F_RSS].indices == 4) 3548 else if (adapter->ring_feature[RING_F_VMDQ].mask ==
3549 IXGBE_82599_VMDQ_4Q_MASK)
3548 mrqc = IXGBE_MRQC_VMDQRSS32EN; 3550 mrqc = IXGBE_MRQC_VMDQRSS32EN;
3549 else 3551 else
3550 mrqc = IXGBE_MRQC_VMDQRSS64EN; 3552 mrqc = IXGBE_MRQC_VMDQRSS64EN;
@@ -4105,23 +4107,20 @@ static void ixgbe_vlan_promisc_enable(struct ixgbe_adapter *adapter)
4105 4107
4106 vlnctrl = IXGBE_READ_REG(hw, IXGBE_VLNCTRL); 4108 vlnctrl = IXGBE_READ_REG(hw, IXGBE_VLNCTRL);
4107 4109
4108 switch (hw->mac.type) { 4110 if (adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) {
4109 case ixgbe_mac_82599EB: 4111 /* For VMDq and SR-IOV we must leave VLAN filtering enabled */
4110 case ixgbe_mac_X540: 4112 vlnctrl |= IXGBE_VLNCTRL_VFE;
4111 case ixgbe_mac_X550: 4113 IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl);
4112 case ixgbe_mac_X550EM_x: 4114 } else {
4113 case ixgbe_mac_x550em_a:
4114 default:
4115 if (adapter->flags & IXGBE_FLAG_VMDQ_ENABLED)
4116 break;
4117 /* fall through */
4118 case ixgbe_mac_82598EB:
4119 /* legacy case, we can just disable VLAN filtering */
4120 vlnctrl &= ~IXGBE_VLNCTRL_VFE; 4115 vlnctrl &= ~IXGBE_VLNCTRL_VFE;
4121 IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl); 4116 IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl);
4122 return; 4117 return;
4123 } 4118 }
4124 4119
4120 /* Nothing to do for 82598 */
4121 if (hw->mac.type == ixgbe_mac_82598EB)
4122 return;
4123
4125 /* We are already in VLAN promisc, nothing to do */ 4124 /* We are already in VLAN promisc, nothing to do */
4126 if (adapter->flags2 & IXGBE_FLAG2_VLAN_PROMISC) 4125 if (adapter->flags2 & IXGBE_FLAG2_VLAN_PROMISC)
4127 return; 4126 return;
@@ -4129,10 +4128,6 @@ static void ixgbe_vlan_promisc_enable(struct ixgbe_adapter *adapter)
4129 /* Set flag so we don't redo unnecessary work */ 4128 /* Set flag so we don't redo unnecessary work */
4130 adapter->flags2 |= IXGBE_FLAG2_VLAN_PROMISC; 4129 adapter->flags2 |= IXGBE_FLAG2_VLAN_PROMISC;
4131 4130
4132 /* For VMDq and SR-IOV we must leave VLAN filtering enabled */
4133 vlnctrl |= IXGBE_VLNCTRL_VFE;
4134 IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl);
4135
4136 /* Add PF to all active pools */ 4131 /* Add PF to all active pools */
4137 for (i = IXGBE_VLVF_ENTRIES; --i;) { 4132 for (i = IXGBE_VLVF_ENTRIES; --i;) {
4138 u32 reg_offset = IXGBE_VLVFB(i * 2 + VMDQ_P(0) / 32); 4133 u32 reg_offset = IXGBE_VLVFB(i * 2 + VMDQ_P(0) / 32);
@@ -4204,19 +4199,9 @@ static void ixgbe_vlan_promisc_disable(struct ixgbe_adapter *adapter)
4204 vlnctrl |= IXGBE_VLNCTRL_VFE; 4199 vlnctrl |= IXGBE_VLNCTRL_VFE;
4205 IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl); 4200 IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl);
4206 4201
4207 switch (hw->mac.type) { 4202 if (!(adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) ||
4208 case ixgbe_mac_82599EB: 4203 hw->mac.type == ixgbe_mac_82598EB)
4209 case ixgbe_mac_X540:
4210 case ixgbe_mac_X550:
4211 case ixgbe_mac_X550EM_x:
4212 case ixgbe_mac_x550em_a:
4213 default:
4214 if (adapter->flags & IXGBE_FLAG_VMDQ_ENABLED)
4215 break;
4216 /* fall through */
4217 case ixgbe_mac_82598EB:
4218 return; 4204 return;
4219 }
4220 4205
4221 /* We are not in VLAN promisc, nothing to do */ 4206 /* We are not in VLAN promisc, nothing to do */
4222 if (!(adapter->flags2 & IXGBE_FLAG2_VLAN_PROMISC)) 4207 if (!(adapter->flags2 & IXGBE_FLAG2_VLAN_PROMISC))
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
index db0731e05401..021ab9b89c71 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
@@ -346,8 +346,8 @@ s32 ixgbe_identify_phy_generic(struct ixgbe_hw *hw)
346 return 0; 346 return 0;
347 } 347 }
348 } 348 }
349 /* clear value if nothing found */ 349 /* indicate no PHY found */
350 hw->phy.mdio.prtad = 0; 350 hw->phy.mdio.prtad = MDIO_PRTAD_NONE;
351 return IXGBE_ERR_PHY_ADDR_INVALID; 351 return IXGBE_ERR_PHY_ADDR_INVALID;
352 } 352 }
353 return 0; 353 return 0;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index b18590a995db..7e5d9850e4b2 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -329,13 +329,15 @@ static int ixgbe_pci_sriov_enable(struct pci_dev *dev, int num_vfs)
329 for (i = 0; i < adapter->num_vfs; i++) 329 for (i = 0; i < adapter->num_vfs; i++)
330 ixgbe_vf_configuration(dev, (i | 0x10000000)); 330 ixgbe_vf_configuration(dev, (i | 0x10000000));
331 331
332 /* reset before enabling SRIOV to avoid mailbox issues */
333 ixgbe_sriov_reinit(adapter);
334
332 err = pci_enable_sriov(dev, num_vfs); 335 err = pci_enable_sriov(dev, num_vfs);
333 if (err) { 336 if (err) {
334 e_dev_warn("Failed to enable PCI sriov: %d\n", err); 337 e_dev_warn("Failed to enable PCI sriov: %d\n", err);
335 return err; 338 return err;
336 } 339 }
337 ixgbe_get_vfs(adapter); 340 ixgbe_get_vfs(adapter);
338 ixgbe_sriov_reinit(adapter);
339 341
340 return num_vfs; 342 return num_vfs;
341#else 343#else
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
index e092a8929413..7e6b9267ca9d 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
@@ -1459,7 +1459,7 @@ ixgbe_setup_mac_link_sfp_x550a(struct ixgbe_hw *hw, ixgbe_link_speed speed,
1459 /* Configure internal PHY for KR/KX. */ 1459 /* Configure internal PHY for KR/KX. */
1460 ixgbe_setup_kr_speed_x550em(hw, speed); 1460 ixgbe_setup_kr_speed_x550em(hw, speed);
1461 1461
1462 if (!hw->phy.mdio.prtad || hw->phy.mdio.prtad == 0xFFFF) 1462 if (hw->phy.mdio.prtad == MDIO_PRTAD_NONE)
1463 return IXGBE_ERR_PHY_ADDR_INVALID; 1463 return IXGBE_ERR_PHY_ADDR_INVALID;
1464 1464
1465 /* Get external PHY device id */ 1465 /* Get external PHY device id */
@@ -2125,7 +2125,7 @@ static s32 ixgbe_reset_phy_t_X550em(struct ixgbe_hw *hw)
2125 * @hw: pointer to hardware structure 2125 * @hw: pointer to hardware structure
2126 * @led_idx: led number to turn on 2126 * @led_idx: led number to turn on
2127 **/ 2127 **/
2128s32 ixgbe_led_on_t_x550em(struct ixgbe_hw *hw, u32 led_idx) 2128static s32 ixgbe_led_on_t_x550em(struct ixgbe_hw *hw, u32 led_idx)
2129{ 2129{
2130 u16 phy_data; 2130 u16 phy_data;
2131 2131
@@ -2147,7 +2147,7 @@ s32 ixgbe_led_on_t_x550em(struct ixgbe_hw *hw, u32 led_idx)
2147 * @hw: pointer to hardware structure 2147 * @hw: pointer to hardware structure
2148 * @led_idx: led number to turn off 2148 * @led_idx: led number to turn off
2149 **/ 2149 **/
2150s32 ixgbe_led_off_t_x550em(struct ixgbe_hw *hw, u32 led_idx) 2150static s32 ixgbe_led_off_t_x550em(struct ixgbe_hw *hw, u32 led_idx)
2151{ 2151{
2152 u16 phy_data; 2152 u16 phy_data;
2153 2153
@@ -3049,6 +3049,8 @@ static const struct ixgbe_phy_operations phy_ops_x550em_a = {
3049 .identify = &ixgbe_identify_phy_x550em, 3049 .identify = &ixgbe_identify_phy_x550em,
3050 .read_reg = &ixgbe_read_phy_reg_x550a, 3050 .read_reg = &ixgbe_read_phy_reg_x550a,
3051 .write_reg = &ixgbe_write_phy_reg_x550a, 3051 .write_reg = &ixgbe_write_phy_reg_x550a,
3052 .read_reg_mdi = &ixgbe_read_phy_reg_mdi,
3053 .write_reg_mdi = &ixgbe_write_phy_reg_mdi,
3052}; 3054};
3053 3055
3054static const u32 ixgbe_mvals_X550[IXGBE_MVALS_IDX_LIMIT] = { 3056static const u32 ixgbe_mvals_X550[IXGBE_MVALS_IDX_LIMIT] = {
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 4044608083cd..7eaac3234049 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -1810,8 +1810,10 @@ static void ixgbevf_configure_rx(struct ixgbevf_adapter *adapter)
1810 if (hw->mac.type >= ixgbe_mac_X550_vf) 1810 if (hw->mac.type >= ixgbe_mac_X550_vf)
1811 ixgbevf_setup_vfmrqc(adapter); 1811 ixgbevf_setup_vfmrqc(adapter);
1812 1812
1813 spin_lock_bh(&adapter->mbx_lock);
1813 /* notify the PF of our intent to use this size of frame */ 1814 /* notify the PF of our intent to use this size of frame */
1814 ret = hw->mac.ops.set_rlpml(hw, netdev->mtu + ETH_HLEN + ETH_FCS_LEN); 1815 ret = hw->mac.ops.set_rlpml(hw, netdev->mtu + ETH_HLEN + ETH_FCS_LEN);
1816 spin_unlock_bh(&adapter->mbx_lock);
1815 if (ret) 1817 if (ret)
1816 dev_err(&adapter->pdev->dev, 1818 dev_err(&adapter->pdev->dev,
1817 "Failed to set MTU at %d\n", netdev->mtu); 1819 "Failed to set MTU at %d\n", netdev->mtu);
@@ -3758,8 +3760,10 @@ static int ixgbevf_change_mtu(struct net_device *netdev, int new_mtu)
3758 if ((new_mtu < 68) || (max_frame > max_possible_frame)) 3760 if ((new_mtu < 68) || (max_frame > max_possible_frame))
3759 return -EINVAL; 3761 return -EINVAL;
3760 3762
3763 spin_lock_bh(&adapter->mbx_lock);
3761 /* notify the PF of our intent to use this size of frame */ 3764 /* notify the PF of our intent to use this size of frame */
3762 ret = hw->mac.ops.set_rlpml(hw, max_frame); 3765 ret = hw->mac.ops.set_rlpml(hw, max_frame);
3766 spin_unlock_bh(&adapter->mbx_lock);
3763 if (ret) 3767 if (ret)
3764 return -EINVAL; 3768 return -EINVAL;
3765 3769