/drivers/net/phy/ |
D | mdio-mux.c | 22 struct mii_bus *mii_bus; member 33 struct mii_bus *mii_bus; member 43 static int mdio_mux_read(struct mii_bus *bus, int phy_id, int regnum) in mdio_mux_read() 55 mutex_lock_nested(&pb->mii_bus->mdio_lock, SINGLE_DEPTH_NESTING); in mdio_mux_read() 62 r = pb->mii_bus->read(pb->mii_bus, phy_id, regnum); in mdio_mux_read() 64 mutex_unlock(&pb->mii_bus->mdio_lock); in mdio_mux_read() 72 static int mdio_mux_write(struct mii_bus *bus, int phy_id, in mdio_mux_write() 80 mutex_lock_nested(&pb->mii_bus->mdio_lock, SINGLE_DEPTH_NESTING); in mdio_mux_write() 87 r = pb->mii_bus->write(pb->mii_bus, phy_id, regnum, val); in mdio_mux_write() 89 mutex_unlock(&pb->mii_bus->mdio_lock); in mdio_mux_write() [all …]
|
D | fixed_phy.c | 31 struct mii_bus *mii_bus; member 149 static int fixed_mdio_read(struct mii_bus *bus, int phy_addr, int reg_num) in fixed_mdio_read() 183 static int fixed_mdio_write(struct mii_bus *bus, int phy_addr, int reg_num, in fixed_mdio_write() 223 if (!phydev || phydev->bus != fmb->mii_bus) in fixed_phy_update_state() 332 phy = get_phy_device(fmb->mii_bus, phy_addr, false); in fixed_phy_register() 386 fmb->mii_bus = mdiobus_alloc(); in fixed_mdio_bus_init() 387 if (fmb->mii_bus == NULL) { in fixed_mdio_bus_init() 392 snprintf(fmb->mii_bus->id, MII_BUS_ID_SIZE, "fixed-0"); in fixed_mdio_bus_init() 393 fmb->mii_bus->name = "Fixed MDIO Bus"; in fixed_mdio_bus_init() 394 fmb->mii_bus->priv = fmb; in fixed_mdio_bus_init() [all …]
|
D | mdio-octeon.c | 111 struct mii_bus *mii_bus; member 183 static int octeon_mdiobus_read(struct mii_bus *bus, int phy_id, int regnum) in octeon_mdiobus_read() 223 static int octeon_mdiobus_write(struct mii_bus *bus, int phy_id, in octeon_mdiobus_write() 301 bus->mii_bus = mdiobus_alloc(); in octeon_mdiobus_probe() 302 if (!bus->mii_bus) in octeon_mdiobus_probe() 309 bus->mii_bus->priv = bus; in octeon_mdiobus_probe() 310 bus->mii_bus->irq = bus->phy_irq; in octeon_mdiobus_probe() 311 bus->mii_bus->name = "mdio-octeon"; in octeon_mdiobus_probe() 312 snprintf(bus->mii_bus->id, MII_BUS_ID_SIZE, "%llx", bus->register_base); in octeon_mdiobus_probe() 313 bus->mii_bus->parent = &pdev->dev; in octeon_mdiobus_probe() [all …]
|
D | mdio-bcm-unimac.c | 42 struct mii_bus *mii_bus; member 60 static int unimac_mdio_read(struct mii_bus *bus, int phy_id, int reg) in unimac_mdio_read() 96 static int unimac_mdio_write(struct mii_bus *bus, int phy_id, in unimac_mdio_write() 138 static int unimac_mdio_reset(struct mii_bus *bus) in unimac_mdio_reset() 169 struct mii_bus *bus; in unimac_mdio_probe() 192 priv->mii_bus = mdiobus_alloc(); in unimac_mdio_probe() 193 if (!priv->mii_bus) in unimac_mdio_probe() 196 bus = priv->mii_bus; in unimac_mdio_probe() 234 mdiobus_unregister(priv->mii_bus); in unimac_mdio_remove() 235 kfree(priv->mii_bus->irq); in unimac_mdio_remove() [all …]
|
D | mdio_bus.c | 49 struct mii_bus *mdiobus_alloc_size(size_t size) in mdiobus_alloc_size() 51 struct mii_bus *bus; in mdiobus_alloc_size() 74 mdiobus_free(*(struct mii_bus **)res); in _devm_mdiobus_free() 79 struct mii_bus **r = res; in devm_mdiobus_match() 101 struct mii_bus *devm_mdiobus_alloc_size(struct device *dev, int sizeof_priv) in devm_mdiobus_alloc_size() 103 struct mii_bus **ptr, *bus; in devm_mdiobus_alloc_size() 129 void devm_mdiobus_free(struct device *dev, struct mii_bus *bus) in devm_mdiobus_free() 148 struct mii_bus *bus = to_mii_bus(d); in mdiobus_release() 179 struct mii_bus *of_mdio_find_bus(struct device_node *mdio_bus_np) in of_mdio_find_bus() 198 static void of_mdiobus_link_phydev(struct mii_bus *mdio, in of_mdiobus_link_phydev() [all …]
|
D | mdio-bcm-iproc.c | 45 struct mii_bus *mii_bus; member 74 static int iproc_mdio_read(struct mii_bus *bus, int phy_id, int reg) in iproc_mdio_read() 102 static int iproc_mdio_write(struct mii_bus *bus, int phy_id, in iproc_mdio_write() 133 struct mii_bus *bus; in iproc_mdio_probe() 148 priv->mii_bus = mdiobus_alloc(); in iproc_mdio_probe() 149 if (!priv->mii_bus) { in iproc_mdio_probe() 154 bus = priv->mii_bus; in iproc_mdio_probe() 185 mdiobus_unregister(priv->mii_bus); in iproc_mdio_remove() 186 mdiobus_free(priv->mii_bus); in iproc_mdio_remove()
|
D | mdio-bitbang.c | 155 static int mdiobb_read(struct mii_bus *bus, int phy, int reg) in mdiobb_read() 187 static int mdiobb_write(struct mii_bus *bus, int phy, int reg, u16 val) in mdiobb_write() 208 static int mdiobb_reset(struct mii_bus *bus) in mdiobb_reset() 216 struct mii_bus *alloc_mdio_bitbang(struct mdiobb_ctrl *ctrl) in alloc_mdio_bitbang() 218 struct mii_bus *bus; in alloc_mdio_bitbang() 235 void free_mdio_bitbang(struct mii_bus *bus) in free_mdio_bitbang()
|
D | mdio-moxart.c | 37 static int moxart_mdio_read(struct mii_bus *bus, int mii_id, int regnum) in moxart_mdio_read() 65 static int moxart_mdio_write(struct mii_bus *bus, int mii_id, in moxart_mdio_write() 97 static int moxart_mdio_reset(struct mii_bus *bus) in moxart_mdio_reset() 117 struct mii_bus *bus; in moxart_mdio_probe() 173 struct mii_bus *bus = platform_get_drvdata(pdev); in moxart_mdio_remove()
|
D | mdio-gpio.c | 133 static struct mii_bus *mdio_gpio_bus_init(struct device *dev, in mdio_gpio_bus_init() 137 struct mii_bus *new_bus; in mdio_gpio_bus_init() 204 struct mii_bus *bus = dev_get_drvdata(dev); in mdio_gpio_bus_deinit() 211 struct mii_bus *bus = dev_get_drvdata(dev); in mdio_gpio_bus_destroy() 220 struct mii_bus *new_bus; in mdio_gpio_probe()
|
D | mdio-sun4i.c | 39 static int sun4i_mdio_read(struct mii_bus *bus, int mii_id, int regnum) in sun4i_mdio_read() 66 static int sun4i_mdio_write(struct mii_bus *bus, int mii_id, int regnum, in sun4i_mdio_write() 96 struct mii_bus *bus; in sun4i_mdio_probe() 162 struct mii_bus *bus = platform_get_drvdata(pdev); in sun4i_mdio_remove()
|
/drivers/net/ethernet/broadcom/genet/ |
D | bcmmii.c | 31 static int bcmgenet_mii_read(struct mii_bus *bus, int phy_id, int location) in bcmgenet_mii_read() 62 static int bcmgenet_mii_write(struct mii_bus *bus, int phy_id, in bcmgenet_mii_write() 400 priv->mii_bus->irq[phydev->addr] = PHY_IGNORE_INTERRUPT; in bcmgenet_mii_probe() 402 priv->mii_bus->irq[phydev->addr] = PHY_POLL; in bcmgenet_mii_probe() 422 static int bcmgenet_mii_bus_reset(struct mii_bus *bus) in bcmgenet_mii_bus_reset() 455 struct mii_bus *bus; in bcmgenet_mii_alloc() 457 if (priv->mii_bus) in bcmgenet_mii_alloc() 460 priv->mii_bus = mdiobus_alloc(); in bcmgenet_mii_alloc() 461 if (!priv->mii_bus) { in bcmgenet_mii_alloc() 466 bus = priv->mii_bus; in bcmgenet_mii_alloc() [all …]
|
/drivers/net/ethernet/xilinx/ |
D | ll_temac_mdio.c | 22 static int temac_mdio_read(struct mii_bus *bus, int phy_id, int reg) in temac_mdio_read() 41 static int temac_mdio_write(struct mii_bus *bus, int phy_id, int reg, u16 val) in temac_mdio_write() 61 struct mii_bus *bus; in temac_mdio_setup() 97 lp->mii_bus = bus; in temac_mdio_setup() 116 mdiobus_unregister(lp->mii_bus); in temac_mdio_teardown() 117 kfree(lp->mii_bus->irq); in temac_mdio_teardown() 118 mdiobus_free(lp->mii_bus); in temac_mdio_teardown() 119 lp->mii_bus = NULL; in temac_mdio_teardown()
|
D | xilinx_axienet_mdio.c | 46 static int axienet_mdio_read(struct mii_bus *bus, int phy_id, int reg) in axienet_mdio_read() 89 static int axienet_mdio_write(struct mii_bus *bus, int phy_id, int reg, in axienet_mdio_write() 132 struct mii_bus *bus; in axienet_mdio_setup() 216 lp->mii_bus = bus; in axienet_mdio_setup() 221 lp->mii_bus = NULL; in axienet_mdio_setup() 235 mdiobus_unregister(lp->mii_bus); in axienet_mdio_teardown() 236 kfree(lp->mii_bus->irq); in axienet_mdio_teardown() 237 mdiobus_free(lp->mii_bus); in axienet_mdio_teardown() 238 lp->mii_bus = NULL; in axienet_mdio_teardown()
|
/drivers/staging/netlogic/ |
D | xlr_net.c | 174 struct phy_device *phydev = priv->mii_bus->phy_map[priv->phy_addr]; in xlr_get_settings() 184 struct phy_device *phydev = priv->mii_bus->phy_map[priv->phy_addr]; in xlr_set_settings() 221 struct phy_device *phydev = priv->mii_bus->phy_map[priv->phy_addr]; in xlr_net_open() 242 struct phy_device *phydev = priv->mii_bus->phy_map[priv->phy_addr]; in xlr_net_stop() 271 struct phy_device *phydev = priv->mii_bus->phy_map[priv->phy_addr]; in xlr_wakeup_queue() 715 static int xlr_mii_write(struct mii_bus *bus, int phy_addr, int regnum, u16 val) in xlr_mii_write() 726 static int xlr_mii_read(struct mii_bus *bus, int phy_addr, int regnum) in xlr_mii_read() 774 struct phy_device *phydev = priv->mii_bus->phy_map[priv->phy_addr]; in xlr_set_gmac_speed() 816 struct phy_device *phydev = priv->mii_bus->phy_map[priv->phy_addr]; in xlr_gmac_link_adjust() 833 struct phy_device *phydev = priv->mii_bus->phy_map[priv->phy_addr]; in xlr_mii_probe() [all …]
|
/drivers/net/ethernet/ |
D | lantiq_etop.c | 104 struct mii_bus *mii_bus; member 339 ltq_etop_mdio_wr(struct mii_bus *bus, int phy_addr, int phy_reg, u16 phy_data) in ltq_etop_mdio_wr() 353 ltq_etop_mdio_rd(struct mii_bus *bus, int phy_addr, int phy_reg) in ltq_etop_mdio_rd() 382 if (priv->mii_bus->phy_map[phy_addr]) { in ltq_etop_mdio_probe() 383 phydev = priv->mii_bus->phy_map[phy_addr]; in ltq_etop_mdio_probe() 425 priv->mii_bus = mdiobus_alloc(); in ltq_etop_mdio_init() 426 if (!priv->mii_bus) { in ltq_etop_mdio_init() 432 priv->mii_bus->priv = dev; in ltq_etop_mdio_init() 433 priv->mii_bus->read = ltq_etop_mdio_rd; in ltq_etop_mdio_init() 434 priv->mii_bus->write = ltq_etop_mdio_wr; in ltq_etop_mdio_init() [all …]
|
D | dnet.c | 102 static int dnet_mdio_read(struct mii_bus *bus, int mii_id, int regnum) in dnet_mdio_read() 134 static int dnet_mdio_write(struct mii_bus *bus, int mii_id, int regnum, in dnet_mdio_write() 262 if (bp->mii_bus->phy_map[phy_addr]) { in dnet_mii_probe() 263 phydev = bp->mii_bus->phy_map[phy_addr]; in dnet_mii_probe() 313 bp->mii_bus = mdiobus_alloc(); in dnet_mii_init() 314 if (bp->mii_bus == NULL) in dnet_mii_init() 317 bp->mii_bus->name = "dnet_mii_bus"; in dnet_mii_init() 318 bp->mii_bus->read = &dnet_mdio_read; in dnet_mii_init() 319 bp->mii_bus->write = &dnet_mdio_write; in dnet_mii_init() 321 snprintf(bp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x", in dnet_mii_init() [all …]
|
/drivers/net/ethernet/amd/ |
D | au1000_eth.c | 345 static int au1000_mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum) in au1000_mdiobus_read() 360 static int au1000_mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum, in au1000_mdiobus_write() 374 static int au1000_mdiobus_reset(struct mii_bus *bus) in au1000_mdiobus_reset() 505 phydev = aup->mii_bus->phy_map[aup->phy_addr]; in au1000_mii_probe() 515 if (aup->mii_bus->phy_map[phy_addr]) { in au1000_mii_probe() 516 phydev = aup->mii_bus->phy_map[phy_addr]; in au1000_mii_probe() 534 aup->mii_bus->phy_map[phy_addr]; in au1000_mii_probe() 1282 aup->mii_bus = mdiobus_alloc(); in au1000_probe() 1283 if (aup->mii_bus == NULL) { in au1000_probe() 1289 aup->mii_bus->priv = dev; in au1000_probe() [all …]
|
/drivers/net/ethernet/rdc/ |
D | r6040.c | 202 struct mii_bus *mii_bus; member 256 static int r6040_mdiobus_read(struct mii_bus *bus, int phy_addr, int reg) in r6040_mdiobus_read() 265 static int r6040_mdiobus_write(struct mii_bus *bus, int phy_addr, in r6040_mdiobus_write() 1043 phydev = phy_find_first(lp->mii_bus); in r6040_mii_probe() 1186 lp->mii_bus = mdiobus_alloc(); in r6040_init_one() 1187 if (!lp->mii_bus) { in r6040_init_one() 1193 lp->mii_bus->priv = dev; in r6040_init_one() 1194 lp->mii_bus->read = r6040_mdiobus_read; in r6040_init_one() 1195 lp->mii_bus->write = r6040_mdiobus_write; in r6040_init_one() 1196 lp->mii_bus->name = "r6040_eth_mii"; in r6040_init_one() [all …]
|
/drivers/net/ethernet/freescale/ |
D | fec_mpc52xx_phy.c | 28 static int mpc52xx_fec_mdio_transfer(struct mii_bus *bus, int phy_id, in mpc52xx_fec_mdio_transfer() 52 static int mpc52xx_fec_mdio_read(struct mii_bus *bus, int phy_id, int reg) in mpc52xx_fec_mdio_read() 57 static int mpc52xx_fec_mdio_write(struct mii_bus *bus, int phy_id, int reg, in mpc52xx_fec_mdio_write() 68 struct mii_bus *bus; in mpc52xx_fec_mdio_probe() 126 struct mii_bus *bus = platform_get_drvdata(of); in mpc52xx_fec_mdio_remove()
|
/drivers/net/ethernet/nxp/ |
D | lpc_eth.c | 427 struct mii_bus *mii_bus; member 704 static int lpc_mdio_read(struct mii_bus *bus, int phy_id, int phyreg) in lpc_mdio_read() 726 static int lpc_mdio_write(struct mii_bus *bus, int phy_id, int phyreg, in lpc_mdio_write() 745 static int lpc_mdio_reset(struct mii_bus *bus) in lpc_mdio_reset() 788 struct phy_device *phydev = phy_find_first(pldat->mii_bus); in lpc_mii_probe() 829 pldat->mii_bus = mdiobus_alloc(); in lpc_mii_init() 830 if (!pldat->mii_bus) { in lpc_mii_init() 845 pldat->mii_bus->name = "lpc_mii_bus"; in lpc_mii_init() 846 pldat->mii_bus->read = &lpc_mdio_read; in lpc_mii_init() 847 pldat->mii_bus->write = &lpc_mdio_write; in lpc_mii_init() [all …]
|
/drivers/net/ethernet/broadcom/ |
D | bgmac.c | 1416 static int bgmac_mii_read(struct mii_bus *bus, int mii_id, int regnum) in bgmac_mii_read() 1421 static int bgmac_mii_write(struct mii_bus *bus, int mii_id, int regnum, in bgmac_mii_write() 1482 struct mii_bus *mii_bus; in bgmac_mii_register() local 1491 mii_bus = mdiobus_alloc(); in bgmac_mii_register() 1492 if (!mii_bus) in bgmac_mii_register() 1495 mii_bus->name = "bgmac mii bus"; in bgmac_mii_register() 1496 sprintf(mii_bus->id, "%s-%d-%d", "bgmac", bgmac->core->bus->num, in bgmac_mii_register() 1498 mii_bus->priv = bgmac; in bgmac_mii_register() 1499 mii_bus->read = bgmac_mii_read; in bgmac_mii_register() 1500 mii_bus->write = bgmac_mii_write; in bgmac_mii_register() [all …]
|
D | sb1250-mac.c | 240 struct mii_bus *mii_bus; /* the MII bus */ member 323 static int sbmac_mii_read(struct mii_bus *bus, int phyaddr, int regidx); 324 static int sbmac_mii_write(struct mii_bus *bus, int phyaddr, int regidx, 435 static int sbmac_mii_read(struct mii_bus *bus, int phyaddr, int regidx) in sbmac_mii_read() 528 static int sbmac_mii_write(struct mii_bus *bus, int phyaddr, int regidx, in sbmac_mii_write() 2241 sc->mii_bus = mdiobus_alloc(); in sbmac_init() 2242 if (sc->mii_bus == NULL) { in sbmac_init() 2247 sc->mii_bus->name = sbmac_mdio_string; in sbmac_init() 2248 snprintf(sc->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x", in sbmac_init() 2250 sc->mii_bus->priv = sc; in sbmac_init() [all …]
|
/drivers/net/ethernet/faraday/ |
D | ftgmac100.c | 74 struct mii_bus *mii_bus; member 844 struct phy_device *tmp = priv->mii_bus->phy_map[i]; in ftgmac100_mii_probe() 873 static int ftgmac100_mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum) in ftgmac100_mdiobus_read() 908 static int ftgmac100_mdiobus_write(struct mii_bus *bus, int phy_addr, in ftgmac100_mdiobus_write() 1249 priv->mii_bus = mdiobus_alloc(); in ftgmac100_probe() 1250 if (!priv->mii_bus) { in ftgmac100_probe() 1255 priv->mii_bus->name = "ftgmac100_mdio"; in ftgmac100_probe() 1256 snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "ftgmac100_mii"); in ftgmac100_probe() 1258 priv->mii_bus->priv = netdev; in ftgmac100_probe() 1259 priv->mii_bus->read = ftgmac100_mdiobus_read; in ftgmac100_probe() [all …]
|
/drivers/net/ethernet/8390/ |
D | ax88796.c | 85 struct mii_bus *mii_bus; member 355 phy_dev = phy_find_first(ax->mii_bus); in ax_mii_probe() 634 ax->mii_bus = alloc_mdio_bitbang(&ax->bb_ctrl); in ax_mii_init() 635 if (!ax->mii_bus) { in ax_mii_init() 640 ax->mii_bus->name = "ax88796_mii_bus"; in ax_mii_init() 641 ax->mii_bus->parent = dev->dev.parent; in ax_mii_init() 642 snprintf(ax->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x", in ax_mii_init() 645 ax->mii_bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL); in ax_mii_init() 646 if (!ax->mii_bus->irq) { in ax_mii_init() 652 ax->mii_bus->irq[i] = PHY_POLL; in ax_mii_init() [all …]
|
/drivers/net/ethernet/marvell/ |
D | mvmdio.c | 74 static int orion_mdio_wait_ready(struct mii_bus *bus) in orion_mdio_wait_ready() 112 static int orion_mdio_read(struct mii_bus *bus, int mii_id, in orion_mdio_read() 147 static int orion_mdio_write(struct mii_bus *bus, int mii_id, in orion_mdio_write() 188 struct mii_bus *bus; in orion_mdio_probe() 271 struct mii_bus *bus = platform_get_drvdata(pdev); in orion_mdio_remove()
|