Lines Matching refs:adv

552 	int oldadv, adv;  in genphy_config_advert()  local
561 oldadv = adv = phy_read(phydev, MII_ADVERTISE); in genphy_config_advert()
563 if (adv < 0) in genphy_config_advert()
564 return adv; in genphy_config_advert()
566 adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4 | ADVERTISE_PAUSE_CAP | in genphy_config_advert()
569 adv |= ADVERTISE_10HALF; in genphy_config_advert()
571 adv |= ADVERTISE_10FULL; in genphy_config_advert()
573 adv |= ADVERTISE_100HALF; in genphy_config_advert()
575 adv |= ADVERTISE_100FULL; in genphy_config_advert()
577 adv |= ADVERTISE_PAUSE_CAP; in genphy_config_advert()
579 adv |= ADVERTISE_PAUSE_ASYM; in genphy_config_advert()
581 if (adv != oldadv) { in genphy_config_advert()
582 err = phy_write(phydev, MII_ADVERTISE, adv); in genphy_config_advert()
592 oldadv = adv = phy_read(phydev, MII_CTRL1000); in genphy_config_advert()
594 if (adv < 0) in genphy_config_advert()
595 return adv; in genphy_config_advert()
597 adv &= ~(ADVERTISE_1000FULL | ADVERTISE_1000HALF); in genphy_config_advert()
599 adv |= ADVERTISE_1000HALF; in genphy_config_advert()
601 adv |= ADVERTISE_1000FULL; in genphy_config_advert()
603 if (adv != oldadv) { in genphy_config_advert()
604 err = phy_write(phydev, MII_CTRL1000, adv); in genphy_config_advert()
754 int adv; in genphy_read_status() local
773 adv = phy_read(phydev, MII_CTRL1000); in genphy_read_status()
775 if (adv < 0) in genphy_read_status()
776 return adv; in genphy_read_status()
778 lpagb &= adv << 2; in genphy_read_status()
786 adv = phy_read(phydev, MII_ADVERTISE); in genphy_read_status()
788 if (adv < 0) in genphy_read_status()
789 return adv; in genphy_read_status()
791 lpa &= adv; in genphy_read_status()