src/dpdk/drivers/net/txgbe/base/txgbe_phy.c
s32 txgbe_get_phy_id(struct txgbe_hw *hw)
{
	u32 err;
	u16 phy_id_high = 0;
	u16 phy_id_low = 0;

	DEBUGFUNC("txgbe_get_phy_id");

	err = hw->phy.read_reg(hw, TXGBE_MD_PHY_ID_HIGH,
				      TXGBE_MD_DEV_PMA_PMD,
				      &phy_id_high);

	if (err == 0) {
		hw->phy.id = (u32)(phy_id_high << 16);
		err = hw->phy.read_reg(hw, TXGBE_MD_PHY_ID_LOW,
					      TXGBE_MD_DEV_PMA_PMD,
					      &phy_id_low);
		hw->phy.id |= (u32)(phy_id_low & TXGBE_PHY_REVISION_MASK);
		hw->phy.revision = (u32)(phy_id_low & ~TXGBE_PHY_REVISION_MASK);
	}
	DEBUGOUT("PHY_ID_HIGH 0x%04X, PHY_ID_LOW 0x%04X\n",
		  phy_id_high, phy_id_low);

	return err;
}
/**
 *  txgbe_get_phy_id - Get the phy type
 *  @hw: pointer to hardware structure
 *
 **/
Get the phy type
@hw: pointer to hardware structure
Get the phy type @hw : pointer to hardware structure
s32 txgbe_get_phy_id(struct txgbe_hw *hw)
{
	u32 err;
	u16 phy_id_high = 0;
	u16 phy_id_low = 0;
	DEBUGFUNC("txgbe_get_phy_id");
	err = hw->phy.read_reg(hw, TXGBE_MD_PHY_ID_HIGH,
				      TXGBE_MD_DEV_PMA_PMD,
				      &phy_id_high);
	if (err == 0) {
		hw->phy.id = (u32)(phy_id_high << 16);
		err = hw->phy.read_reg(hw, TXGBE_MD_PHY_ID_LOW,
					      TXGBE_MD_DEV_PMA_PMD,
					      &phy_id_low);
		hw->phy.id |= (u32)(phy_id_low & TXGBE_PHY_REVISION_MASK);
		hw->phy.revision = (u32)(phy_id_low & ~TXGBE_PHY_REVISION_MASK);
	}
	DEBUGOUT("PHY_ID_HIGH 0x%04X, PHY_ID_LOW 0x%04X\n",
		  phy_id_high, phy_id_low);
	return err;
}
s32 txgbe_get_phy_id ( struct txgbe_hw * hw ) { u32 err ; u16 phy_id_high = 0 ; u16 phy_id_low = 0 ; DEBUGFUNC ( " " ) ; err = hw -> phy . read_reg ( hw , TXGBE_MD_PHY_ID_HIGH , TXGBE_MD_DEV_PMA_PMD , & phy_id_high ) ; if ( err == 0 ) { hw -> phy . id = ( u32 ) ( phy_id_high << 16 ) ; err = hw -> phy . read_reg ( hw , TXGBE_MD_PHY_ID_LOW , TXGBE_MD_DEV_PMA_PMD , & phy_id_low ) ; hw -> phy . id |= ( u32 ) ( phy_id_low & TXGBE_PHY_REVISION_MASK ) ; hw -> phy . revision = ( u32 ) ( phy_id_low & ~ TXGBE_PHY_REVISION_MASK ) ; } DEBUGOUT ( " \n " , phy_id_high , phy_id_low ) ; return err ; }
txgbe_get_phy_id - Get the phy type
  @hw: pointer to hardware structure
txgbe_get_phy_id - Get the phy type @hw : pointer to hardware structure