From: Ouyang Changchun Date: Tue, 7 Oct 2014 08:12:14 +0000 (+0200) Subject: ixgbe/base: wait longer for VF link status X-Git-Tag: spdx-start~10362 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=6a236f9625397b0347c37de93db1784f05d04919;p=dpdk.git ixgbe/base: wait longer for VF link status Signed-off-by: Changchun Ouyang [Thomas: split patch] --- diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.c index af0e0fd21c..a2d6e61488 100644 --- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.c +++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.c @@ -515,6 +515,21 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed, if (!(links_reg & IXGBE_LINKS_UP)) goto out; + /* for SFP+ modules and DA cables on 82599 it can take up to 500usecs + * before the link status is correct + */ + if (mac->type == ixgbe_mac_82599_vf) { + int i; + + for (i = 0; i < 5; i++) { + usec_delay(100); + links_reg = IXGBE_READ_REG(hw, IXGBE_VFLINKS); + + if (!(links_reg & IXGBE_LINKS_UP)) + goto out; + } + } + switch (links_reg & IXGBE_LINKS_SPEED_82599) { case IXGBE_LINKS_SPEED_10G_82599: *speed = IXGBE_LINK_SPEED_10GB_FULL;