From: Catherine Sullivan Date: Thu, 26 Feb 2015 16:14:12 +0000 (+0000) Subject: i40e: Reassign incorrect PHY type to fix a FW bug X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=088c4ee370ecc5c7ce2681e75b78429825c860bf;p=linux-beck.git i40e: Reassign incorrect PHY type to fix a FW bug Some FW versions are incorrectly reporting a breakout cable as PHY type 0x3 when it should be 0x16 (I40E_PHY_TYPE_10GBASE_SFPP_CU). If we get this value back from FW and the version is < 4.40, reassign it to I40E_PHY_TYPE_10GBASE_SFPP_CU. Change-ID: Ibb41a0e3cd2c0753744e8553959240df6ed13ae8 Signed-off-by: Catherine Sullivan Tested-by: Jim Young Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c index cc10303c388d..0bfc82b9e921 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_common.c +++ b/drivers/net/ethernet/intel/i40e/i40e_common.c @@ -1481,6 +1481,10 @@ i40e_status 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 && + hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE) + hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU; + /* save link status information */ if (link) *link = *hw_link_info;