Skip to content

Commit

Permalink
net/ixgbe: fix link status
Browse files Browse the repository at this point in the history
The link status for ixgbevf is not correct when PF link up.
IXGBE_ESDP register is only used when media type is fiber.

Fixes: 1ca0583 ("net/ixgbe: fix link status")
Cc: stable@dpdk.org

Signed-off-by: Lunyuan Cui <lunyuanx.cui@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
  • Loading branch information
Lunyuan Cui authored and Ferruh Yigit committed Jan 17, 2020
1 parent b1b73ea commit ff8162c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/net/ixgbe/ixgbe_ethdev.c
Expand Up @@ -4155,9 +4155,11 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
return rte_eth_linkstatus_set(dev, &link);
}

esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP);
if ((esdp_reg & IXGBE_ESDP_SDP3))
link_up = 0;
if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP);
if ((esdp_reg & IXGBE_ESDP_SDP3))
link_up = 0;
}

if (link_up == 0) {
if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
Expand Down

0 comments on commit ff8162c

Please sign in to comment.