FreeBSD/sys/dev/cxgb/common/cxgb_t3_hw.c
/**
 *	t3_phy_advertise_fiber - set fiber PHY advertisement register
 *	@phy: the PHY to operate on
 *	@advert: bitmap of capabilities the PHY should advertise
 *
 *	Sets a fiber PHY's advertisement register to advertise the
 *	requested capabilities.
 */
set fiber PHY advertisement register
@phy: the PHY to operate on
@advert: bitmap of capabilities the PHY should advertise

Sets a fiber PHY's advertisement register to advertise the
requested capabilities.
set fiber PHY advertisement register @phy : the PHY to operate on @advert : bitmap of capabilities the PHY should advertise Sets a fiber PHY ' s advertisement register to advertise the requested capabilities .
int t3_phy_advertise_fiber(struct cphy *phy, unsigned int advert)
{
	unsigned int val = 0;
	if (advert & ADVERTISED_1000baseT_Half)
		val |= ADVERTISE_1000XHALF;
	if (advert & ADVERTISED_1000baseT_Full)
		val |= ADVERTISE_1000XFULL;
	if (advert & ADVERTISED_Pause)
		val |= ADVERTISE_1000XPAUSE;
	if (advert & ADVERTISED_Asym_Pause)
		val |= ADVERTISE_1000XPSE_ASYM;
	return mdio_write(phy, 0, MII_ADVERTISE, val);
}
int t3_phy_advertise_fiber ( struct cphy * phy , unsigned int advert ) { unsigned int val = 0 ; if ( advert & ADVERTISED_1000baseT_Half ) val |= ADVERTISE_1000XHALF ; if ( advert & ADVERTISED_1000baseT_Full ) val |= ADVERTISE_1000XFULL ; if ( advert & ADVERTISED_Pause ) val |= ADVERTISE_1000XPAUSE ; if ( advert & ADVERTISED_Asym_Pause ) val |= ADVERTISE_1000XPSE_ASYM ; return mdio_write ( phy , 0 , MII_ADVERTISE , val ) ; }
t3_phy_advertise_fiber - set fiber PHY advertisement register
      @phy: the PHY to operate on
      @advert: bitmap of capabilities the PHY should advertise
t3_phy_advertise_fiber - set fiber PHY advertisement register @phy : the PHY to operate on @advert : bitmap of capabilities the PHY should advertise