/drivers/net/ |
D | mii.c | 36 static u32 mii_get_an(struct mii_if_info *mii, u16 addr) in mii_get_an() argument 40 advert = mii->mdio_read(mii->dev, mii->phy_id, addr); in mii_get_an() 55 int mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd) in mii_ethtool_gset() argument 57 struct net_device *dev = mii->dev; in mii_ethtool_gset() 65 if (mii->supports_gmii) in mii_ethtool_gset() 76 ecmd->phy_address = mii->phy_id; in mii_ethtool_gset() 81 bmcr = mii->mdio_read(dev, mii->phy_id, MII_BMCR); in mii_ethtool_gset() 82 bmsr = mii->mdio_read(dev, mii->phy_id, MII_BMSR); in mii_ethtool_gset() 83 if (mii->supports_gmii) { in mii_ethtool_gset() 84 ctrl1000 = mii->mdio_read(dev, mii->phy_id, MII_CTRL1000); in mii_ethtool_gset() [all …]
|
/drivers/net/usb/ |
D | asix_devices.c | 82 phy_reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID1); in asix_get_phyid() 93 phy_reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID2); in asix_get_phyid() 106 return mii_link_ok(&dev->mii); in asix_get_link() 113 return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); in asix_ioctl() 178 mii_check_media(&dev->mii, 1, 1); in ax88172_link_reset() 179 mii_ethtool_gset(&dev->mii, &ecmd); in ax88172_link_reset() 238 dev->mii.dev = dev->net; in ax88172_bind() 239 dev->mii.mdio_read = asix_mdio_read; in ax88172_bind() 240 dev->mii.mdio_write = asix_mdio_write; in ax88172_bind() 241 dev->mii.phy_id_mask = 0x3f; in ax88172_bind() [all …]
|
D | smsc95xx.c | 197 phy_id &= dev->mii.phy_id_mask; in __smsc95xx_mdio_read() 198 idx &= dev->mii.reg_num_mask; in __smsc95xx_mdio_read() 249 phy_id &= dev->mii.phy_id_mask; in __smsc95xx_mdio_write() 250 idx &= dev->mii.reg_num_mask; in __smsc95xx_mdio_write() 559 struct mii_if_info *mii = &dev->mii; in smsc95xx_link_reset() local 566 ret = smsc95xx_mdio_read(dev->net, mii->phy_id, PHY_INT_SRC); in smsc95xx_link_reset() 574 mii_check_media(mii, 1, 1); in smsc95xx_link_reset() 575 mii_ethtool_gset(&dev->mii, &ecmd); in smsc95xx_link_reset() 576 lcladv = smsc95xx_mdio_read(dev->net, mii->phy_id, MII_ADVERTISE); in smsc95xx_link_reset() 577 rmtadv = smsc95xx_mdio_read(dev->net, mii->phy_id, MII_LPA); in smsc95xx_link_reset() [all …]
|
D | dm9601.c | 269 return mii_link_ok(&dev->mii); in dm9601_get_link() 276 return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); in dm9601_ioctl() 369 dev->mii.dev = dev->net; in dm9601_bind() 370 dev->mii.mdio_read = dm9601_mdio_read; in dm9601_bind() 371 dev->mii.mdio_write = dm9601_mdio_write; in dm9601_bind() 372 dev->mii.phy_id_mask = 0x1f; in dm9601_bind() 373 dev->mii.reg_num_mask = 0x1f; in dm9601_bind() 423 dm9601_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET); in dm9601_bind() 424 dm9601_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE, in dm9601_bind() 426 mii_nway_restart(&dev->mii); in dm9601_bind() [all …]
|
D | smsc75xx.c | 205 phy_id &= dev->mii.phy_id_mask; in __smsc75xx_mdio_read() 206 idx &= dev->mii.reg_num_mask; in __smsc75xx_mdio_read() 259 phy_id &= dev->mii.phy_id_mask; in __smsc75xx_mdio_write() 260 idx &= dev->mii.reg_num_mask; in __smsc75xx_mdio_write() 637 struct mii_if_info *mii = &dev->mii; in smsc75xx_link_reset() local 643 smsc75xx_mdio_write(dev->net, mii->phy_id, PHY_INT_SRC, in smsc75xx_link_reset() 652 mii_check_media(mii, 1, 1); in smsc75xx_link_reset() 653 mii_ethtool_gset(&dev->mii, &ecmd); in smsc75xx_link_reset() 654 lcladv = smsc75xx_mdio_read(dev->net, mii->phy_id, MII_ADVERTISE); in smsc75xx_link_reset() 655 rmtadv = smsc75xx_mdio_read(dev->net, mii->phy_id, MII_LPA); in smsc75xx_link_reset() [all …]
|
D | mcs7830.c | 338 return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); in mcs7830_ioctl() 515 dev->mii.mdio_read = mcs7830_mdio_read; in mcs7830_bind() 516 dev->mii.mdio_write = mcs7830_mdio_write; in mcs7830_bind() 517 dev->mii.dev = net; in mcs7830_bind() 518 dev->mii.phy_id_mask = 0x3f; in mcs7830_bind() 519 dev->mii.reg_num_mask = 0x1f; in mcs7830_bind() 520 dev->mii.phy_id = *((u8 *) net->dev_addr + 1); in mcs7830_bind()
|
/drivers/net/ethernet/stmicro/stmmac/ |
D | stmmac_mdio.c | 67 unsigned int mii_address = priv->hw->mii.addr; in stmmac_mdio_read() 68 unsigned int mii_data = priv->hw->mii.data; in stmmac_mdio_read() 102 unsigned int mii_address = priv->hw->mii.addr; in stmmac_mdio_write() 103 unsigned int mii_data = priv->hw->mii.data; in stmmac_mdio_write() 133 unsigned int mii_address = priv->hw->mii.addr; in stmmac_mdio_reset() 245 priv->mii = new_bus; in stmmac_mdio_register() 263 if (!priv->mii) in stmmac_mdio_unregister() 266 mdiobus_unregister(priv->mii); in stmmac_mdio_unregister() 267 priv->mii->priv = NULL; in stmmac_mdio_unregister() 268 mdiobus_free(priv->mii); in stmmac_mdio_unregister() [all …]
|
/drivers/net/ethernet/ |
D | netx-eth.c | 100 struct mii_if_info mii; member 200 mii_check_media(&priv->mii, netif_msg_link(priv), 1); in netx_eth_interrupt() 233 mii_check_media(&priv->mii, netif_msg_link(priv), 1); in netx_eth_open() 325 priv->mii.phy_id_mask = 0x1f; in netx_eth_enable() 326 priv->mii.reg_num_mask = 0x1f; in netx_eth_enable() 327 priv->mii.force_media = 0; in netx_eth_enable() 328 priv->mii.full_duplex = 0; in netx_eth_enable() 329 priv->mii.dev = ndev; in netx_eth_enable() 330 priv->mii.mdio_read = netx_eth_phy_read; in netx_eth_enable() 331 priv->mii.mdio_write = netx_eth_phy_write; in netx_eth_enable() [all …]
|
D | fealnx.c | 419 struct mii_if_info mii; member 555 np->mii.dev = dev; in fealnx_init_one() 556 np->mii.mdio_read = mdio_read; in fealnx_init_one() 557 np->mii.mdio_write = mdio_write; in fealnx_init_one() 558 np->mii.phy_id_mask = 0x1f; in fealnx_init_one() 559 np->mii.reg_num_mask = 0x1f; in fealnx_init_one() 625 np->mii.phy_id = np->phys[0]; in fealnx_init_one() 633 np->mii.full_duplex = 1; in fealnx_init_one() 638 np->mii.full_duplex = full_duplex[card_idx]; in fealnx_init_one() 640 if (np->mii.full_duplex) { in fealnx_init_one() [all …]
|
/drivers/net/ethernet/smsc/ |
D | epic100.c | 284 struct mii_if_info mii; member 376 ep->mii.dev = dev; in epic_init_one() 377 ep->mii.mdio_read = mdio_read; in epic_init_one() 378 ep->mii.mdio_write = mdio_write; in epic_init_one() 379 ep->mii.phy_id_mask = 0x1f; in epic_init_one() 380 ep->mii.reg_num_mask = 0x1f; in epic_init_one() 457 ep->mii.advertising = mdio_read(dev, phy, MII_ADVERTISE); in epic_init_one() 461 ep->mii.advertising, mdio_read(dev, phy, 5)); in epic_init_one() 468 ep->mii.phy_id = ep->phys[0]; in epic_init_one() 478 ep->mii.force_media = ep->mii.full_duplex = 1; in epic_init_one() [all …]
|
D | smc911x.c | 716 lp->mii.phy_id = phyaddr & 31; in smc911x_phy_detect() 730 lp->mii.phy_id = 1; in smc911x_phy_detect() 735 dev->name, id1, id2, lp->mii.phy_id); in smc911x_phy_detect() 745 int phyaddr = lp->mii.phy_id; in smc911x_phy_fixed() 851 int phyaddr = lp->mii.phy_id; in smc911x_phy_check_media() 856 if (mii_check_media(&lp->mii, netif_msg_link(lp), init)) { in smc911x_phy_check_media() 860 if (lp->mii.full_duplex) { in smc911x_phy_check_media() 888 int phyaddr = lp->mii.phy_id; in smc911x_phy_configure() 917 if (lp->mii.force_media) { in smc911x_phy_configure() 953 lp->mii.advertising = my_ad_caps; in smc911x_phy_configure() [all …]
|
D | smc91x.c | 896 lp->mii.phy_id = phyaddr & 31; in smc_phy_detect() 910 int phyaddr = lp->mii.phy_id; in smc_phy_fixed() 987 int phy = lp->mii.phy_id; in smc_phy_powerdown() 1014 if (mii_check_media(&lp->mii, netif_msg_link(lp), init)) { in smc_phy_check_media() 1016 if (lp->mii.full_duplex) { in smc_phy_check_media() 1042 int phyaddr = lp->mii.phy_id; in smc_phy_configure() 1076 if (lp->mii.force_media) { in smc_phy_configure() 1112 lp->mii.advertising = my_ad_caps; in smc_phy_configure() 1143 int phyaddr = lp->mii.phy_id; in smc_phy_interrupt() 1543 ret = mii_ethtool_gset(&lp->mii, cmd); in smc_ethtool_getsettings() [all …]
|
/drivers/net/ethernet/intel/ |
D | e100.c | 603 struct mii_if_info mii; member 992 u16 advert = mdio_read(nic->netdev, nic->mii.phy_id, in mdio_ctrl_phy_82552_v() 1090 nic->mii.phy_id_mask = 0x1F; in e100_get_defaults() 1091 nic->mii.reg_num_mask = 0x1F; in e100_get_defaults() 1092 nic->mii.dev = nic->netdev; in e100_get_defaults() 1093 nic->mii.mdio_read = mdio_read; in e100_get_defaults() 1094 nic->mii.mdio_write = mdio_write; in e100_get_defaults() 1136 if (nic->mii.force_media && nic->mii.full_duplex) in e100_configure() 1445 nic->mii.phy_id = 0; /* is this ok for an MII-less PHY? */ in e100_phy_check_without_mii() 1473 nic->mii.phy_id = (addr == 0) ? 1 : (addr == 1) ? 0 : addr; in e100_phy_init() [all …]
|
/drivers/net/ethernet/nuvoton/ |
D | w90p910_ether.c | 161 struct mii_if_info mii; member 213 if (!mii_link_ok(ðer->mii)) { in update_linkspeed() 223 bmsr = w90p910_mdio_read(dev, ether->mii.phy_id, MII_BMSR); in update_linkspeed() 224 bmcr = w90p910_mdio_read(dev, ether->mii.phy_id, MII_BMCR); in update_linkspeed() 230 lpa = w90p910_mdio_read(dev, ether->mii.phy_id, MII_LPA); in update_linkspeed() 867 return generic_mii_ioctl(ðer->mii, data, cmd, NULL); in w90p910_ether_ioctl() 880 return mii_ethtool_gset(ðer->mii, cmd); in w90p910_get_settings() 886 return mii_ethtool_sset(ðer->mii, cmd); in w90p910_set_settings() 892 return mii_nway_restart(ðer->mii); in w90p910_nway_reset() 898 return mii_link_ok(ðer->mii); in w90p910_get_link() [all …]
|
/drivers/net/ethernet/cirrus/ |
D | ep93xx_eth.c | 179 struct mii_if_info mii; member 573 if ((ep93xx_mdio_read(dev, ep->mii.phy_id, MII_BMSR) & 0x0040) != 0) in ep93xx_start_hw() 708 return generic_mii_ioctl(&ep->mii, data, cmd, NULL); in ep93xx_ioctl() 720 return mii_ethtool_gset(&ep->mii, cmd); in ep93xx_get_settings() 726 return mii_ethtool_sset(&ep->mii, cmd); in ep93xx_set_settings() 732 return mii_nway_restart(&ep->mii); in ep93xx_nway_reset() 738 return mii_link_ok(&ep->mii); in ep93xx_get_link() 853 ep->mii.phy_id = data->phy_id; in ep93xx_eth_probe() 854 ep->mii.phy_id_mask = 0x1f; in ep93xx_eth_probe() 855 ep->mii.reg_num_mask = 0x1f; in ep93xx_eth_probe() [all …]
|
/drivers/net/ethernet/faraday/ |
D | ftmac100.c | 81 struct mii_if_info mii; member 831 return mii_ethtool_gset(&priv->mii, cmd); in ftmac100_get_settings() 837 return mii_ethtool_sset(&priv->mii, cmd); in ftmac100_set_settings() 843 return mii_nway_restart(&priv->mii); in ftmac100_nway_reset() 849 return mii_link_ok(&priv->mii); in ftmac100_get_link() 941 mii_check_link(&priv->mii); in ftmac100_poll() 1046 return generic_mii_ioctl(&priv->mii, data, cmd, NULL); in ftmac100_do_ioctl() 1122 priv->mii.phy_id = 0; in ftmac100_probe() 1123 priv->mii.phy_id_mask = 0x1f; in ftmac100_probe() 1124 priv->mii.reg_num_mask = 0x1f; in ftmac100_probe() [all …]
|
/drivers/net/ethernet/sgi/ |
D | ioc3-eth.c | 92 struct mii_if_info mii; member 762 if (ip->mii.full_duplex) { in ioc3_setup_duplex() 777 mii_check_media(&ip->mii, 1, 0); in ioc3_timer() 812 ip->mii.phy_id = -1; in ioc3_mii_init() 818 ip->mii.phy_id = i; in ioc3_mii_init() 1307 ip->mii.phy_id_mask = 0x1f; in ioc3_probe() 1308 ip->mii.reg_num_mask = 0x1f; in ioc3_probe() 1309 ip->mii.dev = dev; in ioc3_probe() 1310 ip->mii.mdio_read = ioc3_mdio_read; in ioc3_probe() 1311 ip->mii.mdio_write = ioc3_mdio_write; in ioc3_probe() [all …]
|
/drivers/net/ethernet/realtek/ |
D | 8139too.c | 613 struct mii_if_info mii; member 1022 tp->mii.dev = dev; in rtl8139_init_one() 1023 tp->mii.mdio_read = mdio_read; in rtl8139_init_one() 1024 tp->mii.mdio_write = mdio_write; in rtl8139_init_one() 1025 tp->mii.phy_id_mask = 0x3f; in rtl8139_init_one() 1026 tp->mii.reg_num_mask = 0x1f; in rtl8139_init_one() 1065 tp->mii.phy_id = tp->phys[0]; in rtl8139_init_one() 1070 tp->mii.full_duplex = (option & 0x210) ? 1 : 0; in rtl8139_init_one() 1073 tp->mii.force_media = 1; in rtl8139_init_one() 1076 tp->mii.full_duplex = full_duplex[board_idx]; in rtl8139_init_one() [all …]
|
/drivers/net/ethernet/micrel/ |
D | ks8851.c | 119 struct mii_if_info mii; member 668 mii_check_link(&ks->mii); in ks8851_irq() 1047 return generic_mii_ioctl(&ks->mii, if_mii(req), cmd, NULL); in ks8851_net_ioctl() 1086 return mii_ethtool_gset(&ks->mii, cmd); in ks8851_get_settings() 1092 return mii_ethtool_sset(&ks->mii, cmd); in ks8851_set_settings() 1098 return mii_link_ok(&ks->mii); in ks8851_get_link() 1104 return mii_nway_restart(&ks->mii); in ks8851_nway_reset() 1440 ks->mii.dev = ndev; in ks8851_probe() 1441 ks->mii.phy_id = 1, in ks8851_probe() 1442 ks->mii.phy_id_mask = 1; in ks8851_probe() [all …]
|
D | ks8851_mll.c | 436 struct mii_if_info mii; member 1275 return generic_mii_ioctl(&ks->mii, if_mii(req), cmd, NULL); in ks_net_ioctl() 1315 return mii_ethtool_gset(&ks->mii, cmd); in ks_get_settings() 1321 return mii_ethtool_sset(&ks->mii, cmd); in ks_set_settings() 1327 return mii_link_ok(&ks->mii); in ks_get_link() 1333 return mii_nway_restart(&ks->mii); in ks_nway_reset() 1579 ks->mii.dev = netdev; in ks8851_probe() 1580 ks->mii.phy_id = 1, in ks8851_probe() 1581 ks->mii.phy_id_mask = 1; in ks8851_probe() 1582 ks->mii.reg_num_mask = 0xf; in ks8851_probe() [all …]
|
/drivers/net/ethernet/freescale/fs_enet/ |
D | Makefile | 11 obj-$(CONFIG_FS_ENET_MDIO_FEC) += mii-fec.o 12 obj-$(CONFIG_FS_ENET_MDIO_FCC) += mii-bitbang.o
|
/drivers/net/ethernet/davicom/ |
D | dm9000.c | 137 struct mii_if_info mii; member 411 return generic_mii_ioctl(&dm->mii, if_mii(req), cmd, NULL); in dm9000_ioctl() 562 mii_ethtool_gset(&dm->mii, cmd); in dm9000_get_settings() 570 return mii_ethtool_sset(&dm->mii, cmd); in dm9000_set_settings() 576 return mii_nway_restart(&dm->mii); in dm9000_nway_reset() 602 ret = mii_link_ok(&dm->mii); in dm9000_get_link() 781 mii_check_media(&db->mii, netif_msg_link(db), 0); in dm9000_poll_work() 1300 mii_check_media(&db->mii, netif_msg_link(db), 1); in dm9000_open() 1564 db->mii.phy_id_mask = 0x1f; in dm9000_probe() 1565 db->mii.reg_num_mask = 0x1f; in dm9000_probe() [all …]
|
/drivers/net/ethernet/tundra/ |
D | tsi108_eth.c | 269 static int mii_speed(struct mii_if_info *mii) in mii_speed() argument 275 if (!mii_link_ok(mii)) in mii_speed() 278 val = (*mii->mdio_read) (mii->dev, mii->phy_id, MII_BMSR); in mii_speed() 282 advert = (*mii->mdio_read) (mii->dev, mii->phy_id, MII_ADVERTISE); in mii_speed() 283 lpa = (*mii->mdio_read) (mii->dev, mii->phy_id, MII_LPA); in mii_speed() 286 if (mii->supports_gmii) in mii_speed() 287 lpa2 = mii->mdio_read(mii->dev, mii->phy_id, MII_STAT1000); in mii_speed()
|
/drivers/net/ethernet/sis/ |
D | sis900.c | 166 struct mii_phy * mii; member 603 sis_priv->mii = NULL; in sis900_mii_probe() 638 mii_phy->next = sis_priv->mii; in sis900_mii_probe() 639 sis_priv->mii = mii_phy; in sis900_mii_probe() 664 if (sis_priv->mii == NULL) { in sis900_mii_probe() 670 sis_priv->mii = NULL; in sis900_mii_probe() 674 if ((sis_priv->mii->phy_id0 == 0x001D) && in sis900_mii_probe() 675 ((sis_priv->mii->phy_id1&0xFFF0) == 0x8000)) in sis900_mii_probe() 679 if ((sis_priv->mii->phy_id0 == 0x0015) && in sis900_mii_probe() 680 ((sis_priv->mii->phy_id1&0xFFF0) == 0xF440)) in sis900_mii_probe() [all …]
|
/drivers/net/ethernet/amd/ |
D | pcnet32.c | 294 mii:1; /* mii port available */ member 677 if (lp->mii) { in pcnet32_get_settings() 692 if (lp->mii) { in pcnet32_set_settings() 722 if (lp->mii) { in pcnet32_get_link() 753 if (lp->mii) { in pcnet32_nway_reset() 1391 if (lp->mii) { in pcnet32_get_regs() 1519 int fdx, mii, fset, dxsuflo; in pcnet32_probe1() local 1556 fdx = mii = fset = dxsuflo = 0; in pcnet32_probe1() 1576 mii = 1; in pcnet32_probe1() 1582 mii = 1; in pcnet32_probe1() [all …]
|