if (ixgbe_verify_lesm_fw_enabled_82599(hw)) {
ret_val = hw->mac.ops.acquire_swfw_sync(hw,
IXGBE_GSSR_MAC_CSR_SM);
- if (!ret_val)
+ if (ret_val)
return IXGBE_ERR_SWFW_SYNC;
*locked = true;
if (!locked && ixgbe_verify_lesm_fw_enabled_82599(hw)) {
ret_val = hw->mac.ops.acquire_swfw_sync(hw,
IXGBE_GSSR_MAC_CSR_SM);
- if (!ret_val)
+ if (ret_val)
return IXGBE_ERR_SWFW_SYNC;
+
+ locked = true;
}
IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc);
if (autoc != start_autoc) {
/* Restart link */
status = hw->mac.ops.prot_autoc_write(hw, autoc, false);
- if (!status)
+ if (status)
goto out;
/* Only poll for autoneg to complete if specified to do so */
status = hw->mac.ops.prot_autoc_write(hw,
hw->mac.orig_autoc,
false);
- if (!status)
+ if (status)
goto reset_hw_out;
}
case ixgbe_media_type_backplane:
/* some MAC's need RMW protection on AUTOC */
ret_val = hw->mac.ops.prot_autoc_read(hw, &locked, ®_bp);
- if (!ret_val)
+ if (ret_val)
goto out;
/* only backplane uses autoc so fall though */
if (!link_up) {
ret_val = hw->mac.ops.prot_autoc_read(hw, &locked, &autoc_reg);
- if (!ret_val)
+ if (ret_val)
goto out;
autoc_reg |= IXGBE_AUTOC_AN_RESTART;
autoc_reg |= IXGBE_AUTOC_FLU;
ret_val = hw->mac.ops.prot_autoc_write(hw, autoc_reg, locked);
- if (!ret_val)
+ if (ret_val)
goto out;
IXGBE_WRITE_FLUSH(hw);
bool locked = false;
ret_val = hw->mac.ops.prot_autoc_read(hw, &locked, &autoc_reg);
- if (!ret_val)
+ if (ret_val)
goto out;
autoc_reg &= ~IXGBE_AUTOC_FLU;
autoc_reg |= IXGBE_AUTOC_AN_RESTART;
ret_val = hw->mac.ops.prot_autoc_write(hw, autoc_reg, locked);
- if (!ret_val)
+ if (ret_val)
goto out;
led_reg &= ~IXGBE_LED_MODE_MASK(index);