Lines Matching refs:phy_reg
720 int phy_reg; in get_phy_c45_devs_in_pkg() local
722 phy_reg = mdiobus_c45_read(bus, addr, dev_addr, MDIO_DEVS2); in get_phy_c45_devs_in_pkg()
723 if (phy_reg < 0) in get_phy_c45_devs_in_pkg()
725 *devices_in_package = phy_reg << 16; in get_phy_c45_devs_in_pkg()
727 phy_reg = mdiobus_c45_read(bus, addr, dev_addr, MDIO_DEVS1); in get_phy_c45_devs_in_pkg()
728 if (phy_reg < 0) in get_phy_c45_devs_in_pkg()
730 *devices_in_package |= phy_reg; in get_phy_c45_devs_in_pkg()
753 int i, ret, phy_reg; in get_phy_c45_ids() local
774 phy_reg = get_phy_c45_devs_in_pkg(bus, addr, i, &devs_in_pkg); in get_phy_c45_ids()
775 if (phy_reg < 0) in get_phy_c45_ids()
784 phy_reg = get_phy_c45_devs_in_pkg(bus, addr, 0, &devs_in_pkg); in get_phy_c45_ids()
785 if (phy_reg < 0) in get_phy_c45_ids()
811 phy_reg = mdiobus_c45_read(bus, addr, i, MII_PHYSID1); in get_phy_c45_ids()
812 if (phy_reg < 0) in get_phy_c45_ids()
814 c45_ids->device_ids[i] = phy_reg << 16; in get_phy_c45_ids()
816 phy_reg = mdiobus_c45_read(bus, addr, i, MII_PHYSID2); in get_phy_c45_ids()
817 if (phy_reg < 0) in get_phy_c45_ids()
819 c45_ids->device_ids[i] |= phy_reg; in get_phy_c45_ids()
842 int phy_reg; in get_phy_c22_id() local
845 phy_reg = mdiobus_read(bus, addr, MII_PHYSID1); in get_phy_c22_id()
846 if (phy_reg < 0) { in get_phy_c22_id()
848 return (phy_reg == -EIO || phy_reg == -ENODEV) ? -ENODEV : -EIO; in get_phy_c22_id()
851 *phy_id = phy_reg << 16; in get_phy_c22_id()
854 phy_reg = mdiobus_read(bus, addr, MII_PHYSID2); in get_phy_c22_id()
855 if (phy_reg < 0) { in get_phy_c22_id()
857 return (phy_reg == -EIO || phy_reg == -ENODEV) ? -ENODEV : -EIO; in get_phy_c22_id()
860 *phy_id |= phy_reg; in get_phy_c22_id()