/linux/drivers/net/ |
A D | mii.c | 40 advert = mii->mdio_read(mii->dev, mii->phy_id, addr); in mii_get_an() 371 advert2 = mii->mdio_read(dev, mii->phy_id, in mii_ethtool_set_link_ksettings() 426 reg = mii->mdio_read(mii->dev, mii->phy_id, MII_BMSR); in mii_check_gmii_support() 428 reg = mii->mdio_read(mii->dev, mii->phy_id, MII_ESTATUS); in mii_check_gmii_support() 445 mii->mdio_read(mii->dev, mii->phy_id, MII_BMSR); in mii_link_ok() 446 if (mii->mdio_read(mii->dev, mii->phy_id, MII_BMSR) & BMSR_LSTATUS) in mii_link_ok() 463 bmcr = mii->mdio_read(mii->dev, mii->phy_id, MII_BMCR); in mii_nway_restart() 467 mii->mdio_write(mii->dev, mii->phy_id, MII_BMCR, bmcr); in mii_nway_restart() 543 advertise = mii->mdio_read(mii->dev, mii->phy_id, MII_ADVERTISE); in mii_check_media() 546 lpa = mii->mdio_read(mii->dev, mii->phy_id, MII_LPA); in mii_check_media() [all …]
|
/linux/drivers/net/ethernet/stmicro/stmmac/ |
A D | stmmac_mdio.c | 119 & priv->hw->mii.clk_csr_mask; in stmmac_xgmac2_mdio_read() 187 & priv->hw->mii.clk_csr_mask; in stmmac_xgmac2_mdio_write() 239 & priv->hw->mii.addr_mask; in stmmac_mdio_read() 240 value |= (phyreg << priv->hw->mii.reg_shift) & priv->hw->mii.reg_mask; in stmmac_mdio_read() 307 & priv->hw->mii.addr_mask; in stmmac_mdio_write() 308 value |= (phyreg << priv->hw->mii.reg_shift) & priv->hw->mii.reg_mask; in stmmac_mdio_write() 540 priv->mii = new_bus; in stmmac_mdio_register() 560 if (!priv->mii) in stmmac_mdio_unregister() 569 priv->mii->priv = NULL; in stmmac_mdio_unregister() 570 mdiobus_free(priv->mii); in stmmac_mdio_unregister() [all …]
|
A D | dwmac100_core.c | 191 mac->mii.addr = MAC_MII_ADDR; in dwmac100_setup() 192 mac->mii.data = MAC_MII_DATA; in dwmac100_setup() 193 mac->mii.addr_shift = 11; in dwmac100_setup() 194 mac->mii.addr_mask = 0x0000F800; in dwmac100_setup() 195 mac->mii.reg_shift = 6; in dwmac100_setup() 196 mac->mii.reg_mask = 0x000007C0; in dwmac100_setup() 197 mac->mii.clk_csr_shift = 2; in dwmac100_setup() 198 mac->mii.clk_csr_mask = GENMASK(5, 2); in dwmac100_setup()
|
A D | dwmac-intel.c | 68 val_rd = mdiobus_read(priv->mii, phyaddr, phyreg); in serdes_status_poll() 90 data = mdiobus_read(priv->mii, serdes_phy_addr, in intel_serdes_powerup() 103 mdiobus_write(priv->mii, serdes_phy_addr, SERDES_GCR0, data); in intel_serdes_powerup() 106 data = mdiobus_read(priv->mii, serdes_phy_addr, SERDES_GCR0); in intel_serdes_powerup() 158 mdiobus_modify(priv->mii, serdes_phy_addr, SERDES_GCR0, in intel_serdes_powerup() 178 mdiobus_modify(priv->mii, serdes_phy_addr, SERDES_GCR0, in intel_serdes_powerdown() 243 data = mdiobus_read(priv->mii, serdes_phy_addr, in intel_speed_mode_2500() 290 ns = mdiobus_read(mii, intel_adhoc_addr, PMC_ART_VALUE3); in get_arttime() 292 ns |= mdiobus_read(mii, intel_adhoc_addr, PMC_ART_VALUE2); in get_arttime() 294 ns |= mdiobus_read(mii, intel_adhoc_addr, PMC_ART_VALUE1); in get_arttime() [all …]
|
/linux/drivers/bcma/ |
A D | driver_chipcommon_b.c | 36 void __iomem *mii = ccb->mii; in bcma_chipco_b_mii_write() local 38 writel(offset, mii + BCMA_CCB_MII_MNG_CTL); in bcma_chipco_b_mii_write() 39 bcma_wait_reg(bus, mii + BCMA_CCB_MII_MNG_CTL, 0x0100, 0x0000, 100); in bcma_chipco_b_mii_write() 40 writel(value, mii + BCMA_CCB_MII_MNG_CMD_DATA); in bcma_chipco_b_mii_write() 41 bcma_wait_reg(bus, mii + BCMA_CCB_MII_MNG_CTL, 0x0100, 0x0000, 100); in bcma_chipco_b_mii_write() 51 ccb->mii = ioremap(ccb->core->addr_s[1], BCMA_CORE_SIZE); in bcma_core_chipcommon_b_init() 52 if (!ccb->mii) in bcma_core_chipcommon_b_init() 60 if (ccb->mii) in bcma_core_chipcommon_b_free() 61 iounmap(ccb->mii); in bcma_core_chipcommon_b_free()
|
/linux/drivers/net/phy/ |
A D | mdio_devres.c | 9 struct mii_bus *mii; member 16 mdiobus_free(dr->mii); in devm_mdiobus_free() 38 dr->mii = mdiobus_alloc_size(sizeof_priv); in devm_mdiobus_alloc_size() 39 if (!dr->mii) { in devm_mdiobus_alloc_size() 45 return dr->mii; in devm_mdiobus_alloc_size() 53 mdiobus_unregister(dr->mii); in devm_mdiobus_unregister() 60 struct mii_bus *mii = match_data; in mdiobus_devres_match() local 62 return mii == res->mii; in mdiobus_devres_match() 93 dr->mii = bus; in __devm_mdiobus_register() 126 dr->mii = mdio; in devm_of_mdiobus_register()
|
/linux/drivers/net/usb/ |
A D | asix_devices.c | 104 return mii_link_ok(&dev->mii); in asix_get_link() 223 dev->mii.phy_id); in asix_phy_reset() 260 dev->mii.dev = dev->net; in ax88172_bind() 263 dev->mii.phy_id_mask = 0x3f; in ax88172_bind() 264 dev->mii.reg_num_mask = 0x1f; in ax88172_bind() 267 if (dev->mii.phy_id < 0) in ax88172_bind() 268 return dev->mii.phy_id; in ax88172_bind() 278 mii_nway_restart(&dev->mii); in ax88172_bind() 1124 dev->mii.dev = dev->net; in ax88178_bind() 1132 if (dev->mii.phy_id < 0) in ax88178_bind() [all …]
|
A D | sr9700.c | 322 struct mii_if_info *mii; in sr9700_bind() local 339 mii = &dev->mii; in sr9700_bind() 340 mii->dev = netdev; in sr9700_bind() 341 mii->mdio_read = sr_mdio_read; in sr9700_bind() 342 mii->mdio_write = sr_mdio_write; in sr9700_bind() 343 mii->phy_id_mask = 0x1f; in sr9700_bind() 344 mii->reg_num_mask = 0x1f; in sr9700_bind() 372 sr_mdio_write(netdev, mii->phy_id, MII_BMCR, BMCR_RESET); in sr9700_bind() 375 mii_nway_restart(mii); in sr9700_bind() 514 mii_check_media(&dev->mii, 1, 1); in sr9700_link_reset() [all …]
|
A D | smsc75xx.c | 197 idx &= dev->mii.reg_num_mask; in __smsc75xx_mdio_read() 251 idx &= dev->mii.reg_num_mask; in __smsc75xx_mdio_write() 628 struct mii_if_info *mii = &dev->mii; in smsc75xx_link_reset() local 643 mii_check_media(mii, 1, 1); in smsc75xx_link_reset() 824 dev->mii.dev = dev->net; in smsc75xx_phy_initialize() 827 dev->mii.phy_id_mask = 0x1f; in smsc75xx_phy_initialize() 829 dev->mii.supports_gmii = 1; in smsc75xx_phy_initialize() 990 struct mii_if_info *mii = &dev->mii; in smsc75xx_phy_gig_workaround() local 1708 struct mii_if_info *mii = &dev->mii; in smsc75xx_enable_phy_wakeup_interrupts() local 1736 struct mii_if_info *mii = &dev->mii; in smsc75xx_link_ok_nopm() local [all …]
|
A D | sr9800.c | 485 return mii_link_ok(&dev->mii); in sr_get_link() 539 mii_check_media(&dev->mii, 1, 1); in sr9800_link_reset() 540 mii_ethtool_gset(&dev->mii, &ecmd); in sr9800_link_reset() 566 mii_nway_restart(&dev->mii); in sr9800_set_default_mode() 767 dev->mii.dev = dev->net; in sr9800_bind() 768 dev->mii.mdio_read = sr_mdio_read; in sr9800_bind() 769 dev->mii.mdio_write = sr_mdio_write; in sr9800_bind() 770 dev->mii.phy_id_mask = 0x1f; in sr9800_bind() 771 dev->mii.reg_num_mask = 0x1f; in sr9800_bind() 772 dev->mii.phy_id = sr_get_phy_addr(dev); in sr9800_bind() [all …]
|
A D | dm9601.c | 268 return mii_link_ok(&dev->mii); in dm9601_get_link() 275 return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); in dm9601_ioctl() 374 dev->mii.dev = dev->net; in dm9601_bind() 375 dev->mii.mdio_read = dm9601_mdio_read; in dm9601_bind() 376 dev->mii.mdio_write = dm9601_mdio_write; in dm9601_bind() 377 dev->mii.phy_id_mask = 0x1f; in dm9601_bind() 378 dev->mii.reg_num_mask = 0x1f; in dm9601_bind() 429 dm9601_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE, in dm9601_bind() 431 mii_nway_restart(&dev->mii); in dm9601_bind() 552 mii_check_media(&dev->mii, 1, 1); in dm9601_link_reset() [all …]
|
A D | ch9200.c | 217 mii_check_media(&dev->mii, 1, 1); in ch9200_link_reset() 218 mii_ethtool_gset(&dev->mii, &ecmd); in ch9200_link_reset() 345 dev->mii.dev = dev->net; in ch9200_bind() 346 dev->mii.mdio_read = ch9200_mdio_read; in ch9200_bind() 347 dev->mii.mdio_write = ch9200_mdio_write; in ch9200_bind() 348 dev->mii.reg_num_mask = 0x1f; in ch9200_bind() 350 dev->mii.phy_id_mask = 0x1f; in ch9200_bind() 354 mii_nway_restart(&dev->mii); in ch9200_bind()
|
A D | r8153_ecm.c | 106 dev->mii.dev = dev->net; in r8153_bind() 107 dev->mii.mdio_read = r8153_ecm_mdio_read; in r8153_bind() 108 dev->mii.mdio_write = r8153_ecm_mdio_write; in r8153_bind() 109 dev->mii.reg_num_mask = 0x1f; in r8153_bind() 110 dev->mii.supports_gmii = 1; in r8153_bind()
|
/linux/drivers/net/ethernet/samsung/sxgbe/ |
A D | sxgbe_mdio.c | 49 writel(reg, sp->ioaddr + sp->hw->mii.data); in sxgbe_mdio_ctrl_data() 60 writel(reg, sp->ioaddr + sp->hw->mii.addr); in sxgbe_mdio_c45() 74 writel(reg, sp->ioaddr + sp->hw->mii.addr); in sxgbe_mdio_c22() 82 const struct mii_regs *mii = &sp->hw->mii; in sxgbe_mdio_access() local 85 rc = sxgbe_mdio_busy_wait(sp->ioaddr, mii->data); in sxgbe_mdio_access() 226 priv->mii = mdio_bus; in sxgbe_mdio_register() 242 if (!priv->mii) in sxgbe_mdio_unregister() 245 mdiobus_unregister(priv->mii); in sxgbe_mdio_unregister() 246 priv->mii->priv = NULL; in sxgbe_mdio_unregister() 247 mdiobus_free(priv->mii); in sxgbe_mdio_unregister() [all …]
|
/linux/drivers/net/mdio/ |
A D | mdio-i2c.c | 96 struct mii_bus *mii; in mdio_i2c_alloc() local 101 mii = mdiobus_alloc(); in mdio_i2c_alloc() 102 if (!mii) in mdio_i2c_alloc() 105 snprintf(mii->id, MII_BUS_ID_SIZE, "i2c:%s", dev_name(parent)); in mdio_i2c_alloc() 106 mii->parent = parent; in mdio_i2c_alloc() 107 mii->read = i2c_mii_read; in mdio_i2c_alloc() 108 mii->write = i2c_mii_write; in mdio_i2c_alloc() 109 mii->priv = i2c; in mdio_i2c_alloc() 111 return mii; in mdio_i2c_alloc()
|
/linux/Documentation/devicetree/bindings/pinctrl/ |
A D | marvell,kirkwood-pinctrl.txt | 33 mii(col) 35 mii(crs) 41 mpp14 14 gpio, sdio(d0), uart1(rxd), mii(col) 47 mpp35 35 gpio, mii(rxerr) 71 mii(col), mii-1(rxerr) 73 mii(crs), sata0(prsnt) 115 mii(col), mii-1(rxerr), sata1(prsnt) 117 mii(crs), sata0(prsnt) 164 mii(col), mii-1(rxerr), sata1(prsnt) 166 mii(crs), sata0(prsnt) [all …]
|
A D | marvell,armada-37xx-pinctrl.txt | 120 - functions mii, gpio 144 - functions ptp, mii 148 - functions ptp, mii 152 - functions mii, mii_err 190 rgmii_pins: mii-pins { 192 function = "mii";
|
/linux/arch/arm/boot/dts/ |
A D | am335x-boneblack.dts | 138 "[mii col]", 139 "[mii crs]", 140 "[mii rx err]", 141 "[mii tx en]", 142 "[mii rx dv]", 147 "[mii tx clk]", 148 "[mii rx clk]",
|
/linux/include/linux/ |
A D | mii.h | 33 extern int mii_link_ok (struct mii_if_info *mii); 34 extern int mii_nway_restart (struct mii_if_info *mii); 35 extern void mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd); 37 struct mii_if_info *mii, struct ethtool_link_ksettings *cmd); 38 extern int mii_ethtool_sset(struct mii_if_info *mii, struct ethtool_cmd *ecmd); 40 struct mii_if_info *mii, const struct ethtool_link_ksettings *cmd); 41 extern int mii_check_gmii_support(struct mii_if_info *mii); 42 extern void mii_check_link (struct mii_if_info *mii); 43 extern unsigned int mii_check_media (struct mii_if_info *mii,
|
/linux/drivers/net/ethernet/smsc/ |
A D | epic100.c | 284 struct mii_if_info mii; member 372 ep->mii.dev = dev; in epic_init_one() 373 ep->mii.mdio_read = mdio_read; in epic_init_one() 375 ep->mii.phy_id_mask = 0x1f; in epic_init_one() 376 ep->mii.reg_num_mask = 0x1f; 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() 713 ep->mii.full_duplex = 1; in epic_open() 838 if (ep->mii.force_media) in check_media() 843 ep->mii.full_duplex = duplex; in check_media() [all …]
|
A D | smc911x.c | 724 lp->mii.phy_id = 1; in smc911x_phy_detect() 739 int phyaddr = lp->mii.phy_id; in smc911x_phy_fixed() 845 int phyaddr = lp->mii.phy_id; in smc911x_phy_check_media() 854 if (lp->mii.full_duplex) { in smc911x_phy_check_media() 882 int phyaddr = lp->mii.phy_id; in smc911x_phy_configure() 911 if (lp->mii.force_media) { in smc911x_phy_configure() 1933 lp->mii.phy_id_mask = 0x1f; in smc911x_probe() 1934 lp->mii.reg_num_mask = 0x1f; in smc911x_probe() 1935 lp->mii.force_media = 0; in smc911x_probe() 1936 lp->mii.full_duplex = 0; in smc911x_probe() [all …]
|
/linux/drivers/net/ethernet/intel/ |
A D | e100.c | 575 struct mii_if_info mii; member 1062 nic->mii.phy_id_mask = 0x1F; in e100_get_defaults() 1063 nic->mii.reg_num_mask = 0x1F; in e100_get_defaults() 1064 nic->mii.dev = nic->netdev; in e100_get_defaults() 1065 nic->mii.mdio_read = mdio_read; in e100_get_defaults() 1066 nic->mii.mdio_write = mdio_write; in e100_get_defaults() 1108 if (nic->mii.force_media && nic->mii.full_duplex) in e100_configure() 1475 if (addr != nic->mii.phy_id) { in e100_phy_init() 1696 mii_ethtool_gset(&nic->mii, &cmd); in e100_watchdog() 1707 mii_check_link(&nic->mii); in e100_watchdog() [all …]
|
/linux/drivers/net/ethernet/sgi/ |
A D | ioc3-eth.c | 98 struct mii_if_info mii; member 559 if (ip->mii.full_duplex) { in ioc3_setup_duplex() 576 mii_check_media(&ip->mii, 1, 0); in ioc3_timer() 596 ip->mii.phy_id = i; in ioc3_mii_init() 600 ip->mii.phy_id = -1; in ioc3_mii_init() 907 ip->mii.phy_id_mask = 0x1f; in ioc3eth_probe() 908 ip->mii.reg_num_mask = 0x1f; in ioc3eth_probe() 909 ip->mii.dev = dev; in ioc3eth_probe() 915 if (ip->mii.phy_id == -1) { in ioc3eth_probe() 939 mii_check_media(&ip->mii, 1, 1); in ioc3eth_probe() [all …]
|
/linux/drivers/net/ethernet/cirrus/ |
A D | ep93xx_eth.c | 173 struct mii_if_info mii; member 687 return generic_mii_ioctl(&ep->mii, data, cmd, NULL); in ep93xx_ioctl() 700 mii_ethtool_get_link_ksettings(&ep->mii, cmd); in ep93xx_get_link_ksettings() 715 return mii_nway_restart(&ep->mii); in ep93xx_nway_reset() 721 return mii_link_ok(&ep->mii); in ep93xx_get_link() 835 ep->mii.phy_id = data->phy_id; in ep93xx_eth_probe() 836 ep->mii.phy_id_mask = 0x1f; in ep93xx_eth_probe() 837 ep->mii.reg_num_mask = 0x1f; in ep93xx_eth_probe() 838 ep->mii.dev = dev; in ep93xx_eth_probe() 839 ep->mii.mdio_read = ep93xx_mdio_read; in ep93xx_eth_probe() [all …]
|
/linux/drivers/net/ethernet/faraday/ |
A D | ftmac100.c | 68 struct mii_if_info mii; member 819 mii_ethtool_get_link_ksettings(&priv->mii, cmd); in ftmac100_get_link_ksettings() 834 return mii_nway_restart(&priv->mii); in ftmac100_nway_reset() 840 return mii_link_ok(&priv->mii); in ftmac100_get_link() 931 mii_check_link(&priv->mii); in ftmac100_poll() 1110 priv->mii.phy_id = 0; in ftmac100_probe() 1111 priv->mii.phy_id_mask = 0x1f; in ftmac100_probe() 1112 priv->mii.reg_num_mask = 0x1f; in ftmac100_probe() 1113 priv->mii.dev = netdev; in ftmac100_probe() 1114 priv->mii.mdio_read = ftmac100_mdio_read; in ftmac100_probe() [all …]
|