src/dpdk/drivers/net/txgbe/base/txgbe_hw.c
bool txgbe_verify_lesm_fw_enabled_raptor(struct txgbe_hw *hw)
{
	bool lesm_enabled = false;
	u16 fw_offset, fw_lesm_param_offset, fw_lesm_state;
	s32 status;

	DEBUGFUNC("txgbe_verify_lesm_fw_enabled_raptor");

	/* get the offset to the Firmware Module block */
	status = hw->rom.read16(hw, TXGBE_FW_PTR, &fw_offset);

	if (status != 0 || fw_offset == 0 || fw_offset == 0xFFFF)
		goto out;

	/* get the offset to the LESM Parameters block */
	status = hw->rom.read16(hw, (fw_offset +
				     TXGBE_FW_LESM_PARAMETERS_PTR),
				     &fw_lesm_param_offset);

	if (status != 0 ||
	    fw_lesm_param_offset == 0 || fw_lesm_param_offset == 0xFFFF)
		goto out;

	/* get the LESM state word */
	status = hw->rom.read16(hw, (fw_lesm_param_offset +
				     TXGBE_FW_LESM_STATE_1),
				     &fw_lesm_state);

	if (status == 0 && (fw_lesm_state & TXGBE_FW_LESM_STATE_ENABLED))
		lesm_enabled = true;

out:
	lesm_enabled = false;
	return lesm_enabled;
}
/**
 *  txgbe_verify_lesm_fw_enabled_raptor - Checks LESM FW module state.
 *  @hw: pointer to hardware structure
 *
 *  Returns true if the LESM FW module is present and enabled. Otherwise
 *  returns false. Smart Speed must be disabled if LESM FW module is enabled.
 **/
Checks LESM FW module state.
@hw: pointer to hardware structure

Returns true if the LESM FW module is present and enabled. Otherwise
returns false. Smart Speed must be disabled if LESM FW module is enabled.
Checks LESM FW module state . @hw : pointer to hardware structure Returns true if the LESM FW module is present and enabled . Otherwise returns false . Smart Speed must be disabled if LESM FW module is enabled .
bool txgbe_verify_lesm_fw_enabled_raptor(struct txgbe_hw *hw)
{
	bool lesm_enabled = false;
	u16 fw_offset, fw_lesm_param_offset, fw_lesm_state;
	s32 status;
	DEBUGFUNC("txgbe_verify_lesm_fw_enabled_raptor");
	status = hw->rom.read16(hw, TXGBE_FW_PTR, &fw_offset);
	if (status != 0 || fw_offset == 0 || fw_offset == 0xFFFF)
		goto out;
	status = hw->rom.read16(hw, (fw_offset +
				     TXGBE_FW_LESM_PARAMETERS_PTR),
				     &fw_lesm_param_offset);
	if (status != 0 ||
	    fw_lesm_param_offset == 0 || fw_lesm_param_offset == 0xFFFF)
		goto out;
	status = hw->rom.read16(hw, (fw_lesm_param_offset +
				     TXGBE_FW_LESM_STATE_1),
				     &fw_lesm_state);
	if (status == 0 && (fw_lesm_state & TXGBE_FW_LESM_STATE_ENABLED))
		lesm_enabled = true;
out:
	lesm_enabled = false;
	return lesm_enabled;
}
bool txgbe_verify_lesm_fw_enabled_raptor ( struct txgbe_hw * hw ) { bool lesm_enabled = false ; u16 fw_offset , fw_lesm_param_offset , fw_lesm_state ; s32 status ; DEBUGFUNC ( " " ) ; status = hw -> rom . read16 ( hw , TXGBE_FW_PTR , & fw_offset ) ; if ( status != 0 || fw_offset == 0 || fw_offset == 0xFFFF ) goto out ; status = hw -> rom . read16 ( hw , ( fw_offset + TXGBE_FW_LESM_PARAMETERS_PTR ) , & fw_lesm_param_offset ) ; if ( status != 0 || fw_lesm_param_offset == 0 || fw_lesm_param_offset == 0xFFFF ) goto out ; status = hw -> rom . read16 ( hw , ( fw_lesm_param_offset + TXGBE_FW_LESM_STATE_1 ) , & fw_lesm_state ) ; if ( status == 0 && ( fw_lesm_state & TXGBE_FW_LESM_STATE_ENABLED ) ) lesm_enabled = true ; out : lesm_enabled = false ; return lesm_enabled ; }
txgbe_verify_lesm_fw_enabled_raptor - Checks LESM FW module state.
txgbe_verify_lesm_fw_enabled_raptor - Checks LESM FW module state .
/* get the offset to the Firmware Module block */ /* get the offset to the LESM Parameters block */ /* get the LESM state word */