/Linux-v5.4/drivers/net/phy/ |
D | phy-core.c | 352 static void mmd_phy_indirect(struct mii_bus *bus, int phy_addr, int devad, in mmd_phy_indirect() argument 356 __mdiobus_write(bus, phy_addr, MII_MMD_CTRL, devad); in mmd_phy_indirect() 363 devad | MII_MMD_CTRL_NOINCR); in mmd_phy_indirect() 375 int __phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum) in __phy_read_mmd() argument 379 if (regnum > (u16)~0 || devad > 32) in __phy_read_mmd() 383 val = phydev->drv->read_mmd(phydev, devad, regnum); in __phy_read_mmd() 385 u32 addr = MII_ADDR_C45 | (devad << 16) | (regnum & 0xffff); in __phy_read_mmd() 392 mmd_phy_indirect(bus, phy_addr, devad, regnum); in __phy_read_mmd() 410 int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum) in phy_read_mmd() argument 415 ret = __phy_read_mmd(phydev, devad, regnum); in phy_read_mmd() [all …]
|
D | phy.c | 403 int prtad, devad; in phy_mii_ioctl() local 413 devad = mdio_phy_id_devad(mii_data->phy_id); in phy_mii_ioctl() 414 devad = MII_ADDR_C45 | devad << 16 | mii_data->reg_num; in phy_mii_ioctl() 417 devad = mii_data->reg_num; in phy_mii_ioctl() 420 devad); in phy_mii_ioctl() 426 devad = mdio_phy_id_devad(mii_data->phy_id); in phy_mii_ioctl() 427 devad = MII_ADDR_C45 | devad << 16 | mii_data->reg_num; in phy_mii_ioctl() 430 devad = mii_data->reg_num; in phy_mii_ioctl() 433 switch (devad) { in phy_mii_ioctl() 471 mdiobus_write(phydev->mdio.bus, prtad, devad, val); in phy_mii_ioctl() [all …]
|
D | adin.c | 143 int devad; member 456 static int adin_cl45_to_adin_reg(struct phy_device *phydev, int devad, in adin_cl45_to_adin_reg() argument 462 if (devad == MDIO_MMD_VEND1) in adin_cl45_to_adin_reg() 467 if (m->devad == devad && m->cl45_regnum == cl45_regnum) in adin_cl45_to_adin_reg() 473 devad, cl45_regnum); in adin_cl45_to_adin_reg() 478 static int adin_read_mmd(struct phy_device *phydev, int devad, u16 regnum) in adin_read_mmd() argument 485 adin_regnum = adin_cl45_to_adin_reg(phydev, devad, regnum); in adin_read_mmd() 497 static int adin_write_mmd(struct phy_device *phydev, int devad, u16 regnum, in adin_write_mmd() argument 505 adin_regnum = adin_cl45_to_adin_reg(phydev, devad, regnum); in adin_write_mmd()
|
D | phylink.c | 1480 int prtad, devad; in phylink_phy_read() local 1484 devad = mdio_phy_id_devad(phy_id); in phylink_phy_read() 1485 devad = MII_ADDR_C45 | devad << 16 | reg; in phylink_phy_read() 1492 devad = __ffs(phydev->c45_ids.devices_in_package); in phylink_phy_read() 1498 devad = MDIO_MMD_AN; in phylink_phy_read() 1508 devad = MII_ADDR_C45 | devad << 16 | reg; in phylink_phy_read() 1511 devad = reg; in phylink_phy_read() 1513 return mdiobus_read(pl->phydev->mdio.bus, prtad, devad); in phylink_phy_read() 1520 int prtad, devad; in phylink_phy_write() local 1524 devad = mdio_phy_id_devad(phy_id); in phylink_phy_write() [all …]
|
D | phy-c45.c | 219 int val, devad; in genphy_c45_read_link() local 237 devad = __ffs(mmd_mask); in genphy_c45_read_link() 238 mmd_mask &= ~BIT(devad); in genphy_c45_read_link() 245 val = phy_read_mmd(phydev, devad, MDIO_STAT1); in genphy_c45_read_link() 252 val = phy_read_mmd(phydev, devad, MDIO_STAT1); in genphy_c45_read_link()
|
D | phy_device.c | 1976 int genphy_read_mmd_unsupported(struct phy_device *phdev, int devad, u16 regnum) in genphy_read_mmd_unsupported() argument
|
/Linux-v5.4/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 …]
|
/Linux-v5.4/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()
|
/Linux-v5.4/include/linux/ |
D | phy.h | 748 int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum); 759 int __phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum); 771 int phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val); 783 int __phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val); 792 int __phy_modify_mmd_changed(struct phy_device *phydev, int devad, u32 regnum, 794 int phy_modify_mmd_changed(struct phy_device *phydev, int devad, u32 regnum, 796 int __phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum, 798 int phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum, 860 static inline int __phy_set_bits_mmd(struct phy_device *phydev, int devad, in __phy_set_bits_mmd() argument 863 return __phy_modify_mmd(phydev, devad, regnum, 0, val); in __phy_set_bits_mmd() [all …]
|
D | mdio.h | 126 int (*mdio_read)(struct net_device *dev, int prtad, int devad, 128 int (*mdio_write)(struct net_device *dev, int prtad, int devad, 142 int prtad, int devad, u16 addr, int mask,
|
/Linux-v5.4/include/uapi/linux/ |
D | mdio.h | 125 #define MDIO_DEVS_PRESENT(devad) (1 << (devad)) argument 322 static inline __u16 mdio_phy_id_c45(int prtad, int devad) in mdio_phy_id_c45() argument 324 return MDIO_PHY_ID_C45 | (prtad << 5) | devad; in mdio_phy_id_c45()
|
/Linux-v5.4/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() 284 u8 devad = ((regnum >> 16) & 0x1f); in hns_mdio_read() local 292 phy_id, is_c45, devad, reg); in hns_mdio_read() 310 MDIO_C45_WRITE_ADDR, phy_id, devad); in hns_mdio_read() 320 MDIO_C45_READ, phy_id, devad); in hns_mdio_read()
|
/Linux-v5.4/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() 3168 u8 devad, u16 reg, u16 or_val) in bnx2x_cl45_read_or_write() argument 3171 bnx2x_cl45_read(bp, phy, devad, reg, &val); in bnx2x_cl45_read_or_write() [all …]
|
D | bnx2x_main.c | 12872 int devad, u16 addr) in bnx2x_mdio_read() argument 12879 prtad, devad, addr); in bnx2x_mdio_read() 12882 devad = (devad == MDIO_DEVAD_NONE) ? DEFAULT_PHY_DEV_ADDR : devad; in bnx2x_mdio_read() 12885 rc = bnx2x_phy_read(&bp->link_params, prtad, devad, addr, &value); in bnx2x_mdio_read() 12895 static int bnx2x_mdio_write(struct net_device *netdev, int prtad, int devad, in bnx2x_mdio_write() argument 12903 prtad, devad, addr, value); in bnx2x_mdio_write() 12906 devad = (devad == MDIO_DEVAD_NONE) ? DEFAULT_PHY_DEV_ADDR : devad; in bnx2x_mdio_write() 12909 rc = bnx2x_phy_write(&bp->link_params, prtad, devad, addr, value); in bnx2x_mdio_write()
|
/Linux-v5.4/drivers/net/usb/ |
D | ax88179_178a.c | 371 u16 devad) in ax88179_phy_mmd_indirect() argument 376 tmp16 = devad; in ax88179_phy_mmd_indirect() 384 tmp16 = devad | MII_MMD_CTRL_NOINCR; in ax88179_phy_mmd_indirect() 392 ax88179_phy_read_mmd_indirect(struct usbnet *dev, u16 prtad, u16 devad) in ax88179_phy_read_mmd_indirect() argument 397 ax88179_phy_mmd_indirect(dev, prtad, devad); in ax88179_phy_read_mmd_indirect() 408 ax88179_phy_write_mmd_indirect(struct usbnet *dev, u16 prtad, u16 devad, in ax88179_phy_write_mmd_indirect() argument 413 ax88179_phy_mmd_indirect(dev, prtad, devad); in ax88179_phy_write_mmd_indirect()
|
/Linux-v5.4/drivers/net/dsa/ |
D | mt7530.c | 122 core_read_mmd_indirect(struct mt7530_priv *priv, int prtad, int devad) in core_read_mmd_indirect() argument 128 ret = bus->write(bus, 0, MII_MMD_CTRL, devad); in core_read_mmd_indirect() 138 ret = bus->write(bus, 0, MII_MMD_CTRL, (devad | MII_MMD_CTRL_NOINCR)); in core_read_mmd_indirect() 154 int devad, u32 data) in core_write_mmd_indirect() argument 160 ret = bus->write(bus, 0, MII_MMD_CTRL, devad); in core_write_mmd_indirect() 170 ret = bus->write(bus, 0, MII_MMD_CTRL, (devad | MII_MMD_CTRL_NOINCR)); in core_write_mmd_indirect()
|
/Linux-v5.4/drivers/net/ethernet/sfc/ |
D | mcdi_port.c | 119 int prtad, int devad, u16 addr) in efx_mcdi_mdio_read() argument 129 MCDI_SET_DWORD(inbuf, MDIO_READ_IN_DEVAD, devad); in efx_mcdi_mdio_read() 145 int prtad, int devad, u16 addr, u16 value) in efx_mcdi_mdio_write() argument 155 MCDI_SET_DWORD(inbuf, MDIO_WRITE_IN_DEVAD, devad); in efx_mcdi_mdio_write()
|
/Linux-v5.4/drivers/net/ethernet/atheros/alx/ |
D | main.c | 1564 int prtad, int devad, u16 addr) in alx_mdio_read() argument 1574 if (devad == MDIO_DEVAD_NONE) in alx_mdio_read() 1577 err = alx_read_phy_ext(hw, devad, addr, &val); in alx_mdio_read() 1585 int prtad, int devad, u16 addr, u16 val) in alx_mdio_write() argument 1593 if (devad == MDIO_DEVAD_NONE) in alx_mdio_write() 1596 return alx_write_phy_ext(hw, devad, addr, val); in alx_mdio_write()
|
/Linux-v5.4/drivers/net/ethernet/intel/ixgbe/ |
D | ixgbe_main.c | 8791 ixgbe_mdio_read(struct net_device *netdev, int prtad, int devad, u16 addr) in ixgbe_mdio_read() argument 8801 if (devad != MDIO_DEVAD_NONE) in ixgbe_mdio_read() 8802 regnum |= (devad << 16) | MII_ADDR_C45; in ixgbe_mdio_read() 8809 rc = hw->phy.ops.read_reg(hw, addr, devad, &value); in ixgbe_mdio_read() 8815 static int ixgbe_mdio_write(struct net_device *netdev, int prtad, int devad, in ixgbe_mdio_write() argument 8824 if (devad != MDIO_DEVAD_NONE) in ixgbe_mdio_write() 8825 regnum |= (devad << 16) | MII_ADDR_C45; in ixgbe_mdio_write() 8832 return hw->phy.ops.write_reg(hw, addr, devad, value); in ixgbe_mdio_write()
|
/Linux-v5.4/drivers/net/ethernet/chelsio/cxgb4/ |
D | cxgb4_main.c | 2619 int ret = 0, prtad, devad; in cxgb_ioctl() local 2634 devad = mdio_phy_id_devad(data->phy_id); in cxgb_ioctl() 2637 devad = 0; in cxgb_ioctl() 2644 ret = t4_mdio_rd(pi->adapter, mbox, prtad, devad, in cxgb_ioctl() 2647 ret = t4_mdio_wr(pi->adapter, mbox, prtad, devad, in cxgb_ioctl()
|
/Linux-v5.4/drivers/net/ethernet/broadcom/ |
D | tg3.c | 1239 static int tg3_phy_cl45_write(struct tg3 *tp, u32 devad, u32 addr, u32 val) in tg3_phy_cl45_write() argument 1243 err = tg3_writephy(tp, MII_TG3_MMD_CTRL, devad); in tg3_phy_cl45_write() 1252 MII_TG3_MMD_CTRL_DATA_NOINC | devad); in tg3_phy_cl45_write() 1262 static int tg3_phy_cl45_read(struct tg3 *tp, u32 devad, u32 addr, u32 *val) in tg3_phy_cl45_read() argument 1266 err = tg3_writephy(tp, MII_TG3_MMD_CTRL, devad); in tg3_phy_cl45_read() 1275 MII_TG3_MMD_CTRL_DATA_NOINC | devad); in tg3_phy_cl45_read()
|