net/qede/base: revise tunnel APIs/structs
[dpdk.git] / drivers / net / ixgbe / base / ixgbe_vf.c
index 919b975..b513190 100644 (file)
@@ -64,6 +64,7 @@ s32 ixgbe_init_ops_vf(struct ixgbe_hw *hw)
        hw->mac.ops.get_mac_addr = ixgbe_get_mac_addr_vf;
        hw->mac.ops.stop_adapter = ixgbe_stop_adapter_vf;
        hw->mac.ops.get_bus_info = NULL;
+       hw->mac.ops.negotiate_api_version = ixgbevf_negotiate_api_version;
 
        /* Link */
        hw->mac.ops.setup_link = ixgbe_setup_mac_link_vf;
@@ -80,6 +81,7 @@ s32 ixgbe_init_ops_vf(struct ixgbe_hw *hw)
        hw->mac.ops.disable_mc = NULL;
        hw->mac.ops.clear_vfta = NULL;
        hw->mac.ops.set_vfta = ixgbe_set_vfta_vf;
+       hw->mac.ops.set_rlpml = ixgbevf_rlpml_set_vf;
 
        hw->mac.max_tx_queues = 1;
        hw->mac.max_rx_queues = 1;
@@ -430,6 +432,10 @@ s32 ixgbevf_update_xcast_mode(struct ixgbe_hw *hw, int xcast_mode)
 
        switch (hw->api_version) {
        case ixgbe_mbox_api_12:
+               /* New modes were introduced in 1.3 version */
+               if (xcast_mode > IXGBEVF_XCAST_MODE_ALLMULTI)
+                       return IXGBE_ERR_FEATURE_NOT_SUPPORTED;
+               /* Fall through */
        case ixgbe_mbox_api_13:
                break;
        default:
@@ -611,13 +617,29 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
        switch (links_reg & IXGBE_LINKS_SPEED_82599) {
        case IXGBE_LINKS_SPEED_10G_82599:
                *speed = IXGBE_LINK_SPEED_10GB_FULL;
+               if (hw->mac.type >= ixgbe_mac_X550) {
+                       if (links_reg & IXGBE_LINKS_SPEED_NON_STD)
+                               *speed = IXGBE_LINK_SPEED_2_5GB_FULL;
+               }
                break;
        case IXGBE_LINKS_SPEED_1G_82599:
                *speed = IXGBE_LINK_SPEED_1GB_FULL;
                break;
        case IXGBE_LINKS_SPEED_100_82599:
                *speed = IXGBE_LINK_SPEED_100_FULL;
+               if (hw->mac.type == ixgbe_mac_X550) {
+                       if (links_reg & IXGBE_LINKS_SPEED_NON_STD)
+                               *speed = IXGBE_LINK_SPEED_5GB_FULL;
+               }
                break;
+       case IXGBE_LINKS_SPEED_10_X550EM_A:
+               *speed = IXGBE_LINK_SPEED_UNKNOWN;
+               /* Since Reserved in older MAC's */
+               if (hw->mac.type >= ixgbe_mac_X550)
+                       *speed = IXGBE_LINK_SPEED_10_FULL;
+               break;
+       default:
+               *speed = IXGBE_LINK_SPEED_UNKNOWN;
        }
 
        /* if the read failed it could just be a mailbox collision, best wait