From: Lunyuan Cui Date: Tue, 17 Dec 2019 06:12:03 +0000 (+0000) Subject: net/ixgbe: fix link status X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ff8162cb9571528c006f265a32730a463fd0b886;p=dpdk.git net/ixgbe: fix link status The link status for ixgbevf is not correct when PF link up. IXGBE_ESDP register is only used when media type is fiber. Fixes: 1ca05831b9be ("net/ixgbe: fix link status") Cc: stable@dpdk.org Signed-off-by: Lunyuan Cui Acked-by: Xiaolong Ye --- diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 2c6fd0f131..a3f550c534 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -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) {