]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
Merge branch 'work.uaccess2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[karo-tx-linux.git] / drivers / net / ethernet / intel / ixgbevf / ixgbevf_main.c
index d9d6616f02a4d97a214204344f3be8704d887f67..7eaac323404990073439d243e884801bee61db3c 100644 (file)
@@ -1612,7 +1612,7 @@ static void ixgbevf_configure_tx_ring(struct ixgbevf_adapter *adapter,
                txdctl = IXGBE_READ_REG(hw, IXGBE_VFTXDCTL(reg_idx));
        }  while (--wait_loop && !(txdctl & IXGBE_TXDCTL_ENABLE));
        if (!wait_loop)
-               pr_err("Could not enable Tx Queue %d\n", reg_idx);
+               hw_dbg(hw, "Could not enable Tx Queue %d\n", reg_idx);
 }
 
 /**
@@ -1810,8 +1810,10 @@ static void ixgbevf_configure_rx(struct ixgbevf_adapter *adapter)
        if (hw->mac.type >= ixgbe_mac_X550_vf)
                ixgbevf_setup_vfmrqc(adapter);
 
+       spin_lock_bh(&adapter->mbx_lock);
        /* notify the PF of our intent to use this size of frame */
        ret = hw->mac.ops.set_rlpml(hw, netdev->mtu + ETH_HLEN + ETH_FCS_LEN);
+       spin_unlock_bh(&adapter->mbx_lock);
        if (ret)
                dev_err(&adapter->pdev->dev,
                        "Failed to set MTU at %d\n", netdev->mtu);
@@ -2993,6 +2995,7 @@ static void ixgbevf_free_all_tx_resources(struct ixgbevf_adapter *adapter)
  **/
 int ixgbevf_setup_tx_resources(struct ixgbevf_ring *tx_ring)
 {
+       struct ixgbevf_adapter *adapter = netdev_priv(tx_ring->netdev);
        int size;
 
        size = sizeof(struct ixgbevf_tx_buffer) * tx_ring->count;
@@ -3757,8 +3760,10 @@ static int ixgbevf_change_mtu(struct net_device *netdev, int new_mtu)
        if ((new_mtu < 68) || (max_frame > max_possible_frame))
                return -EINVAL;
 
+       spin_lock_bh(&adapter->mbx_lock);
        /* notify the PF of our intent to use this size of frame */
        ret = hw->mac.ops.set_rlpml(hw, max_frame);
+       spin_unlock_bh(&adapter->mbx_lock);
        if (ret)
                return -EINVAL;