net/i40e/base: fix unknown PHYs incorrect identification
[dpdk.git] / drivers / net / i40e / base / i40e_common.c
index 85c1c11..fbaa0be 100644 (file)
@@ -1984,7 +1984,8 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
        else
                hw_link_info->lse_enable = false;
 
-       if ((hw->aq.fw_maj_ver < 4 || (hw->aq.fw_maj_ver == 4 &&
+       if ((hw->mac.type == I40E_MAC_XL710) &&
+           (hw->aq.fw_maj_ver < 4 || (hw->aq.fw_maj_ver == 4 &&
             hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE)
                hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU;
 
@@ -3611,6 +3612,14 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
                        break;
                case I40E_AQ_CAP_ID_MNG_MODE:
                        p->management_mode = number;
+                       if (major_rev > 1) {
+                               p->mng_protocols_over_mctp = logical_id;
+                               i40e_debug(hw, I40E_DEBUG_INIT,
+                                          "HW Capability: Protocols over MCTP = %d\n",
+                                          p->mng_protocols_over_mctp);
+                       } else {
+                               p->mng_protocols_over_mctp = 0;
+                       }
                        i40e_debug(hw, I40E_DEBUG_INIT,
                                   "HW Capability: Management Mode = %d\n",
                                   p->management_mode);