Lines Matching full:mii

13 #include <linux/mii.h>
188 /* confirm MII not busy */ in __smsc75xx_mdio_read()
191 netdev_warn(dev->net, "MII is busy in smsc75xx_mdio_read\n"); in __smsc75xx_mdio_read()
196 phy_id &= dev->mii.phy_id_mask; in __smsc75xx_mdio_read()
197 idx &= dev->mii.reg_num_mask; in __smsc75xx_mdio_read()
209 netdev_warn(dev->net, "Timed out reading MII reg %02X\n", idx); in __smsc75xx_mdio_read()
235 /* confirm MII not busy */ in __smsc75xx_mdio_write()
238 netdev_warn(dev->net, "MII is busy in smsc75xx_mdio_write\n"); in __smsc75xx_mdio_write()
250 phy_id &= dev->mii.phy_id_mask; in __smsc75xx_mdio_write()
251 idx &= dev->mii.reg_num_mask; in __smsc75xx_mdio_write()
263 netdev_warn(dev->net, "Timed out writing MII reg %02X\n", idx); in __smsc75xx_mdio_write()
628 struct mii_if_info *mii = &dev->mii; in smsc75xx_link_reset() local
634 smsc75xx_mdio_write(dev->net, mii->phy_id, PHY_INT_SRC, in smsc75xx_link_reset()
643 mii_check_media(mii, 1, 1); in smsc75xx_link_reset()
644 mii_ethtool_gset(&dev->mii, &ecmd); in smsc75xx_link_reset()
645 lcladv = smsc75xx_mdio_read(dev->net, mii->phy_id, MII_ADVERTISE); in smsc75xx_link_reset()
646 rmtadv = smsc75xx_mdio_read(dev->net, mii->phy_id, MII_LPA); in smsc75xx_link_reset()
755 return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); in smsc75xx_ioctl()
822 /* Initialize MII structure */ in smsc75xx_phy_initialize()
823 dev->mii.dev = dev->net; in smsc75xx_phy_initialize()
824 dev->mii.mdio_read = smsc75xx_mdio_read; in smsc75xx_phy_initialize()
825 dev->mii.mdio_write = smsc75xx_mdio_write; in smsc75xx_phy_initialize()
826 dev->mii.phy_id_mask = 0x1f; in smsc75xx_phy_initialize()
827 dev->mii.reg_num_mask = 0x1f; in smsc75xx_phy_initialize()
828 dev->mii.supports_gmii = 1; in smsc75xx_phy_initialize()
829 dev->mii.phy_id = SMSC75XX_INTERNAL_PHY_ID; in smsc75xx_phy_initialize()
832 smsc75xx_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET); in smsc75xx_phy_initialize()
836 bmcr = smsc75xx_mdio_read(dev->net, dev->mii.phy_id, MII_BMCR); in smsc75xx_phy_initialize()
852 smsc75xx_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE, in smsc75xx_phy_initialize()
855 smsc75xx_mdio_write(dev->net, dev->mii.phy_id, MII_CTRL1000, in smsc75xx_phy_initialize()
859 ret = smsc75xx_mdio_read(dev->net, dev->mii.phy_id, PHY_INT_SRC); in smsc75xx_phy_initialize()
865 smsc75xx_mdio_write(dev->net, dev->mii.phy_id, PHY_INT_SRC, 0xffff); in smsc75xx_phy_initialize()
867 smsc75xx_mdio_write(dev->net, dev->mii.phy_id, PHY_INT_MASK, in smsc75xx_phy_initialize()
869 mii_nway_restart(&dev->mii); in smsc75xx_phy_initialize()
989 struct mii_if_info *mii = &dev->mii; in smsc75xx_phy_gig_workaround() local
994 smsc75xx_mdio_write(dev->net, mii->phy_id, MII_BMCR, 0x4040); in smsc75xx_phy_gig_workaround()
1701 struct mii_if_info *mii = &dev->mii; in smsc75xx_enable_phy_wakeup_interrupts() local
1707 ret = smsc75xx_mdio_read_nopm(dev->net, mii->phy_id, PHY_INT_SRC); in smsc75xx_enable_phy_wakeup_interrupts()
1714 ret = smsc75xx_mdio_read_nopm(dev->net, mii->phy_id, PHY_INT_MASK); in smsc75xx_enable_phy_wakeup_interrupts()
1722 smsc75xx_mdio_write_nopm(dev->net, mii->phy_id, PHY_INT_MASK, ret); in smsc75xx_enable_phy_wakeup_interrupts()
1729 struct mii_if_info *mii = &dev->mii; in smsc75xx_link_ok_nopm() local
1732 /* first, a dummy read, needed to latch some MII phys */ in smsc75xx_link_ok_nopm()
1733 ret = smsc75xx_mdio_read_nopm(dev->net, mii->phy_id, MII_BMSR); in smsc75xx_link_ok_nopm()
1739 ret = smsc75xx_mdio_read_nopm(dev->net, mii->phy_id, MII_BMSR); in smsc75xx_link_ok_nopm()
1865 struct mii_if_info *mii = &dev->mii; in smsc75xx_suspend() local
1869 ret = smsc75xx_mdio_read_nopm(dev->net, mii->phy_id, in smsc75xx_suspend()
1878 smsc75xx_mdio_write_nopm(dev->net, mii->phy_id, in smsc75xx_suspend()