src/dpdk/drivers/net/igc/base/igc_api.c
s32 igc_setup_init_funcs(struct igc_hw *hw, bool init_device)
{
	s32 ret_val;

	/* Can't do much good without knowing the MAC type. */
	ret_val = igc_set_mac_type(hw);
	if (ret_val) {
		DEBUGOUT("ERROR: MAC type could not be set properly.\n");
		goto out;
	}

	if (!hw->hw_addr) {
		DEBUGOUT("ERROR: Registers not mapped\n");
		ret_val = -IGC_ERR_CONFIG;
		goto out;
	}

	/*
	 * Init function pointers to generic implementations. We do this first
	 * allowing a driver module to override it afterward.
	 */
	igc_init_mac_ops_generic(hw);
	igc_init_phy_ops_generic(hw);
	igc_init_nvm_ops_generic(hw);

	/*
	 * Set up the init function pointers. These are functions within the
	 * adapter family file that sets up function pointers for the rest of
	 * the functions in that family.
	 */
	switch (hw->mac.type) {
	case igc_i225:
		igc_init_function_pointers_i225(hw);
		break;
	default:
		DEBUGOUT("Hardware not supported\n");
		ret_val = -IGC_ERR_CONFIG;
		break;
	}

	/*
	 * Initialize the rest of the function pointers. These require some
	 * register reads/writes in some cases.
	 */
	if (!(ret_val) && init_device) {
		ret_val = igc_init_mac_params(hw);
		if (ret_val)
			goto out;

		ret_val = igc_init_nvm_params(hw);
		if (ret_val)
			goto out;

		ret_val = igc_init_phy_params(hw);
		if (ret_val)
			goto out;
	}

out:
	return ret_val;
}
/**
 *  igc_setup_init_funcs - Initializes function pointers
 *  @hw: pointer to the HW structure
 *  @init_device: true will initialize the rest of the function pointers
 *		  getting the device ready for use.  false will only set
 *		  MAC type and the function pointers for the other init
 *		  functions.  Passing false will not generate any hardware
 *		  reads or writes.
 *
 *  This function must be called by a driver in order to use the rest
 *  of the 'shared' code files. Called by drivers only.
 **/
Initializes function pointers
@hw: pointer to the HW structure
@init_device: true will initialize the rest of the function pointers
getting the device ready for use.  false will only set
MAC type and the function pointers for the other init
functions.  Passing false will not generate any hardware
reads or writes.

This function must be called by a driver in order to use the rest
of the 'shared' code files. Called by drivers only.
Initializes function pointers @hw : pointer to the HW structure @init_device : true will initialize the rest of the function pointers getting the device ready for use . false will only set MAC type and the function pointers for the other init functions . Passing false will not generate any hardware reads or writes . This function must be called by a driver in order to use the rest of the ' shared ' code files . Called by drivers only .
s32 igc_setup_init_funcs(struct igc_hw *hw, bool init_device)
{
	s32 ret_val;
	ret_val = igc_set_mac_type(hw);
	if (ret_val) {
		DEBUGOUT("ERROR: MAC type could not be set properly.\n");
		goto out;
	}
	if (!hw->hw_addr) {
		DEBUGOUT("ERROR: Registers not mapped\n");
		ret_val = -IGC_ERR_CONFIG;
		goto out;
	}
	igc_init_mac_ops_generic(hw);
	igc_init_phy_ops_generic(hw);
	igc_init_nvm_ops_generic(hw);
	switch (hw->mac.type) {
	case igc_i225:
		igc_init_function_pointers_i225(hw);
		break;
	default:
		DEBUGOUT("Hardware not supported\n");
		ret_val = -IGC_ERR_CONFIG;
		break;
	}
	if (!(ret_val) && init_device) {
		ret_val = igc_init_mac_params(hw);
		if (ret_val)
			goto out;
		ret_val = igc_init_nvm_params(hw);
		if (ret_val)
			goto out;
		ret_val = igc_init_phy_params(hw);
		if (ret_val)
			goto out;
	}
out:
	return ret_val;
}
s32 igc_setup_init_funcs ( struct igc_hw * hw , bool init_device ) { s32 ret_val ; ret_val = igc_set_mac_type ( hw ) ; if ( ret_val ) { DEBUGOUT ( " \n " ) ; goto out ; } if ( ! hw -> hw_addr ) { DEBUGOUT ( " \n " ) ; ret_val = - IGC_ERR_CONFIG ; goto out ; } igc_init_mac_ops_generic ( hw ) ; igc_init_phy_ops_generic ( hw ) ; igc_init_nvm_ops_generic ( hw ) ; switch ( hw -> mac . type ) { case igc_i225 : igc_init_function_pointers_i225 ( hw ) ; break ; default : DEBUGOUT ( " \n " ) ; ret_val = - IGC_ERR_CONFIG ; break ; } if ( ! ( ret_val ) && init_device ) { ret_val = igc_init_mac_params ( hw ) ; if ( ret_val ) goto out ; ret_val = igc_init_nvm_params ( hw ) ; if ( ret_val ) goto out ; ret_val = igc_init_phy_params ( hw ) ; if ( ret_val ) goto out ; } out : return ret_val ; }
igc_setup_init_funcs - Initializes function pointers
  @hw: pointer to the HW structure
  @init_device: true will initialize the rest of the function pointers
                getting the device ready for use.
igc_setup_init_funcs - Initializes function pointers @hw : pointer to the HW structure @init_device : true will initialize the rest of the function pointers getting the device ready for use .
/* Can't do much good without knowing the MAC type. */ /*
	 * Init function pointers to generic implementations. We do this first
	 * allowing a driver module to override it afterward.
	 */ /*
	 * Set up the init function pointers. These are functions within the
	 * adapter family file that sets up function pointers for the rest of
	 * the functions in that family.
	 */ /*
	 * Initialize the rest of the function pointers. These require some
	 * register reads/writes in some cases.
	 */