patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/ixgbe: fix ixgbevf link status
@ 2019-12-17  6:12 Lunyuan Cui
  2019-12-18  2:35 ` [dpdk-stable] [dpdk-dev] " Ye Xiaolong
  0 siblings, 1 reply; 2+ messages in thread
From: Lunyuan Cui @ 2019-12-17  6:12 UTC (permalink / raw)
  To: dev; +Cc: Wenzhuo Lu, Qiming Yang, Lunyuan Cui, stable

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 <lunyuanx.cui@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 2c6fd0f13..a3f550c53 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) {
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-18  2:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17  6:12 [dpdk-stable] [PATCH] net/ixgbe: fix ixgbevf link status Lunyuan Cui
2019-12-18  2:35 ` [dpdk-stable] [dpdk-dev] " Ye Xiaolong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).