diff mbox series

net/ixgbe: fix ixgbevf link status

Message ID 20191217061203.47833-1-lunyuanx.cui@intel.com (mailing list archive)
State Accepted, archived
Delegated to: xiaolong ye
Headers show
Series net/ixgbe: fix ixgbevf link status | expand

Checks

Context Check Description
ci/Intel-compilation fail apply issues
ci/travis-robot success Travis build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Cui, LunyuanX Dec. 17, 2019, 6:12 a.m. UTC
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(-)

Comments

Xiaolong Ye Dec. 18, 2019, 2:35 a.m. UTC | #1
On 12/17, Lunyuan Cui wrote:
>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
>

Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>

Applied to dpdk-next-net-intel, Thanks.
diff mbox series

Patch

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) {