src/dpdk/drivers/net/txgbe/base/txgbe_phy.c
s32 txgbe_identify_phy(struct txgbe_hw *hw)
{
	s32 err = TXGBE_ERR_PHY_ADDR_INVALID;

	DEBUGFUNC("txgbe_identify_phy");

	txgbe_read_phy_if(hw);

	if (hw->phy.type != txgbe_phy_unknown)
		return 0;

	/* Raptor 10GBASE-T requires an external PHY */
	if (hw->phy.media_type == txgbe_media_type_copper) {
		err = txgbe_identify_extphy(hw);
	} else if (hw->phy.media_type == txgbe_media_type_fiber) {
		err = txgbe_identify_module(hw);
	} else {
		hw->phy.type = txgbe_phy_none;
		return 0;
	}

	/* Return error if SFP module has been detected but is not supported */
	if (hw->phy.type == txgbe_phy_sfp_unsupported)
		return TXGBE_ERR_SFP_NOT_SUPPORTED;

	return err;
}
/**
 *  txgbe_identify_phy - Get physical layer module
 *  @hw: pointer to hardware structure
 *
 *  Determines the physical layer module found on the current adapter.
 **/
Get physical layer module
@hw: pointer to hardware structure

Determines the physical layer module found on the current adapter.
Get physical layer module @hw : pointer to hardware structure Determines the physical layer module found on the current adapter .
s32 txgbe_identify_phy(struct txgbe_hw *hw)
{
	s32 err = TXGBE_ERR_PHY_ADDR_INVALID;
	DEBUGFUNC("txgbe_identify_phy");
	txgbe_read_phy_if(hw);
	if (hw->phy.type != txgbe_phy_unknown)
		return 0;
	if (hw->phy.media_type == txgbe_media_type_copper) {
		err = txgbe_identify_extphy(hw);
	} else if (hw->phy.media_type == txgbe_media_type_fiber) {
		err = txgbe_identify_module(hw);
	} else {
		hw->phy.type = txgbe_phy_none;
		return 0;
	}
	if (hw->phy.type == txgbe_phy_sfp_unsupported)
		return TXGBE_ERR_SFP_NOT_SUPPORTED;
	return err;
}
s32 txgbe_identify_phy ( struct txgbe_hw * hw ) { s32 err = TXGBE_ERR_PHY_ADDR_INVALID ; DEBUGFUNC ( " " ) ; txgbe_read_phy_if ( hw ) ; if ( hw -> phy . type != txgbe_phy_unknown ) return 0 ; if ( hw -> phy . media_type == txgbe_media_type_copper ) { err = txgbe_identify_extphy ( hw ) ; } else if ( hw -> phy . media_type == txgbe_media_type_fiber ) { err = txgbe_identify_module ( hw ) ; } else { hw -> phy . type = txgbe_phy_none ; return 0 ; } if ( hw -> phy . type == txgbe_phy_sfp_unsupported ) return TXGBE_ERR_SFP_NOT_SUPPORTED ; return err ; }
txgbe_identify_phy - Get physical layer module
  @hw: pointer to hardware structure
txgbe_identify_phy - Get physical layer module @hw : pointer to hardware structure
/* Raptor 10GBASE-T requires an external PHY */ /* Return error if SFP module has been detected but is not supported */