/linux-6.3-rc2/drivers/net/ |
A D | mdio.c | 96 int devad, reg; in mdio45_links_ok() local 105 for (devad = 0; mmd_mask; 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() 115 devad, MDIO_STAT2); in mdio45_links_ok() 119 devad, MDIO_STAT1); in mdio45_links_ok() 530 int prtad, devad; in mdio_mii_ioctl() local 556 devad = MDIO_DEVAD_NONE; in mdio_mii_ioctl() [all …]
|
/linux-6.3-rc2/include/linux/ |
A D | mdio.h | 144 int (*mdio_read)(struct net_device *dev, int prtad, int devad, 146 int (*mdio_write)(struct net_device *dev, int prtad, int devad, 160 int prtad, int devad, u16 addr, int mask, 504 int mdiobus_c45_read_nested(struct mii_bus *bus, int addr, int devad, 510 int mdiobus_c45_write_nested(struct mii_bus *bus, int addr, int devad, 515 int mdiobus_c45_modify_changed(struct mii_bus *bus, int addr, int devad, 545 return mdiobus_c45_modify(mdiodev->bus, mdiodev->addr, devad, regnum, in mdiodev_c45_modify() 550 int devad, u32 regnum, u16 mask, in mdiodev_c45_modify_changed() argument 553 return mdiobus_c45_modify_changed(mdiodev->bus, mdiodev->addr, devad, in mdiodev_c45_modify_changed() 560 return mdiobus_c45_read(mdiodev->bus, mdiodev->addr, devad, regnum); in mdiodev_c45_read() [all …]
|
A D | phy.h | 1207 int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum); 1244 int __phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum); 1269 int __phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum, 1271 int phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum, 1333 static inline int __phy_set_bits_mmd(struct phy_device *phydev, int devad, in __phy_set_bits_mmd() argument 1336 return __phy_modify_mmd(phydev, devad, regnum, 0, val); in __phy_set_bits_mmd() 1352 return __phy_modify_mmd(phydev, devad, regnum, val, 0); in __phy_clear_bits_mmd() 1363 static inline int phy_set_bits_mmd(struct phy_device *phydev, int devad, in phy_set_bits_mmd() argument 1366 return phy_modify_mmd(phydev, devad, regnum, 0, val); in phy_set_bits_mmd() 1380 return phy_modify_mmd(phydev, devad, regnum, val, 0); in phy_clear_bits_mmd() [all …]
|
A D | mdio-bitbang.h | 43 int mdiobb_read_c45(struct mii_bus *bus, int devad, int phy, int reg); 44 int mdiobb_write_c45(struct mii_bus *bus, int devad, int phy, int reg, u16 val);
|
/linux-6.3-rc2/drivers/net/phy/ |
A D | phy-core.c | 538 devad | MII_MMD_CTRL_NOINCR); in mmd_phy_indirect() 554 if (regnum > (u16)~0 || devad > 32) in __phy_read_mmd() 561 devad, regnum); in __phy_read_mmd() 566 mmd_phy_indirect(bus, phy_addr, devad, regnum); in __phy_read_mmd() 589 ret = __phy_read_mmd(phydev, devad, regnum); in phy_read_mmd() 610 if (regnum > (u16)~0 || devad > 32) in __phy_write_mmd() 617 devad, regnum, val); in __phy_write_mmd() 622 mmd_phy_indirect(bus, phy_addr, devad, regnum); in __phy_write_mmd() 648 ret = __phy_write_mmd(phydev, devad, regnum, val); in phy_write_mmd() 742 ret = __phy_read_mmd(phydev, devad, regnum); in __phy_modify_mmd_changed() [all …]
|
A D | mdio_bus.c | 939 retval = bus->read_c45(bus, addr, devad, regnum); in __mdiobus_c45_read() 970 err = bus->write_c45(bus, addr, devad, regnum, val); in __mdiobus_c45_write() 996 int devad, u32 regnum, u16 mask, in __mdiobus_c45_modify_changed() argument 1001 ret = __mdiobus_c45_read(bus, addr, devad, regnum); in __mdiobus_c45_modify_changed() 1009 ret = __mdiobus_c45_write(bus, addr, devad, regnum, new); in __mdiobus_c45_modify_changed() 1077 retval = __mdiobus_c45_read(bus, addr, devad, regnum); in mdiobus_c45_read() 1098 int mdiobus_c45_read_nested(struct mii_bus *bus, int addr, int devad, in mdiobus_c45_read_nested() argument 1104 retval = __mdiobus_c45_read(bus, addr, devad, regnum); in mdiobus_c45_read_nested() 1178 err = __mdiobus_c45_write(bus, addr, devad, regnum, val); in mdiobus_c45_write() 1206 err = __mdiobus_c45_write(bus, addr, devad, regnum, val); in mdiobus_c45_write_nested() [all …]
|
A D | adin.c | 179 int devad; member 553 static int adin_cl45_to_adin_reg(struct phy_device *phydev, int devad, in adin_cl45_to_adin_reg() argument 559 if (devad == MDIO_MMD_VEND1) in adin_cl45_to_adin_reg() 564 if (m->devad == devad && m->cl45_regnum == cl45_regnum) in adin_cl45_to_adin_reg() 570 devad, cl45_regnum); in adin_cl45_to_adin_reg() 575 static int adin_read_mmd(struct phy_device *phydev, int devad, u16 regnum) in adin_read_mmd() argument 582 adin_regnum = adin_cl45_to_adin_reg(phydev, devad, regnum); in adin_read_mmd() 594 static int adin_write_mmd(struct phy_device *phydev, int devad, u16 regnum, in adin_write_mmd() argument 602 adin_regnum = adin_cl45_to_adin_reg(phydev, devad, regnum); in adin_write_mmd()
|
/linux-6.3-rc2/drivers/net/ethernet/sfc/falcon/ |
A 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()
|
/linux-6.3-rc2/drivers/base/regmap/ |
A D | regmap-mdio.c | 48 unsigned int devad; in regmap_mdio_c45_read() local 54 devad = reg >> REGMAP_MDIO_C45_DEVAD_SHIFT; in regmap_mdio_c45_read() 57 ret = mdiodev_c45_read(mdio_dev, devad, reg); in regmap_mdio_c45_read() 69 unsigned int devad; in regmap_mdio_c45_write() local 74 devad = reg >> REGMAP_MDIO_C45_DEVAD_SHIFT; in regmap_mdio_c45_write() 77 return mdiodev_c45_write(mdio_dev, devad, reg, val); in regmap_mdio_c45_write()
|
/linux-6.3-rc2/include/linux/fsl/ |
A D | enetc_mdio.h | 43 int enetc_mdio_read_c45(struct mii_bus *bus, int phy_id, int devad, int regnum); 44 int enetc_mdio_write_c45(struct mii_bus *bus, int phy_id, int devad, int regnum, 57 int devad, int regnum) in enetc_mdio_read_c45() argument 60 int devad, int regnum, u16 value) in enetc_mdio_write_c45() argument
|
/linux-6.3-rc2/drivers/net/mdio/ |
A D | mdio-cavium.c | 29 int phy_id, int devad, int regnum) in cavium_mdiobus_c45_addr() argument 44 smi_cmd.s.reg_adr = devad; in cavium_mdiobus_c45_addr() 90 int cavium_mdiobus_read_c45(struct mii_bus *bus, int phy_id, int devad, in cavium_mdiobus_read_c45() argument 99 r = cavium_mdiobus_c45_addr(p, phy_id, devad, regnum); in cavium_mdiobus_read_c45() 159 int cavium_mdiobus_write_c45(struct mii_bus *bus, int phy_id, int devad, in cavium_mdiobus_write_c45() argument 168 r = cavium_mdiobus_c45_addr(p, phy_id, devad, regnum); in cavium_mdiobus_write_c45() 179 smi_cmd.s.reg_adr = devad; in cavium_mdiobus_write_c45()
|
A D | mdio-aspeed.c | 107 static int aspeed_mdio_read_c45(struct mii_bus *bus, int addr, int devad, in aspeed_mdio_read_c45() argument 113 addr, devad, regnum); in aspeed_mdio_read_c45() 118 addr, devad, 0); in aspeed_mdio_read_c45() 125 static int aspeed_mdio_write_c45(struct mii_bus *bus, int addr, int devad, in aspeed_mdio_write_c45() argument 131 addr, devad, regnum); in aspeed_mdio_write_c45() 136 addr, devad, val); in aspeed_mdio_write_c45()
|
A D | mdio-i2c.c | 33 static int i2c_mii_read_default_c45(struct mii_bus *bus, int phy_id, int devad, in i2c_mii_read_default_c45() argument 45 if (devad >= 0) { in i2c_mii_read_default_c45() 46 *p++ = 0x20 | devad; in i2c_mii_read_default_c45() 69 int devad, int reg, u16 val) in i2c_mii_write_default_c45() argument 80 if (devad >= 0) { in i2c_mii_write_default_c45() 81 *p++ = devad; in i2c_mii_write_default_c45()
|
A D | mdio-bitbang.c | 184 int mdiobb_read_c45(struct mii_bus *bus, int phy, int devad, int reg) in mdiobb_read_c45() argument 188 mdiobb_cmd_addr(ctrl, phy, devad, reg); in mdiobb_read_c45() 220 int mdiobb_write_c45(struct mii_bus *bus, int phy, int devad, int reg, u16 val) in mdiobb_write_c45() argument 224 mdiobb_cmd_addr(ctrl, phy, devad, reg); in mdiobb_write_c45()
|
A D | mdio-mux-bcm-iproc.c | 146 static int iproc_mdiomux_read_c45(struct mii_bus *bus, int phyid, int devad, in iproc_mdiomux_read_c45() argument 152 ret = start_miim_ops(md->base, true, phyid, reg | devad << 16, 0, in iproc_mdiomux_read_c45() 176 int phyid, int devad, int reg, u16 val) in iproc_mdiomux_write_c45() argument 182 ret = start_miim_ops(md->base, true, phyid, reg | devad << 16, val, in iproc_mdiomux_write_c45()
|
/linux-6.3-rc2/drivers/net/ethernet/samsung/sxgbe/ |
A D | sxgbe_mdio.c | 53 int devad, int phyreg, u16 phydata) in sxgbe_mdio_c45() argument 58 reg = (devad & 0x1f) << 21; in sxgbe_mdio_c45() 99 int phyaddr, int devad, int phyreg, in sxgbe_mdio_access_c45() argument 109 sxgbe_mdio_c45(sp, cmd, phyaddr, devad, phyreg, phydata); in sxgbe_mdio_access_c45() 143 static int sxgbe_mdio_read_c45(struct mii_bus *bus, int phyaddr, int devad, in sxgbe_mdio_read_c45() argument 151 devad, phyreg, 0); in sxgbe_mdio_read_c45() 185 static int sxgbe_mdio_write_c45(struct mii_bus *bus, int phyaddr, int devad, in sxgbe_mdio_write_c45() argument 192 devad, phyreg, phydata); in sxgbe_mdio_write_c45()
|
/linux-6.3-rc2/drivers/net/ethernet/sfc/siena/ |
A 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()
|
/linux-6.3-rc2/drivers/net/ethernet/sfc/ |
A 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()
|
/linux-6.3-rc2/drivers/net/ethernet/stmicro/stmmac/ |
A D | stmmac_mdio.c | 49 int devad, int phyreg, u32 *hw_addr) in stmmac_xgmac2_c45_format() argument 59 *hw_addr |= devad << MII_XGMAC_DA_SHIFT; in stmmac_xgmac2_c45_format() 145 int devad, int phyreg) in stmmac_xgmac2_mdio_read_c45() argument 153 stmmac_xgmac2_c45_format(priv, phyaddr, devad, phyreg, &addr); in stmmac_xgmac2_mdio_read_c45() 223 int devad, int phyreg, u16 phydata) in stmmac_xgmac2_mdio_write_c45() argument 231 stmmac_xgmac2_c45_format(priv, phyaddr, devad, phyreg, &addr); in stmmac_xgmac2_mdio_write_c45() 306 static int stmmac_mdio_read_c45(struct mii_bus *bus, int phyaddr, int devad, in stmmac_mdio_read_c45() argument 328 value |= (devad << priv->hw->mii.reg_shift) & priv->hw->mii.reg_mask; in stmmac_mdio_read_c45() 407 int devad, int phyreg, u16 phydata) in stmmac_mdio_write_c45() argument 430 value |= (devad << priv->hw->mii.reg_shift) & priv->hw->mii.reg_mask; in stmmac_mdio_write_c45()
|
/linux-6.3-rc2/drivers/net/ethernet/hisilicon/ |
A D | hns_mdio.c | 259 static int hns_mdio_write_c45(struct mii_bus *bus, int phy_id, int devad, in hns_mdio_write_c45() argument 271 phy_id, devad, reg, data); in hns_mdio_write_c45() 284 hns_mdio_cmd_write(mdio_dev, true, MDIO_C45_WRITE_ADDR, phy_id, devad); in hns_mdio_write_c45() 294 cmd_reg_cfg = devad; in hns_mdio_write_c45() 363 static int hns_mdio_read_c45(struct mii_bus *bus, int phy_id, int devad, in hns_mdio_read_c45() argument 374 phy_id, devad, reg); in hns_mdio_read_c45() 387 hns_mdio_cmd_write(mdio_dev, true, MDIO_C45_WRITE_ADDR, phy_id, devad); in hns_mdio_read_c45() 396 hns_mdio_cmd_write(mdio_dev, true, MDIO_C45_READ, phy_id, devad); in hns_mdio_read_c45()
|
/linux-6.3-rc2/include/uapi/linux/ |
A D | mdio.h | 144 #define MDIO_DEVS_PRESENT(devad) (1 << (devad)) argument 416 static inline __u16 mdio_phy_id_c45(int prtad, int devad) in mdio_phy_id_c45() argument 418 return MDIO_PHY_ID_C45 | (prtad << 5) | devad; in mdio_phy_id_c45()
|
/linux-6.3-rc2/drivers/net/dsa/mv88e6xxx/ |
A D | phy.c | 58 int mv88e6xxx_phy_read_c45(struct mv88e6xxx_chip *chip, int phy, int devad, in mv88e6xxx_phy_read_c45() argument 71 return chip->info->ops->phy_read_c45(chip, bus, addr, devad, reg, val); in mv88e6xxx_phy_read_c45() 74 int mv88e6xxx_phy_write_c45(struct mv88e6xxx_chip *chip, int phy, int devad, in mv88e6xxx_phy_write_c45() argument 87 return chip->info->ops->phy_write_c45(chip, bus, addr, devad, reg, val); in mv88e6xxx_phy_write_c45()
|
A D | phy.h | 31 int mv88e6xxx_phy_read_c45(struct mv88e6xxx_chip *chip, int phy, int devad, 33 int mv88e6xxx_phy_write_c45(struct mv88e6xxx_chip *chip, int phy, int devad,
|
A D | global2.c | 743 bool external, int port, int devad, in _mv88e6xxx_g2_smi_phy_read_c45() argument 748 err = mv88e6xxx_g2_smi_phy_write_addr_c45(chip, external, port, devad, in _mv88e6xxx_g2_smi_phy_read_c45() 753 return mv88e6xxx_g2_smi_phy_read_data_c45(chip, external, port, devad, in _mv88e6xxx_g2_smi_phy_read_c45() 773 bool external, int port, int devad, in _mv88e6xxx_g2_smi_phy_write_c45() argument 778 err = mv88e6xxx_g2_smi_phy_write_addr_c45(chip, external, port, devad, in _mv88e6xxx_g2_smi_phy_write_c45() 783 return mv88e6xxx_g2_smi_phy_write_data_c45(chip, external, port, devad, in _mv88e6xxx_g2_smi_phy_write_c45() 799 struct mii_bus *bus, int addr, int devad, in mv88e6xxx_g2_smi_phy_read_c45() argument 805 return _mv88e6xxx_g2_smi_phy_read_c45(chip, external, addr, devad, reg, in mv88e6xxx_g2_smi_phy_read_c45() 821 struct mii_bus *bus, int addr, int devad, in mv88e6xxx_g2_smi_phy_write_c45() argument 827 return _mv88e6xxx_g2_smi_phy_write_c45(chip, external, addr, devad, reg, in mv88e6xxx_g2_smi_phy_write_c45()
|
/linux-6.3-rc2/drivers/net/ethernet/mellanox/mlxbf_gige/ |
A D | mlxbf_gige_mdio.c | 45 .devad = { 77 .devad = { 195 gw_reg |= ((phy_reg << mdio_gw->devad.shift) & in mlxbf_gige_mdio_create_cmd() 196 mdio_gw->devad.mask); in mlxbf_gige_mdio_create_cmd()
|