src/dpdk/drivers/net/txgbe/base/txgbe_phy.c
static bool txgbe_identify_extphy(struct txgbe_hw *hw)
{
	u16 phy_addr = 0;

	if (!txgbe_validate_phy_addr(hw, phy_addr)) {
		DEBUGOUT("Unable to validate PHY address 0x%04X\n",
			phy_addr);
		return false;
	}

	if (txgbe_get_phy_id(hw))
		return false;

	hw->phy.type = txgbe_get_phy_type_from_id(hw->phy.id);
	if (hw->phy.type == txgbe_phy_unknown) {
		u16 ext_ability = 0;
		hw->phy.read_reg(hw, TXGBE_MD_PHY_EXT_ABILITY,
				 TXGBE_MD_DEV_PMA_PMD,
				 &ext_ability);

		if (ext_ability & (TXGBE_MD_PHY_10GBASET_ABILITY |
			TXGBE_MD_PHY_1000BASET_ABILITY))
			hw->phy.type = txgbe_phy_cu_unknown;
		else
			hw->phy.type = txgbe_phy_generic;
	}

	return true;
}
/**
 * txgbe_identify_extphy - Identify a single address for a PHY
 * @hw: pointer to hardware structure
 * @phy_addr: PHY address to probe
 *
 * Returns true if PHY found
 */
Identify a single address for a PHY
@hw: pointer to hardware structure
@phy_addr: PHY address to probe

Returns true if PHY found
Identify a single address for a PHY @hw : pointer to hardware structure @phy_addr : PHY address to probe Returns true if PHY found
static bool txgbe_identify_extphy(struct txgbe_hw *hw)
{
	u16 phy_addr = 0;
	if (!txgbe_validate_phy_addr(hw, phy_addr)) {
		DEBUGOUT("Unable to validate PHY address 0x%04X\n",
			phy_addr);
		return false;
	}
	if (txgbe_get_phy_id(hw))
		return false;
	hw->phy.type = txgbe_get_phy_type_from_id(hw->phy.id);
	if (hw->phy.type == txgbe_phy_unknown) {
		u16 ext_ability = 0;
		hw->phy.read_reg(hw, TXGBE_MD_PHY_EXT_ABILITY,
				 TXGBE_MD_DEV_PMA_PMD,
				 &ext_ability);
		if (ext_ability & (TXGBE_MD_PHY_10GBASET_ABILITY |
			TXGBE_MD_PHY_1000BASET_ABILITY))
			hw->phy.type = txgbe_phy_cu_unknown;
		else
			hw->phy.type = txgbe_phy_generic;
	}
	return true;
}
static bool txgbe_identify_extphy ( struct txgbe_hw * hw ) { u16 phy_addr = 0 ; if ( ! txgbe_validate_phy_addr ( hw , phy_addr ) ) { DEBUGOUT ( " \n " , phy_addr ) ; return false ; } if ( txgbe_get_phy_id ( hw ) ) return false ; hw -> phy . type = txgbe_get_phy_type_from_id ( hw -> phy . id ) ; if ( hw -> phy . type == txgbe_phy_unknown ) { u16 ext_ability = 0 ; hw -> phy . read_reg ( hw , TXGBE_MD_PHY_EXT_ABILITY , TXGBE_MD_DEV_PMA_PMD , & ext_ability ) ; if ( ext_ability & ( TXGBE_MD_PHY_10GBASET_ABILITY | TXGBE_MD_PHY_1000BASET_ABILITY ) ) hw -> phy . type = txgbe_phy_cu_unknown ; else hw -> phy . type = txgbe_phy_generic ; } return true ; }
txgbe_identify_extphy - Identify a single address for a PHY
 @hw: pointer to hardware structure
 @phy_addr: PHY address to probe
txgbe_identify_extphy - Identify a single address for a PHY @hw : pointer to hardware structure @phy_addr : PHY address to probe