Lines Matching refs:phy_addr
84 static int mii_read (struct net_device *dev, int phy_addr, int reg_num);
85 static int mii_write (struct net_device *dev, int phy_addr, int reg_num,
309 np->phy_addr = 1; in find_miiphy()
314 np->phy_addr = i; in find_miiphy()
540 mii_write(dev, np->phy_addr, 31, 0x0001); in rio_hw_init()
541 mii_write(dev, np->phy_addr, 27, 0x01e0); in rio_hw_init()
542 mii_write(dev, np->phy_addr, 31, 0x0002); in rio_hw_init()
543 mii_write(dev, np->phy_addr, 27, 0xeb8e); in rio_hw_init()
544 mii_write(dev, np->phy_addr, 31, 0x0000); in rio_hw_init()
545 mii_write(dev, np->phy_addr, 30, 0x005e); in rio_hw_init()
547 mii_write(dev, np->phy_addr, MII_CTRL1000, 0x0700); in rio_hw_init()
1274 cmd->base.phy_address = np->phy_addr; in rio_get_link_ksettings()
1341 int phy_addr; in rio_ioctl() local
1345 phy_addr = np->phy_addr; in rio_ioctl()
1348 miidata->phy_id = phy_addr; in rio_ioctl()
1351 miidata->val_out = mii_read (dev, phy_addr, miidata->reg_num); in rio_ioctl()
1356 mii_write (dev, phy_addr, miidata->reg_num, miidata->val_in); in rio_ioctl()
1426 mii_read (struct net_device *dev, int phy_addr, int reg_num) in mii_read() argument
1436 cmd = (0x06 << 10 | phy_addr << 5 | reg_num); in mii_read()
1454 mii_write (struct net_device *dev, int phy_addr, int reg_num, u16 data) in mii_write() argument
1462 cmd = (0x5002 << 16) | (phy_addr << 23) | (reg_num << 18) | data; in mii_write()
1472 int phy_addr; in mii_wait_link() local
1476 phy_addr = np->phy_addr; in mii_wait_link()
1479 bmsr = mii_read (dev, phy_addr, MII_BMSR); in mii_wait_link()
1493 int phy_addr; in mii_get_media() local
1497 phy_addr = np->phy_addr; in mii_get_media()
1499 bmsr = mii_read (dev, phy_addr, MII_BMSR); in mii_get_media()
1505 negotiate = mii_read (dev, phy_addr, MII_ADVERTISE) & in mii_get_media()
1506 mii_read (dev, phy_addr, MII_LPA); in mii_get_media()
1507 mscr = mii_read (dev, phy_addr, MII_CTRL1000); in mii_get_media()
1508 mssr = mii_read (dev, phy_addr, MII_STAT1000); in mii_get_media()
1543 __u16 bmcr = mii_read (dev, phy_addr, MII_BMCR); in mii_get_media()
1579 int phy_addr; in mii_set_media() local
1582 phy_addr = np->phy_addr; in mii_set_media()
1587 bmsr = mii_read (dev, phy_addr, MII_BMSR); in mii_set_media()
1588 anar = mii_read (dev, phy_addr, MII_ADVERTISE) & in mii_set_media()
1603 mii_write (dev, phy_addr, MII_ADVERTISE, anar); in mii_set_media()
1606 pscr = mii_read (dev, phy_addr, MII_PHY_SCR); in mii_set_media()
1608 mii_write (dev, phy_addr, MII_PHY_SCR, pscr); in mii_set_media()
1611 mii_write (dev, phy_addr, MII_BMCR, BMCR_RESET); in mii_set_media()
1613 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media()
1618 pscr = mii_read (dev, phy_addr, MII_PHY_SCR); in mii_set_media()
1620 mii_write (dev, phy_addr, MII_PHY_SCR, pscr); in mii_set_media()
1623 bmcr = mii_read (dev, phy_addr, MII_BMCR); in mii_set_media()
1625 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media()
1629 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media()
1633 mii_write (dev, phy_addr, MII_ADVERTISE, 0); in mii_set_media()
1651 mscr = mii_read (dev, phy_addr, MII_CTRL1000); in mii_set_media()
1655 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media()
1666 int phy_addr; in mii_get_media_pcs() local
1670 phy_addr = np->phy_addr; in mii_get_media_pcs()
1672 bmsr = mii_read (dev, phy_addr, PCS_BMSR); in mii_get_media_pcs()
1678 negotiate = mii_read (dev, phy_addr, PCS_ANAR) & in mii_get_media_pcs()
1679 mii_read (dev, phy_addr, PCS_ANLPAR); in mii_get_media_pcs()
1697 __u16 bmcr = mii_read (dev, phy_addr, PCS_BMCR); in mii_get_media_pcs()
1723 int phy_addr; in mii_set_media_pcs() local
1726 phy_addr = np->phy_addr; in mii_set_media_pcs()
1731 esr = mii_read (dev, phy_addr, PCS_ESR); in mii_set_media_pcs()
1732 anar = mii_read (dev, phy_addr, MII_ADVERTISE) & in mii_set_media_pcs()
1740 mii_write (dev, phy_addr, MII_ADVERTISE, anar); in mii_set_media_pcs()
1743 mii_write (dev, phy_addr, MII_BMCR, BMCR_RESET); in mii_set_media_pcs()
1745 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media_pcs()
1751 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media_pcs()
1760 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media_pcs()
1764 mii_write (dev, phy_addr, MII_ADVERTISE, 0); in mii_set_media_pcs()