Skip to content

Commit

Permalink
net/ixgbe: fix link status
Browse files Browse the repository at this point in the history
[ upstream commit c3f2fbf ]

The link status for 82599eb got from link status register was not
correct. Check the enable/disable flag of tx laser, set the link
status down if tx laser disabled. Then, we can get correct status.
But after port reset, tx laser register will be reset enable.
Link status will always be up. So set tx laser disable when port resets.

When hw->mac.autotry_restart is true, whether tx laser is disable or
enable, it will be set enable in ixgbe_flap_tx_laser_multispeed_fiber().
hw->mac.autotry_restart can be set true in both port init and port start.
Because we don't need this treatment before port starts, set
hw->mac.autotry_restart false when port init.

Fixes: 0408f47 ("net/ixgbe: fix busy polling while fiber link update")

Signed-off-by: Lunyuan Cui <lunyuanx.cui@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
  • Loading branch information
Lunyuan Cui authored and kevintraynor committed Dec 11, 2019
1 parent 14f6057 commit 258c3b5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ixgbe/ixgbe_ethdev.c
Expand Up @@ -1173,6 +1173,7 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
diag = ixgbe_bypass_init_hw(hw);
#else
diag = ixgbe_init_hw(hw);
hw->mac.autotry_restart = false;
#endif /* RTE_LIBRTE_IXGBE_BYPASS */

/*
Expand Down Expand Up @@ -1278,6 +1279,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
/* enable support intr */
ixgbe_enable_intr(eth_dev);

ixgbe_dev_set_link_down(eth_dev);

/* initialize filter info */
memset(filter_info, 0,
sizeof(struct ixgbe_filter_info));
Expand Down

0 comments on commit 258c3b5

Please sign in to comment.