/drivers/net/phy/ |
D | phy-core.c | 446 static void mmd_phy_indirect(struct mii_bus *bus, int phy_addr, int devad, in mmd_phy_indirect() argument 450 __mdiobus_write(bus, phy_addr, MII_MMD_CTRL, devad); in mmd_phy_indirect() 457 devad | MII_MMD_CTRL_NOINCR); in mmd_phy_indirect() 469 int __phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum) in __phy_read_mmd() argument 473 if (regnum > (u16)~0 || devad > 32) in __phy_read_mmd() 477 val = phydev->drv->read_mmd(phydev, devad, regnum); in __phy_read_mmd() 480 devad, regnum); in __phy_read_mmd() 485 mmd_phy_indirect(bus, phy_addr, devad, regnum); in __phy_read_mmd() 503 int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum) in phy_read_mmd() argument 508 ret = __phy_read_mmd(phydev, devad, regnum); in phy_read_mmd() [all …]
|
D | adin.c | 170 int devad; member 513 static int adin_cl45_to_adin_reg(struct phy_device *phydev, int devad, in adin_cl45_to_adin_reg() argument 519 if (devad == MDIO_MMD_VEND1) in adin_cl45_to_adin_reg() 524 if (m->devad == devad && m->cl45_regnum == cl45_regnum) in adin_cl45_to_adin_reg() 530 devad, cl45_regnum); in adin_cl45_to_adin_reg() 535 static int adin_read_mmd(struct phy_device *phydev, int devad, u16 regnum) in adin_read_mmd() argument 542 adin_regnum = adin_cl45_to_adin_reg(phydev, devad, regnum); in adin_read_mmd() 554 static int adin_write_mmd(struct phy_device *phydev, int devad, u16 regnum, in adin_write_mmd() argument 562 adin_regnum = adin_cl45_to_adin_reg(phydev, devad, regnum); in adin_write_mmd()
|
D | phy.c | 300 int prtad, devad; in phy_mii_ioctl() local 310 devad = mdio_phy_id_devad(mii_data->phy_id); in phy_mii_ioctl() 311 devad = mdiobus_c45_addr(devad, mii_data->reg_num); in phy_mii_ioctl() 314 devad = mii_data->reg_num; in phy_mii_ioctl() 317 devad); in phy_mii_ioctl() 323 devad = mdio_phy_id_devad(mii_data->phy_id); in phy_mii_ioctl() 324 devad = mdiobus_c45_addr(devad, mii_data->reg_num); in phy_mii_ioctl() 327 devad = mii_data->reg_num; in phy_mii_ioctl() 330 switch (devad) { in phy_mii_ioctl() 367 mdiobus_write(phydev->mdio.bus, prtad, devad, val); in phy_mii_ioctl() [all …]
|
D | phy-c45.c | 262 int val, devad; in genphy_c45_read_link() local 280 devad = __ffs(mmd_mask); in genphy_c45_read_link() 281 mmd_mask &= ~BIT(devad); in genphy_c45_read_link() 289 val = phy_read_mmd(phydev, devad, MDIO_STAT1); in genphy_c45_read_link() 296 val = phy_read_mmd(phydev, devad, MDIO_STAT1); in genphy_c45_read_link()
|
D | phylink.c | 1928 int prtad, devad; in phylink_phy_read() local 1932 devad = mdio_phy_id_devad(phy_id); in phylink_phy_read() 1933 devad = mdiobus_c45_addr(devad, reg); in phylink_phy_read() 1940 devad = __ffs(phydev->c45_ids.mmds_present); in phylink_phy_read() 1946 devad = MDIO_MMD_AN; in phylink_phy_read() 1956 devad = mdiobus_c45_addr(devad, reg); in phylink_phy_read() 1959 devad = reg; in phylink_phy_read() 1961 return mdiobus_read(pl->phydev->mdio.bus, prtad, devad); in phylink_phy_read() 1968 int prtad, devad; in phylink_phy_write() local 1972 devad = mdio_phy_id_devad(phy_id); in phylink_phy_write() [all …]
|
D | phy_device.c | 695 static int phy_c45_probe_present(struct mii_bus *bus, int prtad, int devad) in phy_c45_probe_present() argument 699 stat2 = mdiobus_c45_read(bus, prtad, devad, MDIO_STAT2); in phy_c45_probe_present() 2620 int genphy_read_mmd_unsupported(struct phy_device *phdev, int devad, u16 regnum) in genphy_read_mmd_unsupported() argument
|
/drivers/net/ |
D | mdio.c | 67 int prtad, int devad, u16 addr, int mask, in mdio_set_flag() argument 70 int old_val = mdio->mdio_read(mdio->dev, prtad, devad, addr); in mdio_set_flag() 81 return mdio->mdio_write(mdio->dev, prtad, devad, addr, new_val); in mdio_set_flag() 96 int devad, reg; in mdio45_links_ok() local 105 for (devad = 0; mmd_mask; devad++) { in mdio45_links_ok() 106 if (mmd_mask & (1 << devad)) { in mdio45_links_ok() 107 mmd_mask &= ~(1 << devad); in mdio45_links_ok() 111 devad, MDIO_STAT1); in mdio45_links_ok() 112 if (devad == MDIO_MMD_PMAPMD || devad == MDIO_MMD_PCS || in mdio45_links_ok() 113 devad == MDIO_MMD_PHYXS || devad == MDIO_MMD_DTEXS) in mdio45_links_ok() [all …]
|
/drivers/net/ethernet/sfc/falcon/ |
D | mdio_10g.h | 22 static inline int ef4_mdio_read(struct ef4_nic *efx, int devad, int addr) in ef4_mdio_read() argument 24 return efx->mdio.mdio_read(efx->net_dev, efx->mdio.prtad, devad, addr); in ef4_mdio_read() 28 ef4_mdio_write(struct ef4_nic *efx, int devad, int addr, int value) in ef4_mdio_write() argument 30 efx->mdio.mdio_write(efx->net_dev, efx->mdio.prtad, devad, addr, value); in ef4_mdio_write() 99 ef4_mdio_set_flag(struct ef4_nic *efx, int devad, int addr, in ef4_mdio_set_flag() argument 102 mdio_set_flag(&efx->mdio, efx->mdio.prtad, devad, addr, mask, state); in ef4_mdio_set_flag()
|
D | mdio_10g.c | 313 int devad = __ffs(efx->mdio.mmds); in ef4_mdio_test_alive() local 318 physid1 = ef4_mdio_read(efx, devad, MDIO_DEVID1); in ef4_mdio_test_alive() 319 physid2 = ef4_mdio_read(efx, devad, MDIO_DEVID2); in ef4_mdio_test_alive()
|
D | falcon.c | 1573 int prtad, int devad, u16 addr, u16 value) in falcon_mdio_write() argument 1582 prtad, devad, addr, value); in falcon_mdio_write() 1596 FRF_AB_MD_DEV_ADR, devad); in falcon_mdio_write() 1626 int prtad, int devad, u16 addr) in falcon_mdio_read() argument 1644 FRF_AB_MD_DEV_ADR, devad); in falcon_mdio_read() 1658 prtad, devad, addr, rc); in falcon_mdio_read() 1668 prtad, devad, addr, rc); in falcon_mdio_read()
|
/drivers/net/ethernet/sfc/ |
D | mcdi_port.c | 21 int prtad, int devad, u16 addr) in efx_mcdi_mdio_read() argument 31 MCDI_SET_DWORD(inbuf, MDIO_READ_IN_DEVAD, devad); in efx_mcdi_mdio_read() 47 int prtad, int devad, u16 addr, u16 value) in efx_mcdi_mdio_write() argument 57 MCDI_SET_DWORD(inbuf, MDIO_WRITE_IN_DEVAD, devad); in efx_mcdi_mdio_write()
|
/drivers/net/ethernet/hisilicon/ |
D | hns_mdio.c | 222 u8 devad = ((regnum >> 16) & 0x1f); in hns_mdio_write() local 231 phy_id, is_c45, devad, reg, data); in hns_mdio_write() 249 MDIO_C45_WRITE_ADDR, phy_id, devad); in hns_mdio_write() 259 cmd_reg_cfg = devad; in hns_mdio_write() 283 u8 devad = ((regnum >> 16) & 0x1f); in hns_mdio_read() local 291 phy_id, is_c45, devad, reg); in hns_mdio_read() 309 MDIO_C45_WRITE_ADDR, phy_id, devad); in hns_mdio_read() 319 MDIO_C45_READ, phy_id, devad); in hns_mdio_read()
|
/drivers/net/ethernet/broadcom/bnx2x/ |
D | bnx2x_link.h | 145 u8 devad; member 394 u8 devad, u16 reg, u16 *ret_val); 397 u8 devad, u16 reg, u16 val);
|
D | bnx2x_link.c | 2666 u8 devad, u16 reg, u16 *ret_val) in bnx2x_cl45_read() argument 2682 val = ((phy->addr << 21) | (devad << 16) | reg | in bnx2x_cl45_read() 2703 val = ((phy->addr << 21) | (devad << 16) | in bnx2x_cl45_read() 2730 bnx2x_cl45_read(bp, phy, devad, 0xf, &temp_val); in bnx2x_cl45_read() 2741 u8 devad, u16 reg, u16 val) in bnx2x_cl45_write() argument 2758 tmp = ((phy->addr << 21) | (devad << 16) | reg | in bnx2x_cl45_write() 2778 tmp = ((phy->addr << 21) | (devad << 16) | val | in bnx2x_cl45_write() 2804 bnx2x_cl45_read(bp, phy, devad, 0xf, &temp_val); in bnx2x_cl45_write() 3172 u8 devad, u16 reg, u16 or_val) in bnx2x_cl45_read_or_write() argument 3175 bnx2x_cl45_read(bp, phy, devad, reg, &val); in bnx2x_cl45_read_or_write() [all …]
|
D | bnx2x_main.c | 12758 int devad, u16 addr) in bnx2x_mdio_read() argument 12765 prtad, devad, addr); in bnx2x_mdio_read() 12768 devad = (devad == MDIO_DEVAD_NONE) ? DEFAULT_PHY_DEV_ADDR : devad; in bnx2x_mdio_read() 12771 rc = bnx2x_phy_read(&bp->link_params, prtad, devad, addr, &value); in bnx2x_mdio_read() 12781 static int bnx2x_mdio_write(struct net_device *netdev, int prtad, int devad, in bnx2x_mdio_write() argument 12789 prtad, devad, addr, value); in bnx2x_mdio_write() 12792 devad = (devad == MDIO_DEVAD_NONE) ? DEFAULT_PHY_DEV_ADDR : devad; in bnx2x_mdio_write() 12795 rc = bnx2x_phy_write(&bp->link_params, prtad, devad, addr, value); in bnx2x_mdio_write()
|
/drivers/net/dsa/ |
D | mt7530.c | 78 core_read_mmd_indirect(struct mt7530_priv *priv, int prtad, int devad) in core_read_mmd_indirect() argument 84 ret = bus->write(bus, 0, MII_MMD_CTRL, devad); in core_read_mmd_indirect() 94 ret = bus->write(bus, 0, MII_MMD_CTRL, (devad | MII_MMD_CTRL_NOINCR)); in core_read_mmd_indirect() 110 int devad, u32 data) in core_write_mmd_indirect() argument 116 ret = bus->write(bus, 0, MII_MMD_CTRL, devad); in core_write_mmd_indirect() 126 ret = bus->write(bus, 0, MII_MMD_CTRL, (devad | MII_MMD_CTRL_NOINCR)); in core_write_mmd_indirect() 617 mt7531_ind_c45_phy_read(struct mt7530_priv *priv, int port, int devad, in mt7531_ind_c45_phy_read() argument 637 MT7531_MDIO_DEV_ADDR(devad) | regnum; in mt7531_ind_c45_phy_read() 648 MT7531_MDIO_DEV_ADDR(devad); in mt7531_ind_c45_phy_read() 666 mt7531_ind_c45_phy_write(struct mt7530_priv *priv, int port, int devad, in mt7531_ind_c45_phy_write() argument [all …]
|
/drivers/net/usb/ |
D | ax88179_178a.c | 352 u16 devad) in ax88179_phy_mmd_indirect() argument 357 tmp16 = devad; in ax88179_phy_mmd_indirect() 365 tmp16 = devad | MII_MMD_CTRL_NOINCR; in ax88179_phy_mmd_indirect() 373 ax88179_phy_read_mmd_indirect(struct usbnet *dev, u16 prtad, u16 devad) in ax88179_phy_read_mmd_indirect() argument 378 ax88179_phy_mmd_indirect(dev, prtad, devad); in ax88179_phy_read_mmd_indirect() 389 ax88179_phy_write_mmd_indirect(struct usbnet *dev, u16 prtad, u16 devad, in ax88179_phy_write_mmd_indirect() argument 394 ax88179_phy_mmd_indirect(dev, prtad, devad); in ax88179_phy_write_mmd_indirect()
|
/drivers/net/ethernet/atheros/alx/ |
D | main.c | 1589 int prtad, int devad, u16 addr) in alx_mdio_read() argument 1599 if (devad == MDIO_DEVAD_NONE) in alx_mdio_read() 1602 err = alx_read_phy_ext(hw, devad, addr, &val); in alx_mdio_read() 1610 int prtad, int devad, u16 addr, u16 val) in alx_mdio_write() argument 1618 if (devad == MDIO_DEVAD_NONE) in alx_mdio_write() 1621 return alx_write_phy_ext(hw, devad, addr, val); in alx_mdio_write()
|
/drivers/net/ethernet/intel/ixgbe/ |
D | ixgbe_main.c | 8809 ixgbe_mdio_read(struct net_device *netdev, int prtad, int devad, u16 addr) in ixgbe_mdio_read() argument 8819 if (devad != MDIO_DEVAD_NONE) in ixgbe_mdio_read() 8820 regnum |= (devad << 16) | MII_ADDR_C45; in ixgbe_mdio_read() 8827 rc = hw->phy.ops.read_reg(hw, addr, devad, &value); in ixgbe_mdio_read() 8833 static int ixgbe_mdio_write(struct net_device *netdev, int prtad, int devad, in ixgbe_mdio_write() argument 8842 if (devad != MDIO_DEVAD_NONE) in ixgbe_mdio_write() 8843 regnum |= (devad << 16) | MII_ADDR_C45; in ixgbe_mdio_write() 8850 return hw->phy.ops.write_reg(hw, addr, devad, value); in ixgbe_mdio_write()
|
/drivers/net/ethernet/chelsio/cxgb4/ |
D | cxgb4_main.c | 3058 int ret = 0, prtad, devad; in cxgb_ioctl() local 3073 devad = mdio_phy_id_devad(data->phy_id); in cxgb_ioctl() 3076 devad = 0; in cxgb_ioctl() 3083 ret = t4_mdio_rd(pi->adapter, mbox, prtad, devad, in cxgb_ioctl() 3086 ret = t4_mdio_wr(pi->adapter, mbox, prtad, devad, in cxgb_ioctl()
|
/drivers/net/ethernet/broadcom/ |
D | tg3.c | 1234 static int tg3_phy_cl45_write(struct tg3 *tp, u32 devad, u32 addr, u32 val) in tg3_phy_cl45_write() argument 1238 err = tg3_writephy(tp, MII_TG3_MMD_CTRL, devad); in tg3_phy_cl45_write() 1247 MII_TG3_MMD_CTRL_DATA_NOINC | devad); in tg3_phy_cl45_write() 1257 static int tg3_phy_cl45_read(struct tg3 *tp, u32 devad, u32 addr, u32 *val) in tg3_phy_cl45_read() argument 1261 err = tg3_writephy(tp, MII_TG3_MMD_CTRL, devad); in tg3_phy_cl45_read() 1270 MII_TG3_MMD_CTRL_DATA_NOINC | devad); in tg3_phy_cl45_read()
|