From mboxrd@z Thu Jan 1 00:00:00 1970 From: Helin Zhang Subject: [PATCH v2 26/33] i40e/base: Reassign incorrect PHY type as a workaround for a FW issue Date: Thu, 30 Apr 2015 23:03:32 +0800 Message-ID: <1430406219-23901-27-git-send-email-helin.zhang@intel.com> References: <1429518150-28098-1-git-send-email-helin.zhang@intel.com> <1430406219-23901-1-git-send-email-helin.zhang@intel.com> Cc: monica.kenguva-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, steven.j.murray-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, shannon.nelson-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1430406219-23901-1-git-send-email-helin.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" The FW for SW3E is incorrectly reporting a breakout cable as PHY type 0x3 when it should be 0x16 (I40E_PHY_TYPE_10GBASE_SFPP_CU). As this is supposed to be fixed in the next FW version (FW versions >= 4.4), if we get this value back from FW and the version is < 4.4, reassign it to I40E_PHY_TYPE_10GBASE_SFPP_CU. Signed-off-by: Helin Zhang --- lib/librte_pmd_i40e/i40e/i40e_common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/librte_pmd_i40e/i40e/i40e_common.c b/lib/librte_pmd_i40e/i40e/i40e_common.c index e728e8e..d6cfde8 100644 --- a/lib/librte_pmd_i40e/i40e/i40e_common.c +++ b/lib/librte_pmd_i40e/i40e/i40e_common.c @@ -1507,6 +1507,10 @@ 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 && + 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) i40e_memcpy(link, hw_link_info, sizeof(struct i40e_link_status), -- 1.8.1.4