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.
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Patrick Lu <patrick.lu@intel.com>
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)
/* 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;