src/dpdk/drivers/net/txgbe/base/txgbe_hw.c
s32 txgbe_init_phy_raptor(struct txgbe_hw *hw)
{
	struct txgbe_mac_info *mac = &hw->mac;
	struct txgbe_phy_info *phy = &hw->phy;
	s32 err = 0;

	DEBUGFUNC("txgbe_init_phy_raptor");

	if (hw->device_id == TXGBE_DEV_ID_RAPTOR_QSFP) {
		/* Store flag indicating I2C bus access control unit. */
		hw->phy.qsfp_shared_i2c_bus = TRUE;

		/* Initialize access to QSFP+ I2C bus */
		txgbe_flush(hw);
	}

	/* Identify the PHY or SFP module */
	err = phy->identify(hw);
	if (err == TXGBE_ERR_SFP_NOT_SUPPORTED)
		goto init_phy_ops_out;

	/* Setup function pointers based on detected SFP module and speeds */
	txgbe_init_mac_link_ops(hw);

	/* If copper media, overwrite with copper function pointers */
	if (phy->media_type == txgbe_media_type_copper) {
		mac->setup_link = txgbe_setup_copper_link_raptor;
		mac->get_link_capabilities =
				  txgbe_get_copper_link_capabilities;
	}

	/* Set necessary function pointers based on PHY type */
	switch (hw->phy.type) {
	case txgbe_phy_tn:
		phy->setup_link = txgbe_setup_phy_link_tnx;
		phy->check_link = txgbe_check_phy_link_tnx;
		break;
	default:
		break;
	}

init_phy_ops_out:
	return err;
}
/**
 *  txgbe_init_phy_raptor - PHY/SFP specific init
 *  @hw: pointer to hardware structure
 *
 *  Initialize any function pointers that were not able to be
 *  set during init_shared_code because the PHY/SFP type was
 *  not known.  Perform the SFP init if necessary.
 *
 **/
PHY/SFP specific init
@hw: pointer to hardware structure

Initialize any function pointers that were not able to be
set during init_shared_code because the PHY/SFP type was
not known.  Perform the SFP init if necessary.
PHY / SFP specific init @hw : pointer to hardware structure Initialize any function pointers that were not able to be set during init_shared_code because the PHY / SFP type was not known . Perform the SFP init if necessary .
s32 txgbe_init_phy_raptor(struct txgbe_hw *hw)
{
	struct txgbe_mac_info *mac = &hw->mac;
	struct txgbe_phy_info *phy = &hw->phy;
	s32 err = 0;
	DEBUGFUNC("txgbe_init_phy_raptor");
	if (hw->device_id == TXGBE_DEV_ID_RAPTOR_QSFP) {
		hw->phy.qsfp_shared_i2c_bus = TRUE;
		txgbe_flush(hw);
	}
	err = phy->identify(hw);
	if (err == TXGBE_ERR_SFP_NOT_SUPPORTED)
		goto init_phy_ops_out;
	txgbe_init_mac_link_ops(hw);
	if (phy->media_type == txgbe_media_type_copper) {
		mac->setup_link = txgbe_setup_copper_link_raptor;
		mac->get_link_capabilities =
				  txgbe_get_copper_link_capabilities;
	}
	switch (hw->phy.type) {
	case txgbe_phy_tn:
		phy->setup_link = txgbe_setup_phy_link_tnx;
		phy->check_link = txgbe_check_phy_link_tnx;
		break;
	default:
		break;
	}
init_phy_ops_out:
	return err;
}
s32 txgbe_init_phy_raptor ( struct txgbe_hw * hw ) { struct txgbe_mac_info * mac = & hw -> mac ; struct txgbe_phy_info * phy = & hw -> phy ; s32 err = 0 ; DEBUGFUNC ( " " ) ; if ( hw -> device_id == TXGBE_DEV_ID_RAPTOR_QSFP ) { hw -> phy . qsfp_shared_i2c_bus = TRUE ; txgbe_flush ( hw ) ; } err = phy -> identify ( hw ) ; if ( err == TXGBE_ERR_SFP_NOT_SUPPORTED ) goto init_phy_ops_out ; txgbe_init_mac_link_ops ( hw ) ; if ( phy -> media_type == txgbe_media_type_copper ) { mac -> setup_link = txgbe_setup_copper_link_raptor ; mac -> get_link_capabilities = txgbe_get_copper_link_capabilities ; } switch ( hw -> phy . type ) { case txgbe_phy_tn : phy -> setup_link = txgbe_setup_phy_link_tnx ; phy -> check_link = txgbe_check_phy_link_tnx ; break ; default : break ; } init_phy_ops_out : return err ; }
txgbe_init_phy_raptor - PHY/SFP specific init
  @hw: pointer to hardware structure
txgbe_init_phy_raptor - PHY / SFP specific init @hw : pointer to hardware structure
/* Store flag indicating I2C bus access control unit. */ /* Initialize access to QSFP+ I2C bus */ /* Identify the PHY or SFP module */ /* Setup function pointers based on detected SFP module and speeds */ /* If copper media, overwrite with copper function pointers */ /* Set necessary function pointers based on PHY type */