/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 | 81 phy_reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID1); in asix_get_phyid() 92 phy_reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID2); in asix_get_phyid() 105 return mii_link_ok(&dev->mii); in asix_get_link() 112 return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); in asix_ioctl() 177 mii_check_media(&dev->mii, 1, 1); in ax88172_link_reset() 178 mii_ethtool_gset(&dev->mii, &ecmd); in ax88172_link_reset() 237 dev->mii.dev = dev->net; in ax88172_bind() 238 dev->mii.mdio_read = asix_mdio_read; in ax88172_bind() 239 dev->mii.mdio_write = asix_mdio_write; in ax88172_bind() 240 dev->mii.phy_id_mask = 0x3f; in ax88172_bind() [all …]
|
D | sr9700.c | 242 return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); in sr9700_ioctl() 320 struct mii_if_info *mii; in sr9700_bind() local 336 mii = &dev->mii; in sr9700_bind() 337 mii->dev = netdev; in sr9700_bind() 338 mii->mdio_read = sr_mdio_read; in sr9700_bind() 339 mii->mdio_write = sr_mdio_write; in sr9700_bind() 340 mii->phy_id_mask = 0x1f; in sr9700_bind() 341 mii->reg_num_mask = 0x1f; in sr9700_bind() 368 sr_mdio_write(netdev, mii->phy_id, MII_BMCR, BMCR_RESET); in sr9700_bind() 369 sr_mdio_write(netdev, mii->phy_id, MII_ADVERTISE, ADVERTISE_ALL | in sr9700_bind() [all …]
|
D | smsc95xx.c | 195 phy_id &= dev->mii.phy_id_mask; in __smsc95xx_mdio_read() 196 idx &= dev->mii.reg_num_mask; in __smsc95xx_mdio_read() 247 phy_id &= dev->mii.phy_id_mask; in __smsc95xx_mdio_write() 248 idx &= dev->mii.reg_num_mask; in __smsc95xx_mdio_write() 557 struct mii_if_info *mii = &dev->mii; in smsc95xx_link_reset() local 564 ret = smsc95xx_mdio_read(dev->net, mii->phy_id, PHY_INT_SRC); in smsc95xx_link_reset() 572 mii_check_media(mii, 1, 1); in smsc95xx_link_reset() 573 mii_ethtool_gset(&dev->mii, &ecmd); in smsc95xx_link_reset() 574 lcladv = smsc95xx_mdio_read(dev->net, mii->phy_id, MII_ADVERTISE); in smsc95xx_link_reset() 575 rmtadv = smsc95xx_mdio_read(dev->net, mii->phy_id, MII_LPA); in smsc95xx_link_reset() [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 | sr9800.c | 379 phy_reg = sr_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID1); in sr_get_phyid() 390 phy_reg = sr_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID2); in sr_get_phyid() 486 return mii_link_ok(&dev->mii); in sr_get_link() 493 return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); in sr_ioctl() 540 mii_check_media(&dev->mii, 1, 1); in sr9800_link_reset() 541 mii_ethtool_gset(&dev->mii, &ecmd); in sr9800_link_reset() 564 sr_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET); in sr9800_set_default_mode() 565 sr_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE, in sr9800_set_default_mode() 567 mii_nway_restart(&dev->mii); in sr9800_set_default_mode() 766 dev->mii.dev = dev->net; in sr9800_bind() [all …]
|
D | dm9601.c | 267 return mii_link_ok(&dev->mii); in dm9601_get_link() 274 return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); in dm9601_ioctl() 372 dev->mii.dev = dev->net; in dm9601_bind() 373 dev->mii.mdio_read = dm9601_mdio_read; in dm9601_bind() 374 dev->mii.mdio_write = dm9601_mdio_write; in dm9601_bind() 375 dev->mii.phy_id_mask = 0x1f; in dm9601_bind() 376 dev->mii.reg_num_mask = 0x1f; in dm9601_bind() 426 dm9601_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET); in dm9601_bind() 427 dm9601_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE, in dm9601_bind() 429 mii_nway_restart(&dev->mii); in dm9601_bind() [all …]
|
D | ch9200.c | 220 mii_check_media(&dev->mii, 1, 1); in ch9200_link_reset() 221 mii_ethtool_gset(&dev->mii, &ecmd); in ch9200_link_reset() 347 dev->mii.dev = dev->net; in ch9200_bind() 348 dev->mii.mdio_read = ch9200_mdio_read; in ch9200_bind() 349 dev->mii.mdio_write = ch9200_mdio_write; in ch9200_bind() 350 dev->mii.reg_num_mask = 0x1f; in ch9200_bind() 352 dev->mii.phy_id_mask = 0x1f; in ch9200_bind() 356 mii_nway_restart(&dev->mii); in ch9200_bind()
|
D | mcs7830.c | 343 return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); in mcs7830_ioctl() 519 dev->mii.mdio_read = mcs7830_mdio_read; in mcs7830_bind() 520 dev->mii.mdio_write = mcs7830_mdio_write; in mcs7830_bind() 521 dev->mii.dev = net; in mcs7830_bind() 522 dev->mii.phy_id_mask = 0x3f; in mcs7830_bind() 523 dev->mii.reg_num_mask = 0x1f; in mcs7830_bind() 524 dev->mii.phy_id = *((u8 *) net->dev_addr + 1); in mcs7830_bind()
|
/drivers/net/ethernet/samsung/sxgbe/ |
D | sxgbe_mdio.c | 52 writel(reg, sp->ioaddr + sp->hw->mii.data); in sxgbe_mdio_ctrl_data() 63 writel(reg, sp->ioaddr + sp->hw->mii.addr); in sxgbe_mdio_c45() 77 writel(reg, sp->ioaddr + sp->hw->mii.addr); in sxgbe_mdio_c22() 85 const struct mii_regs *mii = &sp->hw->mii; in sxgbe_mdio_access() local 88 rc = sxgbe_mdio_busy_wait(sp->ioaddr, mii->data); in sxgbe_mdio_access() 102 return sxgbe_mdio_busy_wait(sp->ioaddr, mii->data); in sxgbe_mdio_access() 122 return readl(priv->ioaddr + priv->hw->mii.data) & 0xffff; in sxgbe_mdio_read() 229 priv->mii = mdio_bus; in sxgbe_mdio_register() 245 if (!priv->mii) in sxgbe_mdio_unregister() 248 mdiobus_unregister(priv->mii); in sxgbe_mdio_unregister() [all …]
|
/drivers/bcma/ |
D | driver_chipcommon_b.c | 37 writel(offset, ccb->mii + 0x00); in bcma_chipco_b_mii_write() 38 bcma_wait_reg(bus, ccb->mii + 0x00, 0x0100, 0x0000, 100); in bcma_chipco_b_mii_write() 39 writel(value, ccb->mii + 0x04); in bcma_chipco_b_mii_write() 40 bcma_wait_reg(bus, ccb->mii + 0x00, 0x0100, 0x0000, 100); in bcma_chipco_b_mii_write() 50 ccb->mii = ioremap_nocache(ccb->core->addr_s[1], BCMA_CORE_SIZE); in bcma_core_chipcommon_b_init() 51 if (!ccb->mii) in bcma_core_chipcommon_b_init() 59 if (ccb->mii) in bcma_core_chipcommon_b_free() 60 iounmap(ccb->mii); in bcma_core_chipcommon_b_free()
|
/drivers/net/ethernet/stmicro/stmmac/ |
D | stmmac_mdio.c | 70 unsigned int mii_address = priv->hw->mii.addr; in stmmac_mdio_read() 71 unsigned int mii_data = priv->hw->mii.data; in stmmac_mdio_read() 105 unsigned int mii_address = priv->hw->mii.addr; in stmmac_mdio_write() 106 unsigned int mii_data = priv->hw->mii.data; in stmmac_mdio_write() 136 unsigned int mii_address = priv->hw->mii.addr; in stmmac_mdio_reset() 295 priv->mii = new_bus; in stmmac_mdio_register() 313 if (!priv->mii) in stmmac_mdio_unregister() 316 mdiobus_unregister(priv->mii); in stmmac_mdio_unregister() 317 priv->mii->priv = NULL; in stmmac_mdio_unregister() 318 mdiobus_free(priv->mii); in stmmac_mdio_unregister() [all …]
|
/drivers/net/ethernet/ |
D | netx-eth.c | 99 struct mii_if_info mii; member 199 mii_check_media(&priv->mii, netif_msg_link(priv), 1); in netx_eth_interrupt() 232 mii_check_media(&priv->mii, netif_msg_link(priv), 1); in netx_eth_open() 322 priv->mii.phy_id_mask = 0x1f; in netx_eth_enable() 323 priv->mii.reg_num_mask = 0x1f; in netx_eth_enable() 324 priv->mii.force_media = 0; in netx_eth_enable() 325 priv->mii.full_duplex = 0; in netx_eth_enable() 326 priv->mii.dev = ndev; in netx_eth_enable() 327 priv->mii.mdio_read = netx_eth_phy_read; in netx_eth_enable() 328 priv->mii.mdio_write = netx_eth_phy_write; in netx_eth_enable() [all …]
|
/drivers/net/ethernet/smsc/ |
D | epic100.c | 284 struct mii_if_info mii; member 374 ep->mii.dev = dev; in epic_init_one() 375 ep->mii.mdio_read = mdio_read; in epic_init_one() 376 ep->mii.mdio_write = mdio_write; in epic_init_one() 377 ep->mii.phy_id_mask = 0x1f; in epic_init_one() 378 ep->mii.reg_num_mask = 0x1f; in epic_init_one() 455 ep->mii.advertising = mdio_read(dev, phy, MII_ADVERTISE); in epic_init_one() 459 ep->mii.advertising, mdio_read(dev, phy, 5)); in epic_init_one() 466 ep->mii.phy_id = ep->phys[0]; in epic_init_one() 476 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 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 …]
|
/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() 1442 nic->mii.phy_id = 0; /* is this ok for an MII-less PHY? */ in e100_phy_check_without_mii() 1470 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 | 178 struct mii_if_info mii; member 574 if ((ep93xx_mdio_read(dev, ep->mii.phy_id, MII_BMSR) & 0x0040) != 0) in ep93xx_start_hw() 709 return generic_mii_ioctl(&ep->mii, data, cmd, NULL); in ep93xx_ioctl() 721 return mii_ethtool_gset(&ep->mii, cmd); in ep93xx_get_settings() 727 return mii_ethtool_sset(&ep->mii, cmd); in ep93xx_set_settings() 733 return mii_nway_restart(&ep->mii); in ep93xx_nway_reset() 739 return mii_link_ok(&ep->mii); in ep93xx_get_link() 854 ep->mii.phy_id = data->phy_id; in ep93xx_eth_probe() 855 ep->mii.phy_id_mask = 0x1f; in ep93xx_eth_probe() 856 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() 940 mii_check_link(&priv->mii); in ftmac100_poll() 1045 return generic_mii_ioctl(&priv->mii, data, cmd, NULL); in ftmac100_do_ioctl() 1121 priv->mii.phy_id = 0; in ftmac100_probe() 1122 priv->mii.phy_id_mask = 0x1f; in ftmac100_probe() 1123 priv->mii.reg_num_mask = 0x1f; in ftmac100_probe() [all …]
|
/drivers/net/ethernet/davicom/ |
D | dm9000.c | 142 struct mii_if_info mii; member 429 return generic_mii_ioctl(&dm->mii, if_mii(req), cmd, NULL); in dm9000_ioctl() 580 mii_ethtool_gset(&dm->mii, cmd); in dm9000_get_settings() 588 return mii_ethtool_sset(&dm->mii, cmd); in dm9000_set_settings() 594 return mii_nway_restart(&dm->mii); in dm9000_nway_reset() 620 ret = mii_link_ok(&dm->mii); in dm9000_get_link() 765 struct mii_if_info *mii = &db->mii; in dm9000_show_carrier() local 769 lpa = mii->mdio_read(mii->dev, mii->phy_id, MII_LPA); in dm9000_show_carrier() 804 mii_check_media(&db->mii, netif_msg_link(db), 0); in dm9000_poll_work() 1338 mii_check_media(&db->mii, netif_msg_link(db), 1); in dm9000_open() [all …]
|
/drivers/net/ethernet/sgi/ |
D | ioc3-eth.c | 91 struct mii_if_info mii; member 761 if (ip->mii.full_duplex) { in ioc3_setup_duplex() 776 mii_check_media(&ip->mii, 1, 0); in ioc3_timer() 811 ip->mii.phy_id = -1; in ioc3_mii_init() 817 ip->mii.phy_id = i; in ioc3_mii_init() 1306 ip->mii.phy_id_mask = 0x1f; in ioc3_probe() 1307 ip->mii.reg_num_mask = 0x1f; in ioc3_probe() 1308 ip->mii.dev = dev; in ioc3_probe() 1309 ip->mii.mdio_read = ioc3_mdio_read; in ioc3_probe() 1310 ip->mii.mdio_write = ioc3_mdio_write; in ioc3_probe() [all …]
|
/drivers/net/ethernet/realtek/ |
D | 8139too.c | 617 struct mii_if_info mii; member 1036 tp->mii.dev = dev; in rtl8139_init_one() 1037 tp->mii.mdio_read = mdio_read; in rtl8139_init_one() 1038 tp->mii.mdio_write = mdio_write; in rtl8139_init_one() 1039 tp->mii.phy_id_mask = 0x3f; in rtl8139_init_one() 1040 tp->mii.reg_num_mask = 0x1f; in rtl8139_init_one() 1079 tp->mii.phy_id = tp->phys[0]; in rtl8139_init_one() 1084 tp->mii.full_duplex = (option & 0x210) ? 1 : 0; in rtl8139_init_one() 1087 tp->mii.force_media = 1; in rtl8139_init_one() 1090 tp->mii.full_duplex = full_duplex[board_idx]; in rtl8139_init_one() [all …]
|
/drivers/net/ethernet/micrel/ |
D | ks8851.c | 125 struct mii_if_info mii; member 677 mii_check_link(&ks->mii); in ks8851_irq() 873 mii_check_link(&ks->mii); in ks8851_net_open() 1068 return generic_mii_ioctl(&ks->mii, if_mii(req), cmd, NULL); in ks8851_net_ioctl() 1107 return mii_ethtool_gset(&ks->mii, cmd); in ks8851_get_settings() 1113 return mii_ethtool_sset(&ks->mii, cmd); in ks8851_set_settings() 1119 return mii_link_ok(&ks->mii); in ks8851_get_link() 1125 return mii_nway_restart(&ks->mii); in ks8851_nway_reset() 1510 ks->mii.dev = ndev; in ks8851_probe() 1511 ks->mii.phy_id = 1, 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/freescale/ |
D | fsl_pq_mdio.c | 60 struct fsl_pq_mii mii; member 239 struct fsl_pq_mdio __iomem *mdio = container_of(p, struct fsl_pq_mdio, mii); in get_ucc_tbipa() 329 .mii_offset = offsetof(struct fsl_pq_mdio, mii), 336 .mii_offset = offsetof(struct fsl_pq_mdio, mii), 343 .mii_offset = offsetof(struct fsl_pq_mdio, mii),
|