src/dpdk/drivers/net/txgbe/base/txgbe_mng.c
s32
txgbe_hic_reset(struct txgbe_hw *hw)
{
	struct txgbe_hic_reset reset_cmd;
	int i;
	s32 err = 0;

	DEBUGFUNC("\n");

	reset_cmd.hdr.cmd = FW_RESET_CMD;
	reset_cmd.hdr.buf_len = FW_RESET_LEN;
	reset_cmd.hdr.cmd_or_resp.cmd_resv = FW_CEM_CMD_RESERVED;
	reset_cmd.lan_id = hw->bus.lan_id;
	reset_cmd.reset_type = (u16)hw->reset_type;
	reset_cmd.hdr.checksum = 0;
	reset_cmd.hdr.checksum = txgbe_calculate_checksum((u8 *)&reset_cmd,
				(FW_CEM_HDR_LEN + reset_cmd.hdr.buf_len));

	for (i = 0; i <= FW_CEM_MAX_RETRIES; i++) {
		err = txgbe_host_interface_command(hw, (u32 *)&reset_cmd,
						       sizeof(reset_cmd),
						       TXGBE_HI_COMMAND_TIMEOUT,
						       true);
		if (err != 0)
			continue;

		if (reset_cmd.hdr.cmd_or_resp.ret_status ==
		    FW_CEM_RESP_STATUS_SUCCESS)
			err = 0;
		else
			err = TXGBE_ERR_HOST_INTERFACE_COMMAND;

		break;
	}

	return err;
}
/**
 *  txgbe_hic_reset - send reset cmd to fw
 *  @hw: pointer to hardware structure
 *
 *  Sends reset cmd to firmware through the manageability
 *  block.  On success return 0
 *  else returns TXGBE_ERR_SWFW_SYNC when encountering an error acquiring
 *  semaphore or TXGBE_ERR_HOST_INTERFACE_COMMAND when command fails.
 **/
send reset cmd to fw
@hw: pointer to hardware structure

Sends reset cmd to firmware through the manageability
block.  On success return 0
else returns TXGBE_ERR_SWFW_SYNC when encountering an error acquiring
semaphore or TXGBE_ERR_HOST_INTERFACE_COMMAND when command fails.
send reset cmd to fw @hw : pointer to hardware structure Sends reset cmd to firmware through the manageability block . On success return 0 else returns TXGBE_ERR_SWFW_SYNC when encountering an error acquiring semaphore or TXGBE_ERR_HOST_INTERFACE_COMMAND when command fails .
s32
txgbe_hic_reset(struct txgbe_hw *hw)
{
	struct txgbe_hic_reset reset_cmd;
	int i;
	s32 err = 0;
	DEBUGFUNC("\n");
	reset_cmd.hdr.cmd = FW_RESET_CMD;
	reset_cmd.hdr.buf_len = FW_RESET_LEN;
	reset_cmd.hdr.cmd_or_resp.cmd_resv = FW_CEM_CMD_RESERVED;
	reset_cmd.lan_id = hw->bus.lan_id;
	reset_cmd.reset_type = (u16)hw->reset_type;
	reset_cmd.hdr.checksum = 0;
	reset_cmd.hdr.checksum = txgbe_calculate_checksum((u8 *)&reset_cmd,
				(FW_CEM_HDR_LEN + reset_cmd.hdr.buf_len));
	for (i = 0; i <= FW_CEM_MAX_RETRIES; i++) {
		err = txgbe_host_interface_command(hw, (u32 *)&reset_cmd,
						       sizeof(reset_cmd),
						       TXGBE_HI_COMMAND_TIMEOUT,
						       true);
		if (err != 0)
			continue;
		if (reset_cmd.hdr.cmd_or_resp.ret_status ==
		    FW_CEM_RESP_STATUS_SUCCESS)
			err = 0;
		else
			err = TXGBE_ERR_HOST_INTERFACE_COMMAND;
		break;
	}
	return err;
}
s32 txgbe_hic_reset ( struct txgbe_hw * hw ) { struct txgbe_hic_reset reset_cmd ; int i ; s32 err = 0 ; DEBUGFUNC ( " \n " ) ; reset_cmd . hdr . cmd = FW_RESET_CMD ; reset_cmd . hdr . buf_len = FW_RESET_LEN ; reset_cmd . hdr . cmd_or_resp . cmd_resv = FW_CEM_CMD_RESERVED ; reset_cmd . lan_id = hw -> bus . lan_id ; reset_cmd . reset_type = ( u16 ) hw -> reset_type ; reset_cmd . hdr . checksum = 0 ; reset_cmd . hdr . checksum = txgbe_calculate_checksum ( ( u8 * ) & reset_cmd , ( FW_CEM_HDR_LEN + reset_cmd . hdr . buf_len ) ) ; for ( i = 0 ; i <= FW_CEM_MAX_RETRIES ; i ++ ) { err = txgbe_host_interface_command ( hw , ( u32 * ) & reset_cmd , sizeof ( reset_cmd ) , TXGBE_HI_COMMAND_TIMEOUT , true ) ; if ( err != 0 ) continue ; if ( reset_cmd . hdr . cmd_or_resp . ret_status == FW_CEM_RESP_STATUS_SUCCESS ) err = 0 ; else err = TXGBE_ERR_HOST_INTERFACE_COMMAND ; break ; } return err ; }
txgbe_hic_reset - send reset cmd to fw
  @hw: pointer to hardware structure
txgbe_hic_reset - send reset cmd to fw @hw : pointer to hardware structure