/Linux-v4.19/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 …]
|
/Linux-v4.19/drivers/net/ethernet/stmicro/stmmac/ |
D | stmmac_mdio.c | 55 unsigned int mii_data = priv->hw->mii.data; in stmmac_xgmac2_c22_format() 80 unsigned int mii_address = priv->hw->mii.addr; in stmmac_xgmac2_mdio_read() 81 unsigned int mii_data = priv->hw->mii.data; in stmmac_xgmac2_mdio_read() 93 value |= (priv->clk_csr << priv->hw->mii.clk_csr_shift) in stmmac_xgmac2_mdio_read() 94 & priv->hw->mii.clk_csr_mask; in stmmac_xgmac2_mdio_read() 120 unsigned int mii_address = priv->hw->mii.addr; in stmmac_xgmac2_mdio_write() 121 unsigned int mii_data = priv->hw->mii.data; in stmmac_xgmac2_mdio_write() 133 value |= (priv->clk_csr << priv->hw->mii.clk_csr_shift) in stmmac_xgmac2_mdio_write() 134 & priv->hw->mii.clk_csr_mask; in stmmac_xgmac2_mdio_write() 166 unsigned int mii_address = priv->hw->mii.addr; in stmmac_mdio_read() [all …]
|
D | dwmac100_core.c | 188 mac->mii.addr = MAC_MII_ADDR; in dwmac100_setup() 189 mac->mii.data = MAC_MII_DATA; in dwmac100_setup() 190 mac->mii.addr_shift = 11; in dwmac100_setup() 191 mac->mii.addr_mask = 0x0000F800; in dwmac100_setup() 192 mac->mii.reg_shift = 6; in dwmac100_setup() 193 mac->mii.reg_mask = 0x000007C0; in dwmac100_setup() 194 mac->mii.clk_csr_shift = 2; in dwmac100_setup() 195 mac->mii.clk_csr_mask = GENMASK(5, 2); in dwmac100_setup()
|
D | dwxgmac2_core.c | 361 mac->mii.addr = XGMAC_MDIO_ADDR; in dwxgmac2_setup() 362 mac->mii.data = XGMAC_MDIO_DATA; in dwxgmac2_setup() 363 mac->mii.addr_shift = 16; in dwxgmac2_setup() 364 mac->mii.addr_mask = GENMASK(20, 16); in dwxgmac2_setup() 365 mac->mii.reg_shift = 0; in dwxgmac2_setup() 366 mac->mii.reg_mask = GENMASK(15, 0); in dwxgmac2_setup() 367 mac->mii.clk_csr_shift = 19; in dwxgmac2_setup() 368 mac->mii.clk_csr_mask = GENMASK(21, 19); in dwxgmac2_setup()
|
D | dwmac1000_core.c | 543 mac->mii.addr = GMAC_MII_ADDR; in dwmac1000_setup() 544 mac->mii.data = GMAC_MII_DATA; in dwmac1000_setup() 545 mac->mii.addr_shift = 11; in dwmac1000_setup() 546 mac->mii.addr_mask = 0x0000F800; in dwmac1000_setup() 547 mac->mii.reg_shift = 6; in dwmac1000_setup() 548 mac->mii.reg_mask = 0x000007C0; in dwmac1000_setup() 549 mac->mii.clk_csr_shift = 2; in dwmac1000_setup() 550 mac->mii.clk_csr_mask = GENMASK(5, 2); in dwmac1000_setup()
|
/Linux-v4.19/drivers/bcma/ |
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_nocache(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-v4.19/drivers/net/usb/ |
D | asix_devices.c | 90 phy_reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID1); in asix_get_phyid() 103 phy_reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID2); in asix_get_phyid() 116 return mii_link_ok(&dev->mii); in asix_get_link() 123 return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); in asix_ioctl() 188 mii_check_media(&dev->mii, 1, 1); in ax88172_link_reset() 189 mii_ethtool_gset(&dev->mii, &ecmd); in ax88172_link_reset() 220 asix_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, reset_bits); in asix_phy_reset() 227 if (asix_mdio_read(dev->net, dev->mii.phy_id, MII_BMCR) in asix_phy_reset() 235 dev->mii.phy_id); in asix_phy_reset() 272 dev->mii.dev = dev->net; in ax88172_bind() [all …]
|
D | sr9700.c | 242 return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); in sr9700_ioctl() 321 struct mii_if_info *mii; in sr9700_bind() local 337 mii = &dev->mii; in sr9700_bind() 338 mii->dev = netdev; in sr9700_bind() 339 mii->mdio_read = sr_mdio_read; in sr9700_bind() 340 mii->mdio_write = sr_mdio_write; in sr9700_bind() 341 mii->phy_id_mask = 0x1f; in sr9700_bind() 342 mii->reg_num_mask = 0x1f; in sr9700_bind() 369 sr_mdio_write(netdev, mii->phy_id, MII_BMCR, BMCR_RESET); in sr9700_bind() 370 sr_mdio_write(netdev, mii->phy_id, MII_ADVERTISE, ADVERTISE_ALL | in sr9700_bind() [all …]
|
D | smsc95xx.c | 205 phy_id &= dev->mii.phy_id_mask; in __smsc95xx_mdio_read() 206 idx &= dev->mii.reg_num_mask; in __smsc95xx_mdio_read() 257 phy_id &= dev->mii.phy_id_mask; in __smsc95xx_mdio_write() 258 idx &= dev->mii.reg_num_mask; in __smsc95xx_mdio_write() 566 struct mii_if_info *mii = &dev->mii; in smsc95xx_link_reset() local 573 ret = smsc95xx_mdio_read(dev->net, mii->phy_id, PHY_INT_SRC); in smsc95xx_link_reset() 581 mii_check_media(mii, 1, 1); in smsc95xx_link_reset() 582 mii_ethtool_gset(&dev->mii, &ecmd); in smsc95xx_link_reset() 583 lcladv = smsc95xx_mdio_read(dev->net, mii->phy_id, MII_ADVERTISE); in smsc95xx_link_reset() 584 rmtadv = smsc95xx_mdio_read(dev->net, mii->phy_id, MII_LPA); in smsc95xx_link_reset() [all …]
|
D | ch9200.c | 219 mii_check_media(&dev->mii, 1, 1); in ch9200_link_reset() 220 mii_ethtool_gset(&dev->mii, &ecmd); in ch9200_link_reset() 346 dev->mii.dev = dev->net; in ch9200_bind() 347 dev->mii.mdio_read = ch9200_mdio_read; in ch9200_bind() 348 dev->mii.mdio_write = ch9200_mdio_write; in ch9200_bind() 349 dev->mii.reg_num_mask = 0x1f; in ch9200_bind() 351 dev->mii.phy_id_mask = 0x1f; in ch9200_bind() 355 mii_nway_restart(&dev->mii); in ch9200_bind()
|
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() 373 dev->mii.dev = dev->net; in dm9601_bind() 374 dev->mii.mdio_read = dm9601_mdio_read; in dm9601_bind() 375 dev->mii.mdio_write = dm9601_mdio_write; in dm9601_bind() 376 dev->mii.phy_id_mask = 0x1f; in dm9601_bind() 377 dev->mii.reg_num_mask = 0x1f; in dm9601_bind() 427 dm9601_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET); in dm9601_bind() 428 dm9601_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE, in dm9601_bind() 430 mii_nway_restart(&dev->mii); in dm9601_bind() [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() 767 dev->mii.dev = dev->net; in sr9800_bind() [all …]
|
D | smsc75xx.c | 208 phy_id &= dev->mii.phy_id_mask; in __smsc75xx_mdio_read() 209 idx &= dev->mii.reg_num_mask; in __smsc75xx_mdio_read() 262 phy_id &= dev->mii.phy_id_mask; in __smsc75xx_mdio_write() 263 idx &= dev->mii.reg_num_mask; in __smsc75xx_mdio_write() 640 struct mii_if_info *mii = &dev->mii; in smsc75xx_link_reset() local 646 smsc75xx_mdio_write(dev->net, mii->phy_id, PHY_INT_SRC, in smsc75xx_link_reset() 655 mii_check_media(mii, 1, 1); in smsc75xx_link_reset() 656 mii_ethtool_gset(&dev->mii, &ecmd); in smsc75xx_link_reset() 657 lcladv = smsc75xx_mdio_read(dev->net, mii->phy_id, MII_ADVERTISE); in smsc75xx_link_reset() 658 rmtadv = smsc75xx_mdio_read(dev->net, mii->phy_id, MII_LPA); in smsc75xx_link_reset() [all …]
|
/Linux-v4.19/drivers/net/phy/ |
D | mdio-i2c.c | 88 struct mii_bus *mii; in mdio_i2c_alloc() local 93 mii = mdiobus_alloc(); in mdio_i2c_alloc() 94 if (!mii) in mdio_i2c_alloc() 97 snprintf(mii->id, MII_BUS_ID_SIZE, "i2c:%s", dev_name(parent)); in mdio_i2c_alloc() 98 mii->parent = parent; in mdio_i2c_alloc() 99 mii->read = i2c_mii_read; in mdio_i2c_alloc() 100 mii->write = i2c_mii_write; in mdio_i2c_alloc() 101 mii->priv = i2c; in mdio_i2c_alloc() 103 return mii; in mdio_i2c_alloc()
|
/Linux-v4.19/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 …]
|
/Linux-v4.19/include/linux/ |
D | mii.h | 32 extern int mii_link_ok (struct mii_if_info *mii); 33 extern int mii_nway_restart (struct mii_if_info *mii); 34 extern int mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd); 36 struct mii_if_info *mii, struct ethtool_link_ksettings *cmd); 37 extern int mii_ethtool_sset(struct mii_if_info *mii, struct ethtool_cmd *ecmd); 39 struct mii_if_info *mii, const struct ethtool_link_ksettings *cmd); 40 extern int mii_check_gmii_support(struct mii_if_info *mii); 41 extern void mii_check_link (struct mii_if_info *mii); 42 extern unsigned int mii_check_media (struct mii_if_info *mii,
|
/Linux-v4.19/Documentation/devicetree/bindings/pinctrl/ |
D | marvell,kirkwood-pinctrl.txt | 33 mii(col) 35 mii(crs) 41 mpp14 14 gpio, sdio(d0), uart1(rxd), mii(col) 43 mpp16 16 gpio, sdio(d2), uart0(cts), uart1(rxd), mii(crs) 47 mpp35 35 gpio, mii(rxerr) 71 mii(col), mii-1(rxerr) 73 mii(crs), sata0(prsnt) 79 mpp14 14 gpio, sdio(d0), uart1(rxd), mii(col) 81 mpp16 16 gpio, sdio(d2), uart0(cts), uart1(rxd), mii(crs) 100 mpp35 35 gpio, ge1(rxerr), sata0(act), mii(rxerr) [all …]
|
D | marvell,armada-37xx-pinctrl.txt | 120 - functions mii, gpio 132 - functions ptp, mii 136 - functions ptp, mii 140 - functions mii, mii_err 178 rgmii_pins: mii-pins { 180 function = "mii";
|
/Linux-v4.19/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 …]
|
/Linux-v4.19/drivers/net/ethernet/smsc/ |
D | epic100.c | 283 struct mii_if_info mii; member 370 ep->mii.dev = dev; in epic_init_one() 371 ep->mii.mdio_read = mdio_read; in epic_init_one() 372 ep->mii.mdio_write = mdio_write; in epic_init_one() 373 ep->mii.phy_id_mask = 0x1f; in epic_init_one() 374 ep->mii.reg_num_mask = 0x1f; in epic_init_one() 450 ep->mii.advertising = mdio_read(dev, phy, MII_ADVERTISE); in epic_init_one() 454 ep->mii.advertising, mdio_read(dev, phy, 5)); in epic_init_one() 461 ep->mii.phy_id = ep->phys[0]; in epic_init_one() 471 ep->mii.force_media = ep->mii.full_duplex = 1; in epic_init_one() [all …]
|
/Linux-v4.19/drivers/net/ethernet/intel/ |
D | e100.c | 578 struct mii_if_info mii; member 967 u16 advert = mdio_read(nic->netdev, nic->mii.phy_id, in mdio_ctrl_phy_82552_v() 1065 nic->mii.phy_id_mask = 0x1F; in e100_get_defaults() 1066 nic->mii.reg_num_mask = 0x1F; in e100_get_defaults() 1067 nic->mii.dev = nic->netdev; in e100_get_defaults() 1068 nic->mii.mdio_read = mdio_read; in e100_get_defaults() 1069 nic->mii.mdio_write = mdio_write; in e100_get_defaults() 1111 if (nic->mii.force_media && nic->mii.full_duplex) in e100_configure() 1417 nic->mii.phy_id = 0; /* is this ok for an MII-less PHY? */ in e100_phy_check_without_mii() 1445 nic->mii.phy_id = (addr == 0) ? 1 : (addr == 1) ? 0 : addr; in e100_phy_init() [all …]
|
/Linux-v4.19/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() 259 struct net_device *dev = ether->mii.dev; in w90p910_check_link() 858 return generic_mii_ioctl(ðer->mii, data, cmd, NULL); in w90p910_ether_ioctl() 873 mii_ethtool_get_link_ksettings(ðer->mii, cmd); in w90p910_get_link_ksettings() 882 return mii_ethtool_set_link_ksettings(ðer->mii, cmd); in w90p910_set_link_ksettings() 888 return mii_nway_restart(ðer->mii); in w90p910_nway_reset() [all …]
|
/Linux-v4.19/drivers/net/ethernet/freescale/fs_enet/ |
D | Makefile | 12 obj-$(CONFIG_FS_ENET_MDIO_FEC) += mii-fec.o 13 obj-$(CONFIG_FS_ENET_MDIO_FCC) += mii-bitbang.o
|
/Linux-v4.19/drivers/net/ethernet/cirrus/ |
D | ep93xx_eth.c | 178 struct mii_if_info mii; member 557 if ((ep93xx_mdio_read(dev, ep->mii.phy_id, MII_BMSR) & 0x0040) != 0) in ep93xx_start_hw() 692 return generic_mii_ioctl(&ep->mii, data, cmd, NULL); in ep93xx_ioctl() 706 mii_ethtool_get_link_ksettings(&ep->mii, cmd); in ep93xx_get_link_ksettings() 715 return mii_ethtool_set_link_ksettings(&ep->mii, cmd); in ep93xx_set_link_ksettings() 721 return mii_nway_restart(&ep->mii); in ep93xx_nway_reset() 727 return mii_link_ok(&ep->mii); in ep93xx_get_link() 840 ep->mii.phy_id = data->phy_id; in ep93xx_eth_probe() 841 ep->mii.phy_id_mask = 0x1f; in ep93xx_eth_probe() 842 ep->mii.reg_num_mask = 0x1f; in ep93xx_eth_probe() [all …]
|
/Linux-v4.19/drivers/net/ethernet/faraday/ |
D | ftmac100.c | 82 struct mii_if_info mii; member 835 mii_ethtool_get_link_ksettings(&priv->mii, cmd); in ftmac100_get_link_ksettings() 844 return mii_ethtool_set_link_ksettings(&priv->mii, cmd); in ftmac100_set_link_ksettings() 850 return mii_nway_restart(&priv->mii); in ftmac100_nway_reset() 856 return mii_link_ok(&priv->mii); in ftmac100_get_link() 948 mii_check_link(&priv->mii); in ftmac100_poll() 1053 return generic_mii_ioctl(&priv->mii, data, cmd, NULL); in ftmac100_do_ioctl() 1129 priv->mii.phy_id = 0; in ftmac100_probe() 1130 priv->mii.phy_id_mask = 0x1f; in ftmac100_probe() 1131 priv->mii.reg_num_mask = 0x1f; in ftmac100_probe() [all …]
|