src/dpdk/drivers/net/txgbe/base/txgbe_hw.c
s32 txgbe_prot_autoc_read_raptor(struct txgbe_hw *hw, bool *locked, u64 *value)
{
	s32 err;
	bool lock_state = false;

	 /* If LESM is on then we need to hold the SW/FW semaphore. */
	if (txgbe_verify_lesm_fw_enabled_raptor(hw)) {
		err = hw->mac.acquire_swfw_sync(hw,
					TXGBE_MNGSEM_SWPHY);
		if (err != 0)
			return TXGBE_ERR_SWFW_SYNC;

		lock_state = true;
	}

	if (locked)
		*locked = lock_state;

	*value = txgbe_autoc_read(hw);
	return 0;
}
/**
 *  txgbe_prot_autoc_read_raptor - Hides MAC differences needed for AUTOC read
 *  @hw: pointer to hardware structure
 *  @locked: Return the if we locked for this read.
 *  @value: Value we read from AUTOC
 *
 *  For this part 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_raptor().
 */
Hides MAC differences needed for AUTOC read
@hw: pointer to hardware structure
@locked: Return the if we locked for this read.
@value: Value we read from AUTOC

For this part 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_raptor().
Hides MAC differences needed for AUTOC read @hw : pointer to hardware structure @locked : Return the if we locked for this read . @value : Value we read from AUTOC For this part 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_raptor () .
s32 txgbe_prot_autoc_read_raptor(struct txgbe_hw *hw, bool *locked, u64 *value)
{
	s32 err;
	bool lock_state = false;
	if (txgbe_verify_lesm_fw_enabled_raptor(hw)) {
		err = hw->mac.acquire_swfw_sync(hw,
					TXGBE_MNGSEM_SWPHY);
		if (err != 0)
			return TXGBE_ERR_SWFW_SYNC;
		lock_state = true;
	}
	if (locked)
		*locked = lock_state;
	*value = txgbe_autoc_read(hw);
	return 0;
}
s32 txgbe_prot_autoc_read_raptor ( struct txgbe_hw * hw , bool * locked , u64 * value ) { s32 err ; bool lock_state = false ; if ( txgbe_verify_lesm_fw_enabled_raptor ( hw ) ) { err = hw -> mac . acquire_swfw_sync ( hw , TXGBE_MNGSEM_SWPHY ) ; if ( err != 0 ) return TXGBE_ERR_SWFW_SYNC ; lock_state = true ; } if ( locked ) * locked = lock_state ; * value = txgbe_autoc_read ( hw ) ; return 0 ; }
txgbe_prot_autoc_read_raptor - Hides MAC differences needed for AUTOC read
  @hw: pointer to hardware structure
  @locked: Return the if we locked for this read.
txgbe_prot_autoc_read_raptor - 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. */