Lines Matching refs:phy_addr
89 static int mii_read (struct net_device *dev, int phy_addr, int reg_num);
90 static int mii_write (struct net_device *dev, int phy_addr, int reg_num,
314 np->phy_addr = 1; in find_miiphy()
319 np->phy_addr = i; in find_miiphy()
545 mii_write(dev, np->phy_addr, 31, 0x0001); in rio_hw_init()
546 mii_write(dev, np->phy_addr, 27, 0x01e0); in rio_hw_init()
547 mii_write(dev, np->phy_addr, 31, 0x0002); in rio_hw_init()
548 mii_write(dev, np->phy_addr, 27, 0xeb8e); in rio_hw_init()
549 mii_write(dev, np->phy_addr, 31, 0x0000); in rio_hw_init()
550 mii_write(dev, np->phy_addr, 30, 0x005e); in rio_hw_init()
552 mii_write(dev, np->phy_addr, MII_CTRL1000, 0x0700); in rio_hw_init()
1286 cmd->base.phy_address = np->phy_addr; in rio_get_link_ksettings()
1353 int phy_addr; in rio_ioctl() local
1357 phy_addr = np->phy_addr; in rio_ioctl()
1360 miidata->phy_id = phy_addr; in rio_ioctl()
1363 miidata->val_out = mii_read (dev, phy_addr, miidata->reg_num); in rio_ioctl()
1368 mii_write (dev, phy_addr, miidata->reg_num, miidata->val_in); in rio_ioctl()
1438 mii_read (struct net_device *dev, int phy_addr, int reg_num) in mii_read() argument
1448 cmd = (0x06 << 10 | phy_addr << 5 | reg_num); in mii_read()
1466 mii_write (struct net_device *dev, int phy_addr, int reg_num, u16 data) in mii_write() argument
1474 cmd = (0x5002 << 16) | (phy_addr << 23) | (reg_num << 18) | data; in mii_write()
1484 int phy_addr; in mii_wait_link() local
1488 phy_addr = np->phy_addr; in mii_wait_link()
1491 bmsr = mii_read (dev, phy_addr, MII_BMSR); in mii_wait_link()
1505 int phy_addr; in mii_get_media() local
1509 phy_addr = np->phy_addr; in mii_get_media()
1511 bmsr = mii_read (dev, phy_addr, MII_BMSR); in mii_get_media()
1517 negotiate = mii_read (dev, phy_addr, MII_ADVERTISE) & in mii_get_media()
1518 mii_read (dev, phy_addr, MII_LPA); in mii_get_media()
1519 mscr = mii_read (dev, phy_addr, MII_CTRL1000); in mii_get_media()
1520 mssr = mii_read (dev, phy_addr, MII_STAT1000); in mii_get_media()
1555 __u16 bmcr = mii_read (dev, phy_addr, MII_BMCR); in mii_get_media()
1591 int phy_addr; in mii_set_media() local
1594 phy_addr = np->phy_addr; in mii_set_media()
1599 bmsr = mii_read (dev, phy_addr, MII_BMSR); in mii_set_media()
1600 anar = mii_read (dev, phy_addr, MII_ADVERTISE) & in mii_set_media()
1615 mii_write (dev, phy_addr, MII_ADVERTISE, anar); 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 mii_write (dev, phy_addr, MII_BMCR, BMCR_RESET); in mii_set_media()
1625 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media()
1630 pscr = mii_read (dev, phy_addr, MII_PHY_SCR); in mii_set_media()
1632 mii_write (dev, phy_addr, MII_PHY_SCR, pscr); in mii_set_media()
1635 bmcr = mii_read (dev, phy_addr, MII_BMCR); in mii_set_media()
1637 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media()
1641 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media()
1645 mii_write (dev, phy_addr, MII_ADVERTISE, 0); in mii_set_media()
1663 mscr = mii_read (dev, phy_addr, MII_CTRL1000); in mii_set_media()
1667 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media()
1678 int phy_addr; in mii_get_media_pcs() local
1682 phy_addr = np->phy_addr; in mii_get_media_pcs()
1684 bmsr = mii_read (dev, phy_addr, PCS_BMSR); in mii_get_media_pcs()
1690 negotiate = mii_read (dev, phy_addr, PCS_ANAR) & in mii_get_media_pcs()
1691 mii_read (dev, phy_addr, PCS_ANLPAR); in mii_get_media_pcs()
1709 __u16 bmcr = mii_read (dev, phy_addr, PCS_BMCR); in mii_get_media_pcs()
1735 int phy_addr; in mii_set_media_pcs() local
1738 phy_addr = np->phy_addr; in mii_set_media_pcs()
1743 esr = mii_read (dev, phy_addr, PCS_ESR); in mii_set_media_pcs()
1744 anar = mii_read (dev, phy_addr, MII_ADVERTISE) & in mii_set_media_pcs()
1752 mii_write (dev, phy_addr, MII_ADVERTISE, anar); in mii_set_media_pcs()
1755 mii_write (dev, phy_addr, MII_BMCR, BMCR_RESET); in mii_set_media_pcs()
1757 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media_pcs()
1763 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media_pcs()
1772 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media_pcs()
1776 mii_write (dev, phy_addr, MII_ADVERTISE, 0); in mii_set_media_pcs()