src/dpdk/drivers/net/txgbe/base/txgbe_phy.c
static s32 txgbe_get_copper_speeds_supported(struct txgbe_hw *hw)
{
	s32 err;
	u16 speed_ability;

	err = hw->phy.read_reg(hw, TXGBE_MD_PHY_SPEED_ABILITY,
				      TXGBE_MD_DEV_PMA_PMD,
				      &speed_ability);
	if (err)
		return err;

	if (speed_ability & TXGBE_MD_PHY_SPEED_10G)
		hw->phy.speeds_supported |= TXGBE_LINK_SPEED_10GB_FULL;
	if (speed_ability & TXGBE_MD_PHY_SPEED_1G)
		hw->phy.speeds_supported |= TXGBE_LINK_SPEED_1GB_FULL;
	if (speed_ability & TXGBE_MD_PHY_SPEED_100M)
		hw->phy.speeds_supported |= TXGBE_LINK_SPEED_100M_FULL;

	return err;
}
/**
 * txgbe_get_copper_speeds_supported - Get copper link speeds from phy
 * @hw: pointer to hardware structure
 *
 * Determines the supported link capabilities by reading the PHY auto
 * negotiation register.
 **/
Get copper link speeds from phy
@hw: pointer to hardware structure

Determines the supported link capabilities by reading the PHY auto
negotiation register.
Get copper link speeds from phy @hw : pointer to hardware structure Determines the supported link capabilities by reading the PHY auto negotiation register .
static s32 txgbe_get_copper_speeds_supported(struct txgbe_hw *hw)
{
	s32 err;
	u16 speed_ability;
	err = hw->phy.read_reg(hw, TXGBE_MD_PHY_SPEED_ABILITY,
				      TXGBE_MD_DEV_PMA_PMD,
				      &speed_ability);
	if (err)
		return err;
	if (speed_ability & TXGBE_MD_PHY_SPEED_10G)
		hw->phy.speeds_supported |= TXGBE_LINK_SPEED_10GB_FULL;
	if (speed_ability & TXGBE_MD_PHY_SPEED_1G)
		hw->phy.speeds_supported |= TXGBE_LINK_SPEED_1GB_FULL;
	if (speed_ability & TXGBE_MD_PHY_SPEED_100M)
		hw->phy.speeds_supported |= TXGBE_LINK_SPEED_100M_FULL;
	return err;
}
static s32 txgbe_get_copper_speeds_supported ( struct txgbe_hw * hw ) { s32 err ; u16 speed_ability ; err = hw -> phy . read_reg ( hw , TXGBE_MD_PHY_SPEED_ABILITY , TXGBE_MD_DEV_PMA_PMD , & speed_ability ) ; if ( err ) return err ; if ( speed_ability & TXGBE_MD_PHY_SPEED_10G ) hw -> phy . speeds_supported |= TXGBE_LINK_SPEED_10GB_FULL ; if ( speed_ability & TXGBE_MD_PHY_SPEED_1G ) hw -> phy . speeds_supported |= TXGBE_LINK_SPEED_1GB_FULL ; if ( speed_ability & TXGBE_MD_PHY_SPEED_100M ) hw -> phy . speeds_supported |= TXGBE_LINK_SPEED_100M_FULL ; return err ; }
txgbe_get_copper_speeds_supported - Get copper link speeds from phy
 @hw: pointer to hardware structure
txgbe_get_copper_speeds_supported - Get copper link speeds from phy @hw : pointer to hardware structure