Skip to contentSkip to conversation

ixgbe: fix link issue in loopback mode

PATCH Applied Cunming Liang 3 participants 3 messages Feb 5, 2015 – Feb 15, 2015 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ixgbe: fix link issue in loopback mode

In loopback mode, it's expected force link up even when there's no cable connect. But in codes, setup_sfp() rewrites the related register.
It causes in the case 'multispeed_fiber', it can't link up without cable connect.

---
 lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
lib/librte_pmd_ixgbe/ixgbe_ethdev.c +5 -5
index b341dd0..d6d408e 100644
@@ -1501,6 +1501,11 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
 		goto error;
 	}
 
+	/* Skip link setup if loopback mode is enabled for 82599. */
+	if (hw->mac.type == ixgbe_mac_82599EB &&
+			dev->data->dev_conf.lpbk_mode == IXGBE_LPBK_82599_TX_RX)
+		goto skip_link_setup;
+
 	if (ixgbe_is_sfp(hw) && hw->phy.multispeed_fiber) {
 		err = hw->mac.ops.setup_sfp(hw);
 		if (err)
@@ -1510,11 +1515,6 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
 	/* Turn on the laser */
 	ixgbe_enable_tx_laser(hw);
 
-	/* Skip link setup if loopback mode is enabled for 82599. */
-	if (hw->mac.type == ixgbe_mac_82599EB &&
-			dev->data->dev_conf.lpbk_mode == IXGBE_LPBK_82599_TX_RX)
-		goto skip_link_setup;
-
 	err = ixgbe_check_link(hw, &speed, &link_up, 0);
 	if (err)
 		goto error;
Signature · 1 line
1.8.1.4
Acked-by
#2 lore raw
In reply to a message not in the archive
Quoted 40 lines · Cunming Liang

In loopback mode, it's expected force link up even when there's no cable connect. But in codes, setup_sfp() rewrites the related register.
It causes in the case 'multispeed_fiber', it can't link up without cable connect.

---
 lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
lib/librte_pmd_ixgbe/ixgbe_ethdev.c +5 -5
index b341dd0..d6d408e 100644
@@ -1501,6 +1501,11 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
 		goto error;
 	}
 
+	/* Skip link setup if loopback mode is enabled for 82599. */
+	if (hw->mac.type == ixgbe_mac_82599EB &&
+			dev->data->dev_conf.lpbk_mode == IXGBE_LPBK_82599_TX_RX)
+		goto skip_link_setup;
+
 	if (ixgbe_is_sfp(hw) && hw->phy.multispeed_fiber) {
 		err = hw->mac.ops.setup_sfp(hw);
 		if (err)
@@ -1510,11 +1515,6 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
 	/* Turn on the laser */
 	ixgbe_enable_tx_laser(hw);
 
-	/* Skip link setup if loopback mode is enabled for 82599. */
-	if (hw->mac.type == ixgbe_mac_82599EB &&
-			dev->data->dev_conf.lpbk_mode == IXGBE_LPBK_82599_TX_RX)
-		goto skip_link_setup;
-
 	err = ixgbe_check_link(hw, &speed, &link_up, 0);
 	if (err)
 		goto error;
Signature · 1 line
1.8.1.4