Lines Matching refs:phy_addr
93 static int mii_read (struct net_device *dev, int phy_addr, int reg_num);
94 static int mii_write (struct net_device *dev, int phy_addr, int reg_num,
315 np->phy_addr = 1; in find_miiphy()
320 np->phy_addr = i; in find_miiphy()
546 mii_write(dev, np->phy_addr, 31, 0x0001); in rio_hw_init()
547 mii_write(dev, np->phy_addr, 27, 0x01e0); in rio_hw_init()
548 mii_write(dev, np->phy_addr, 31, 0x0002); in rio_hw_init()
549 mii_write(dev, np->phy_addr, 27, 0xeb8e); in rio_hw_init()
550 mii_write(dev, np->phy_addr, 31, 0x0000); in rio_hw_init()
551 mii_write(dev, np->phy_addr, 30, 0x005e); in rio_hw_init()
553 mii_write(dev, np->phy_addr, MII_CTRL1000, 0x0700); in rio_hw_init()
1307 cmd->phy_address = np->phy_addr; in rio_get_settings()
1364 int phy_addr; in rio_ioctl() local
1368 phy_addr = np->phy_addr; in rio_ioctl()
1371 miidata->phy_id = phy_addr; in rio_ioctl()
1374 miidata->val_out = mii_read (dev, phy_addr, miidata->reg_num); in rio_ioctl()
1379 mii_write (dev, phy_addr, miidata->reg_num, miidata->val_in); in rio_ioctl()
1449 mii_read (struct net_device *dev, int phy_addr, int reg_num) in mii_read() argument
1459 cmd = (0x06 << 10 | phy_addr << 5 | reg_num); in mii_read()
1477 mii_write (struct net_device *dev, int phy_addr, int reg_num, u16 data) in mii_write() argument
1485 cmd = (0x5002 << 16) | (phy_addr << 23) | (reg_num << 18) | data; in mii_write()
1495 int phy_addr; in mii_wait_link() local
1499 phy_addr = np->phy_addr; in mii_wait_link()
1502 bmsr = mii_read (dev, phy_addr, MII_BMSR); in mii_wait_link()
1516 int phy_addr; in mii_get_media() local
1520 phy_addr = np->phy_addr; in mii_get_media()
1522 bmsr = mii_read (dev, phy_addr, MII_BMSR); in mii_get_media()
1528 negotiate = mii_read (dev, phy_addr, MII_ADVERTISE) & in mii_get_media()
1529 mii_read (dev, phy_addr, MII_LPA); in mii_get_media()
1530 mscr = mii_read (dev, phy_addr, MII_CTRL1000); in mii_get_media()
1531 mssr = mii_read (dev, phy_addr, MII_STAT1000); in mii_get_media()
1566 __u16 bmcr = mii_read (dev, phy_addr, MII_BMCR); in mii_get_media()
1602 int phy_addr; in mii_set_media() local
1605 phy_addr = np->phy_addr; in mii_set_media()
1610 bmsr = mii_read (dev, phy_addr, MII_BMSR); in mii_set_media()
1611 anar = mii_read (dev, phy_addr, MII_ADVERTISE) & in mii_set_media()
1626 mii_write (dev, phy_addr, MII_ADVERTISE, anar); in mii_set_media()
1629 pscr = mii_read (dev, phy_addr, MII_PHY_SCR); in mii_set_media()
1631 mii_write (dev, phy_addr, MII_PHY_SCR, pscr); in mii_set_media()
1634 mii_write (dev, phy_addr, MII_BMCR, BMCR_RESET); in mii_set_media()
1636 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media()
1641 pscr = mii_read (dev, phy_addr, MII_PHY_SCR); in mii_set_media()
1643 mii_write (dev, phy_addr, MII_PHY_SCR, pscr); in mii_set_media()
1646 bmcr = mii_read (dev, phy_addr, MII_BMCR); in mii_set_media()
1648 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media()
1652 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media()
1656 mii_write (dev, phy_addr, MII_ADVERTISE, 0); in mii_set_media()
1674 mscr = mii_read (dev, phy_addr, MII_CTRL1000); in mii_set_media()
1678 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media()
1689 int phy_addr; in mii_get_media_pcs() local
1693 phy_addr = np->phy_addr; in mii_get_media_pcs()
1695 bmsr = mii_read (dev, phy_addr, PCS_BMSR); in mii_get_media_pcs()
1701 negotiate = mii_read (dev, phy_addr, PCS_ANAR) & in mii_get_media_pcs()
1702 mii_read (dev, phy_addr, PCS_ANLPAR); in mii_get_media_pcs()
1720 __u16 bmcr = mii_read (dev, phy_addr, PCS_BMCR); in mii_get_media_pcs()
1746 int phy_addr; in mii_set_media_pcs() local
1749 phy_addr = np->phy_addr; in mii_set_media_pcs()
1754 esr = mii_read (dev, phy_addr, PCS_ESR); in mii_set_media_pcs()
1755 anar = mii_read (dev, phy_addr, MII_ADVERTISE) & in mii_set_media_pcs()
1763 mii_write (dev, phy_addr, MII_ADVERTISE, anar); in mii_set_media_pcs()
1766 mii_write (dev, phy_addr, MII_BMCR, BMCR_RESET); in mii_set_media_pcs()
1768 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media_pcs()
1774 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media_pcs()
1783 mii_write (dev, phy_addr, MII_BMCR, bmcr); in mii_set_media_pcs()
1787 mii_write (dev, phy_addr, MII_ADVERTISE, 0); in mii_set_media_pcs()