Skip to contentSkip to conversation

net/i40e: fix link status update error

PATCH Applied Beilei Xing 3 participants 3 messages May 10, 2018 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/i40e: fix link status update error

Link status is not updated correctly, link speed is 0 when link is up and link speed is not 0 when link is down. This patch fixes the issue.

Fixes eef2daf2e199 ("net/i40e: fix link update no wait")
---
 drivers/net/i40e/i40e_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/i40e/i40e_ethdev.c +2 -2
index 894505f..a563561 100644
@@ -2513,7 +2513,7 @@ update_link_no_wait(struct i40e_hw *hw, struct rte_eth_link *link)
 	reg_val &= I40E_REG_LINK_UP;
 	link->link_status = (reg_val == I40E_REG_LINK_UP) ? 1 : 0;
 
-	if (unlikely(link->link_status != 0))
+	if (unlikely(link->link_status == 0))
 		return;
 
 	/* Parse the link status */
@@ -2572,7 +2572,7 @@ update_link_wait(struct i40e_hw *hw, struct rte_eth_link *link,
 
 		link->link_status = link_status.link_info & I40E_AQ_LINK_UP;
 		if (unlikely(link->link_status != 0))
-			return;
+			break;
 
 		rte_delay_ms(CHECK_INTERVAL);
 	} while (--rep_cnt);
Signature · 1 line
2.5.5
#1 lore raw
Quoted 12 lines

-----Original Message-----
From: Xing, Beilei
Sent: Thursday, May 10, 2018 10:26 AM
To: Zhang, Roy Fan <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Wiles, Keith <[email protected]>
Subject: [PATCH] net/i40e: fix link status update error

Link status is not updated correctly, link speed is 0 when link is up and link speed is not 0 when link is down. This patch fixes the issue.

Quoted 6 lines
Fixes eef2daf2e199 ("net/i40e: fix link update no wait")

Acked-by Qi Zhang <[email protected]>

Applied
#2 lore raw
Quoted 12 lines · Qi Z
Quoted 12 lines

-----Original Message-----
From: Xing, Beilei
Sent: Thursday, May 10, 2018 10:26 AM
To: Zhang, Roy Fan <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Wiles, Keith <[email protected]>
Subject: [PATCH] net/i40e: fix link status update error

Link status is not updated correctly, link speed is 0 when link is up and link speed is not 0 when link is down. This patch fixes the issue.

Quoted 8 lines
Quoted 6 lines
Fixes eef2daf2e199 ("net/i40e: fix link update no wait")

Acked-by Qi Zhang <[email protected]>

Applied to dpdk-next-net/master, thanks.