/linux/drivers/net/phy/ |
A D | phy-core.c | 457 devad | MII_MMD_CTRL_NOINCR); in mmd_phy_indirect() 473 if (regnum > (u16)~0 || devad > 32) in __phy_read_mmd() 480 devad, regnum); in __phy_read_mmd() 485 mmd_phy_indirect(bus, phy_addr, devad, regnum); in __phy_read_mmd() 508 ret = __phy_read_mmd(phydev, devad, regnum); in phy_read_mmd() 529 if (regnum > (u16)~0 || devad > 32) in __phy_write_mmd() 536 devad, regnum, val); in __phy_write_mmd() 541 mmd_phy_indirect(bus, phy_addr, devad, regnum); in __phy_write_mmd() 567 ret = __phy_write_mmd(phydev, devad, regnum, val); in phy_write_mmd() 661 ret = __phy_read_mmd(phydev, devad, regnum); in __phy_modify_mmd_changed() [all …]
|
A 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()
|
A D | phy.c | 287 int prtad, devad; in phy_mii_ioctl() local 297 devad = mdio_phy_id_devad(mii_data->phy_id); in phy_mii_ioctl() 298 devad = mdiobus_c45_addr(devad, mii_data->reg_num); in phy_mii_ioctl() 301 devad = mii_data->reg_num; in phy_mii_ioctl() 304 devad); in phy_mii_ioctl() 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 switch (devad) { in phy_mii_ioctl() 354 mdiobus_write(phydev->mdio.bus, prtad, devad, val); in phy_mii_ioctl() [all …]
|
A 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()
|
A D | phylink.c | 1979 int prtad, devad; in phylink_phy_read() local 1983 devad = mdio_phy_id_devad(phy_id); in phylink_phy_read() 1984 devad = mdiobus_c45_addr(devad, reg); in phylink_phy_read() 1997 devad = MDIO_MMD_AN; in phylink_phy_read() 2007 devad = mdiobus_c45_addr(devad, reg); in phylink_phy_read() 2010 devad = reg; in phylink_phy_read() 2019 int prtad, devad; in phylink_phy_write() local 2024 devad = mdiobus_c45_addr(devad, reg); in phylink_phy_write() 2037 devad = MDIO_MMD_AN; in phylink_phy_write() 2047 devad = mdiobus_c45_addr(devad, reg); in phylink_phy_write() [all …]
|
A D | phy_device.c | 663 static int phy_c45_probe_present(struct mii_bus *bus, int prtad, int devad) in phy_c45_probe_present() argument 667 stat2 = mdiobus_c45_read(bus, prtad, devad, MDIO_STAT2); in phy_c45_probe_present() 2587 int genphy_read_mmd_unsupported(struct phy_device *phdev, int devad, u16 regnum) in genphy_read_mmd_unsupported() argument
|
/linux/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/include/linux/ |
A D | mdio.h | 150 int (*mdio_read)(struct net_device *dev, int prtad, int devad, 152 int (*mdio_write)(struct net_device *dev, int prtad, int devad, 166 int prtad, int devad, u16 addr, int mask, 379 static inline u32 mdiobus_c45_addr(int devad, u16 regnum) in mdiobus_c45_addr() argument 381 return MII_ADDR_C45 | devad << MII_DEVADDR_C45_SHIFT | regnum; in mdiobus_c45_addr() 387 return __mdiobus_read(bus, prtad, mdiobus_c45_addr(devad, regnum)); in __mdiobus_c45_read() 393 return __mdiobus_write(bus, prtad, mdiobus_c45_addr(devad, regnum), in __mdiobus_c45_write() 397 static inline int mdiobus_c45_read(struct mii_bus *bus, int prtad, int devad, in mdiobus_c45_read() argument 400 return mdiobus_read(bus, prtad, mdiobus_c45_addr(devad, regnum)); in mdiobus_c45_read() 403 static inline int mdiobus_c45_write(struct mii_bus *bus, int prtad, int devad, in mdiobus_c45_write() argument [all …]
|
A D | phy.h | 1080 int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum); 1117 int __phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum); 1142 int __phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum, 1144 int phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum, 1206 static inline int __phy_set_bits_mmd(struct phy_device *phydev, int devad, in __phy_set_bits_mmd() argument 1209 return __phy_modify_mmd(phydev, devad, regnum, 0, val); in __phy_set_bits_mmd() 1225 return __phy_modify_mmd(phydev, devad, regnum, val, 0); in __phy_clear_bits_mmd() 1236 static inline int phy_set_bits_mmd(struct phy_device *phydev, int devad, in phy_set_bits_mmd() argument 1239 return phy_modify_mmd(phydev, devad, regnum, 0, val); in phy_set_bits_mmd() 1253 return phy_modify_mmd(phydev, devad, regnum, val, 0); in phy_clear_bits_mmd() [all …]
|
/linux/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()
|
A 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()
|
A 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/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/drivers/net/ethernet/hisilicon/ |
A 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()
|
/linux/include/uapi/linux/ |
A D | mdio.h | 129 #define MDIO_DEVS_PRESENT(devad) (1 << (devad)) argument 333 static inline __u16 mdio_phy_id_c45(int prtad, int devad) in mdio_phy_id_c45() argument 335 return MDIO_PHY_ID_C45 | (prtad << 5) | devad; in mdio_phy_id_c45()
|
/linux/drivers/net/ethernet/broadcom/bnx2x/ |
A D | bnx2x_link.h | 145 u8 devad; member 394 u8 devad, u16 reg, u16 *ret_val); 397 u8 devad, u16 reg, u16 val);
|
A D | bnx2x_link.c | 2666 u8 devad, u16 reg, u16 *ret_val) in bnx2x_cl45_read() argument 2703 val = ((phy->addr << 21) | (devad << 16) | in bnx2x_cl45_read() 2741 u8 devad, u16 reg, u16 val) in bnx2x_cl45_write() argument 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() 3181 u8 devad, u16 reg, u16 and_val) in bnx2x_cl45_read_and_write() argument 3184 bnx2x_cl45_read(bp, phy, devad, reg, &val); in bnx2x_cl45_read_and_write() 3189 u8 devad, u16 reg, u16 *ret_val) in bnx2x_phy_read() argument 3198 ¶ms->phy[phy_index], devad, in bnx2x_phy_read() 3206 u8 devad, u16 reg, u16 val) in bnx2x_phy_write() argument [all …]
|
A D | bnx2x_main.c | 12753 int devad, u16 addr) in bnx2x_mdio_read() argument 12760 prtad, devad, addr); in bnx2x_mdio_read() 12763 devad = (devad == MDIO_DEVAD_NONE) ? DEFAULT_PHY_DEV_ADDR : devad; in bnx2x_mdio_read() 12766 rc = bnx2x_phy_read(&bp->link_params, prtad, devad, addr, &value); in bnx2x_mdio_read() 12776 static int bnx2x_mdio_write(struct net_device *netdev, int prtad, int devad, in bnx2x_mdio_write() argument 12784 prtad, devad, addr, value); in bnx2x_mdio_write() 12787 devad = (devad == MDIO_DEVAD_NONE) ? DEFAULT_PHY_DEV_ADDR : devad; in bnx2x_mdio_write() 12790 rc = bnx2x_phy_write(&bp->link_params, prtad, devad, addr, value); in bnx2x_mdio_write()
|
/linux/drivers/net/dsa/ |
A D | mt7530.c | 84 ret = bus->write(bus, 0, MII_MMD_CTRL, devad); 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() 635 MT7531_MDIO_DEV_ADDR(devad) | regnum; in mt7531_ind_c45_phy_read() 646 MT7531_MDIO_DEV_ADDR(devad); in mt7531_ind_c45_phy_read() 684 MT7531_MDIO_DEV_ADDR(devad) | regnum; in mt7531_ind_c45_phy_write() 695 MT7531_MDIO_DEV_ADDR(devad) | data; in mt7531_ind_c45_phy_write() 790 int devad; in mt7531_ind_phy_read() local 794 devad = (regnum >> MII_DEVADDR_C45_SHIFT) & 0x1f; in mt7531_ind_phy_read() 795 ret = mt7531_ind_c45_phy_read(priv, port, devad, in mt7531_ind_phy_read() [all …]
|
/linux/drivers/net/usb/ |
A D | ax88179_178a.c | 372 u16 devad) in ax88179_phy_mmd_indirect() argument 377 tmp16 = devad; in ax88179_phy_mmd_indirect() 385 tmp16 = devad | MII_MMD_CTRL_NOINCR; in ax88179_phy_mmd_indirect() 393 ax88179_phy_read_mmd_indirect(struct usbnet *dev, u16 prtad, u16 devad) in ax88179_phy_read_mmd_indirect() argument 398 ax88179_phy_mmd_indirect(dev, prtad, devad); in ax88179_phy_read_mmd_indirect() 409 ax88179_phy_write_mmd_indirect(struct usbnet *dev, u16 prtad, u16 devad, in ax88179_phy_write_mmd_indirect() argument 414 ax88179_phy_mmd_indirect(dev, prtad, devad); in ax88179_phy_write_mmd_indirect()
|
/linux/drivers/net/ethernet/atheros/alx/ |
A D | main.c | 1586 int prtad, int devad, u16 addr) in alx_mdio_read() argument 1596 if (devad == MDIO_DEVAD_NONE) in alx_mdio_read() 1599 err = alx_read_phy_ext(hw, devad, addr, &val); in alx_mdio_read() 1607 int prtad, int devad, u16 addr, u16 val) in alx_mdio_write() argument 1615 if (devad == MDIO_DEVAD_NONE) in alx_mdio_write() 1618 return alx_write_phy_ext(hw, devad, addr, val); in alx_mdio_write()
|
/linux/drivers/net/ethernet/intel/ixgbe/ |
A D | ixgbe_main.c | 8808 ixgbe_mdio_read(struct net_device *netdev, int prtad, int devad, u16 addr) in ixgbe_mdio_read() argument 8818 if (devad != MDIO_DEVAD_NONE) in ixgbe_mdio_read() 8819 regnum |= (devad << 16) | MII_ADDR_C45; in ixgbe_mdio_read() 8826 rc = hw->phy.ops.read_reg(hw, addr, devad, &value); in ixgbe_mdio_read() 8832 static int ixgbe_mdio_write(struct net_device *netdev, int prtad, int devad, in ixgbe_mdio_write() argument 8841 if (devad != MDIO_DEVAD_NONE) in ixgbe_mdio_write() 8842 regnum |= (devad << 16) | MII_ADDR_C45; in ixgbe_mdio_write() 8849 return hw->phy.ops.write_reg(hw, addr, devad, value); in ixgbe_mdio_write()
|
/linux/drivers/net/ethernet/chelsio/cxgb4/ |
A 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()
|
/linux/drivers/net/ethernet/broadcom/ |
A D | tg3.c | 1233 static int tg3_phy_cl45_write(struct tg3 *tp, u32 devad, u32 addr, u32 val) in tg3_phy_cl45_write() argument 1237 err = tg3_writephy(tp, MII_TG3_MMD_CTRL, devad); in tg3_phy_cl45_write() 1246 MII_TG3_MMD_CTRL_DATA_NOINC | devad); in tg3_phy_cl45_write() 1256 static int tg3_phy_cl45_read(struct tg3 *tp, u32 devad, u32 addr, u32 *val) in tg3_phy_cl45_read() argument 1260 err = tg3_writephy(tp, MII_TG3_MMD_CTRL, devad); in tg3_phy_cl45_read() 1269 MII_TG3_MMD_CTRL_DATA_NOINC | devad); in tg3_phy_cl45_read()
|