summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshijeet Acharya <ashijeet.acharya@6wind.com>2019-05-24 11:30:15 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2019-05-28 11:32:47 +0200
commitd31b95860d8e9dd7c6e242bd08baaac00a9714f0 (patch)
tree54196f784405e8ec7aaba28ce04bd51794ab4d4a
parentde80fbfddb44b1bf883f84b9e2edbde22a569758 (diff)
downloaddpdk-d31b95860d8e9dd7c6e242bd08baaac00a9714f0.zip
dpdk-d31b95860d8e9dd7c6e242bd08baaac00a9714f0.tar.gz
dpdk-d31b95860d8e9dd7c6e242bd08baaac00a9714f0.tar.xz
net/ixgbe/base: wait for link after copper MAC setup
After setting up the link on x552/X557-AT 10GBASE-T NICs, sometimes the link does not get set up properly and as a result all the subsequent calls to ixgbe_check_link() from ixgbe_dev_link_update_share() fail. Introduce a delay time of 1s in ixgbe_setup_mac_link_t_X550em() before beginning to set up the external PHY link speed to ensure that the controller can acquire the link. Signed-off-by: Ashijeet Acharya <ashijeet.acharya@6wind.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
-rw-r--r--drivers/net/ixgbe/base/ixgbe_x550.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c
index a920a14..930a61a 100644
--- a/drivers/net/ixgbe/base/ixgbe_x550.c
+++ b/drivers/net/ixgbe/base/ixgbe_x550.c
@@ -4440,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");
@@ -4459,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);