net/ice: fix memzone reserve and release in flow director
[dpdk.git] / drivers / net / ixgbe / base / ixgbe_x550.c
index f7b98af..930a61a 100644 (file)
@@ -1534,6 +1534,8 @@ STATIC s32 ixgbe_supported_sfp_modules_X550em(struct ixgbe_hw *hw, bool *linear)
        case ixgbe_sfp_type_1g_sx_core1:
        case ixgbe_sfp_type_1g_lx_core0:
        case ixgbe_sfp_type_1g_lx_core1:
+       case ixgbe_sfp_type_1g_lha_core0:
+       case ixgbe_sfp_type_1g_lha_core1:
                *linear = false;
                break;
        case ixgbe_sfp_type_unknown:
@@ -1874,6 +1876,8 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,
                /* Check if 1G SFP module. */
                if (hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 ||
                    hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1
+                   || hw->phy.sfp_type == ixgbe_sfp_type_1g_lha_core0 ||
+                   hw->phy.sfp_type == ixgbe_sfp_type_1g_lha_core1
                    || hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core0 ||
                    hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core1) {
                        *speed = IXGBE_LINK_SPEED_1GB_FULL;
@@ -4436,6 +4440,8 @@ s32 ixgbe_setup_mac_link_t_X550em(struct ixgbe_hw *hw,
 {
        s32 status;
        ixgbe_link_speed force_speed;
+       u32 i;
+       bool link_up = false;
 
        DEBUGFUNC("ixgbe_setup_mac_link_t_X550em");
 
@@ -4455,6 +4461,19 @@ s32 ixgbe_setup_mac_link_t_X550em(struct ixgbe_hw *hw,
 
                if (status != IXGBE_SUCCESS)
                        return status;
+
+               /* Wait for the controller to acquire link */
+               for (i = 0; i < 10; i++) {
+                       msec_delay(100);
+
+                       status = ixgbe_check_link(hw, &force_speed, &link_up,
+                                                 false);
+                       if (status != IXGBE_SUCCESS)
+                               return status;
+
+                       if (link_up)
+                               break;
+               }
        }
 
        return hw->phy.ops.setup_link_speed(hw, speed, autoneg_wait_to_complete);