src/dpdk/drivers/net/ixgbe/base/ixgbe_82599.c
s32 prot_autoc_read_82599(struct ixgbe_hw *hw, bool *locked, u32 *reg_val)
{
	s32 ret_val;

	*locked = false;
	 /* If LESM is on then we need to hold the SW/FW semaphore. */
	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 != IXGBE_SUCCESS)
			return IXGBE_ERR_SWFW_SYNC;

		*locked = true;
	}

	*reg_val = IXGBE_READ_REG(hw, IXGBE_AUTOC);
	return IXGBE_SUCCESS;
}
/**
 * prot_autoc_read_82599 - Hides MAC differences needed for AUTOC read
 * @hw: pointer to hardware structure
 * @locked: Return the if we locked for this read.
 * @reg_val: Value we read from AUTOC
 *
 * For this part (82599) we need to wrap read-modify-writes with a possible
 * FW/SW lock.  It is assumed this lock will be freed with the next
 * prot_autoc_write_82599().
 */
Hides MAC differences needed for AUTOC read
@hw: pointer to hardware structure
@locked: Return the if we locked for this read.
@reg_val: Value we read from AUTOC

For this part (82599) we need to wrap read-modify-writes with a possible
FW/SW lock.  It is assumed this lock will be freed with the next
prot_autoc_write_82599().
Hides MAC differences needed for AUTOC read @hw : pointer to hardware structure @locked : Return the if we locked for this read . @reg_val : Value we read from AUTOC For this part ( 82599 ) we need to wrap read - modify - writes with a possible FW / SW lock . It is assumed this lock will be freed with the next prot_autoc_write_82599 () .
s32 prot_autoc_read_82599(struct ixgbe_hw *hw, bool *locked, u32 *reg_val)
{
	s32 ret_val;
	*locked = false;
	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 != IXGBE_SUCCESS)
			return IXGBE_ERR_SWFW_SYNC;
		*locked = true;
	}
	*reg_val = IXGBE_READ_REG(hw, IXGBE_AUTOC);
	return IXGBE_SUCCESS;
}
s32 prot_autoc_read_82599 ( struct ixgbe_hw * hw , bool * locked , u32 * reg_val ) { s32 ret_val ; * locked = false ; 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 != IXGBE_SUCCESS ) return IXGBE_ERR_SWFW_SYNC ; * locked = true ; } * reg_val = IXGBE_READ_REG ( hw , IXGBE_AUTOC ) ; return IXGBE_SUCCESS ; }
prot_autoc_read_82599 - Hides MAC differences needed for AUTOC read
 @hw: pointer to hardware structure
 @locked: Return the if we locked for this read.
prot_autoc_read_82599 - Hides MAC differences needed for AUTOC read @hw : pointer to hardware structure @locked : Return the if we locked for this read .
/* If LESM is on then we need to hold the SW/FW semaphore. */