Home
last modified time | relevance | path

Searched refs:devad (Results 1 – 25 of 25) sorted by relevance

/linux-6.1.9/drivers/net/
Dmdio.c67 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-6.1.9/drivers/net/phy/
Dphy-core.c515 static void mmd_phy_indirect(struct mii_bus *bus, int phy_addr, int devad, in mmd_phy_indirect() argument
519 __mdiobus_write(bus, phy_addr, MII_MMD_CTRL, devad); in mmd_phy_indirect()
526 devad | MII_MMD_CTRL_NOINCR); in mmd_phy_indirect()
538 int __phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum) in __phy_read_mmd() argument
542 if (regnum > (u16)~0 || devad > 32) in __phy_read_mmd()
546 val = phydev->drv->read_mmd(phydev, devad, regnum); in __phy_read_mmd()
549 devad, regnum); in __phy_read_mmd()
554 mmd_phy_indirect(bus, phy_addr, devad, regnum); in __phy_read_mmd()
572 int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum) in phy_read_mmd() argument
577 ret = __phy_read_mmd(phydev, devad, regnum); in phy_read_mmd()
[all …]
Dadin.c179 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()
Dphy.c316 int prtad, devad; in phy_mii_ioctl() local
326 devad = mdio_phy_id_devad(mii_data->phy_id); in phy_mii_ioctl()
328 phydev->mdio.bus, prtad, devad, in phy_mii_ioctl()
340 devad = mdio_phy_id_devad(mii_data->phy_id); in phy_mii_ioctl()
343 devad = mii_data->reg_num; in phy_mii_ioctl()
346 switch (devad) { in phy_mii_ioctl()
384 mdiobus_c45_write(phydev->mdio.bus, prtad, devad, in phy_mii_ioctl()
387 mdiobus_write(phydev->mdio.bus, prtad, devad, val); in phy_mii_ioctl()
390 devad == MII_BMCR && in phy_mii_ioctl()
Dphy-c45.c405 int val, devad; in genphy_c45_read_link() local
423 devad = __ffs(mmd_mask); in genphy_c45_read_link()
424 mmd_mask &= ~BIT(devad); in genphy_c45_read_link()
432 val = phy_read_mmd(phydev, devad, MDIO_STAT1); in genphy_c45_read_link()
439 val = phy_read_mmd(phydev, devad, MDIO_STAT1); in genphy_c45_read_link()
Dphylink.c2555 int prtad, devad; in phylink_phy_read() local
2559 devad = mdio_phy_id_devad(phy_id); in phylink_phy_read()
2560 return mdiobus_c45_read(pl->phydev->mdio.bus, prtad, devad, in phylink_phy_read()
2570 devad = __ffs(phydev->c45_ids.mmds_present); in phylink_phy_read()
2576 devad = MDIO_MMD_AN; in phylink_phy_read()
2586 return mdiobus_c45_read(pl->phydev->mdio.bus, prtad, devad, in phylink_phy_read()
2597 int prtad, devad; in phylink_phy_write() local
2601 devad = mdio_phy_id_devad(phy_id); in phylink_phy_write()
2602 return mdiobus_c45_write(pl->phydev->mdio.bus, prtad, devad, in phylink_phy_write()
2612 devad = __ffs(phydev->c45_ids.mmds_present); in phylink_phy_write()
[all …]
Dphy_device.c698 static int phy_c45_probe_present(struct mii_bus *bus, int prtad, int devad) in phy_c45_probe_present() argument
702 stat2 = mdiobus_c45_read(bus, prtad, devad, MDIO_STAT2); in phy_c45_probe_present()
2615 int genphy_read_mmd_unsupported(struct phy_device *phdev, int devad, u16 regnum) in genphy_read_mmd_unsupported() argument
/linux-6.1.9/drivers/net/ethernet/sfc/falcon/
Dmdio_10g.h22 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()
Dmdio_10g.c313 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()
Dfalcon.c1573 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-6.1.9/include/linux/
Dmdio.h152 int (*mdio_read)(struct net_device *dev, int prtad, int devad,
154 int (*mdio_write)(struct net_device *dev, int prtad, int devad,
168 int prtad, int devad, u16 addr, int mask,
451 static inline u32 mdiobus_c45_addr(int devad, u16 regnum) in mdiobus_c45_addr() argument
453 return MII_ADDR_C45 | devad << MII_DEVADDR_C45_SHIFT | regnum; in mdiobus_c45_addr()
466 static inline int __mdiobus_c45_read(struct mii_bus *bus, int prtad, int devad, in __mdiobus_c45_read() argument
469 return __mdiobus_read(bus, prtad, mdiobus_c45_addr(devad, regnum)); in __mdiobus_c45_read()
472 static inline int __mdiobus_c45_write(struct mii_bus *bus, int prtad, int devad, in __mdiobus_c45_write() argument
475 return __mdiobus_write(bus, prtad, mdiobus_c45_addr(devad, regnum), in __mdiobus_c45_write()
479 static inline int mdiobus_c45_read(struct mii_bus *bus, int prtad, int devad, in mdiobus_c45_read() argument
[all …]
Dphy.h1123 int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum);
1160 int __phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum);
1166 int phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val);
1172 int __phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val);
1181 int __phy_modify_mmd_changed(struct phy_device *phydev, int devad, u32 regnum,
1183 int phy_modify_mmd_changed(struct phy_device *phydev, int devad, u32 regnum,
1185 int __phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum,
1187 int phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum,
1249 static inline int __phy_set_bits_mmd(struct phy_device *phydev, int devad, in __phy_set_bits_mmd() argument
1252 return __phy_modify_mmd(phydev, devad, regnum, 0, val); in __phy_set_bits_mmd()
[all …]
/linux-6.1.9/drivers/net/ethernet/sfc/siena/
Dmcdi_port.c21 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.1.9/drivers/net/ethernet/sfc/
Dmcdi_port.c21 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.1.9/drivers/net/ethernet/hisilicon/
Dhns_mdio.c222 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-6.1.9/include/uapi/linux/
Dmdio.h142 #define MDIO_DEVS_PRESENT(devad) (1 << (devad)) argument
408 static inline __u16 mdio_phy_id_c45(int prtad, int devad) in mdio_phy_id_c45() argument
410 return MDIO_PHY_ID_C45 | (prtad << 5) | devad; in mdio_phy_id_c45()
/linux-6.1.9/drivers/net/ethernet/broadcom/bnx2x/
Dbnx2x_link.h145 u8 devad; member
394 u8 devad, u16 reg, u16 *ret_val);
397 u8 devad, u16 reg, u16 val);
Dbnx2x_link.c2666 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 …]
Dbnx2x_main.c12764 int devad, u16 addr) in bnx2x_mdio_read() argument
12771 prtad, devad, addr); in bnx2x_mdio_read()
12774 devad = (devad == MDIO_DEVAD_NONE) ? DEFAULT_PHY_DEV_ADDR : devad; in bnx2x_mdio_read()
12777 rc = bnx2x_phy_read(&bp->link_params, prtad, devad, addr, &value); in bnx2x_mdio_read()
12787 static int bnx2x_mdio_write(struct net_device *netdev, int prtad, int devad, in bnx2x_mdio_write() argument
12795 prtad, devad, addr, value); in bnx2x_mdio_write()
12798 devad = (devad == MDIO_DEVAD_NONE) ? DEFAULT_PHY_DEV_ADDR : devad; in bnx2x_mdio_write()
12801 rc = bnx2x_phy_write(&bp->link_params, prtad, devad, addr, value); in bnx2x_mdio_write()
/linux-6.1.9/drivers/net/dsa/
Dmt7530.c83 core_read_mmd_indirect(struct mt7530_priv *priv, int prtad, int devad) in core_read_mmd_indirect() argument
89 ret = bus->write(bus, 0, MII_MMD_CTRL, devad); in core_read_mmd_indirect()
99 ret = bus->write(bus, 0, MII_MMD_CTRL, (devad | MII_MMD_CTRL_NOINCR)); in core_read_mmd_indirect()
115 int devad, u32 data) in core_write_mmd_indirect() argument
121 ret = bus->write(bus, 0, MII_MMD_CTRL, devad); in core_write_mmd_indirect()
131 ret = bus->write(bus, 0, MII_MMD_CTRL, (devad | MII_MMD_CTRL_NOINCR)); in core_write_mmd_indirect()
623 mt7531_ind_c45_phy_read(struct mt7530_priv *priv, int port, int devad, in mt7531_ind_c45_phy_read() argument
643 MT7531_MDIO_DEV_ADDR(devad) | regnum; in mt7531_ind_c45_phy_read()
654 MT7531_MDIO_DEV_ADDR(devad); in mt7531_ind_c45_phy_read()
672 mt7531_ind_c45_phy_write(struct mt7530_priv *priv, int port, int devad, in mt7531_ind_c45_phy_write() argument
[all …]
/linux-6.1.9/drivers/net/usb/
Dax88179_178a.c349 u16 devad) in ax88179_phy_mmd_indirect() argument
354 tmp16 = devad; in ax88179_phy_mmd_indirect()
362 tmp16 = devad | MII_MMD_CTRL_NOINCR; in ax88179_phy_mmd_indirect()
370 ax88179_phy_read_mmd_indirect(struct usbnet *dev, u16 prtad, u16 devad) in ax88179_phy_read_mmd_indirect() argument
375 ax88179_phy_mmd_indirect(dev, prtad, devad); in ax88179_phy_read_mmd_indirect()
386 ax88179_phy_write_mmd_indirect(struct usbnet *dev, u16 prtad, u16 devad, in ax88179_phy_write_mmd_indirect() argument
391 ax88179_phy_mmd_indirect(dev, prtad, devad); in ax88179_phy_write_mmd_indirect()
/linux-6.1.9/drivers/net/ethernet/atheros/alx/
Dmain.c1589 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()
/linux-6.1.9/drivers/net/ethernet/intel/ixgbe/
Dixgbe_main.c8929 ixgbe_mdio_read(struct net_device *netdev, int prtad, int devad, u16 addr) in ixgbe_mdio_read() argument
8939 if (devad != MDIO_DEVAD_NONE) in ixgbe_mdio_read()
8940 regnum |= (devad << 16) | MII_ADDR_C45; in ixgbe_mdio_read()
8947 rc = hw->phy.ops.read_reg(hw, addr, devad, &value); in ixgbe_mdio_read()
8953 static int ixgbe_mdio_write(struct net_device *netdev, int prtad, int devad, in ixgbe_mdio_write() argument
8962 if (devad != MDIO_DEVAD_NONE) in ixgbe_mdio_write()
8963 regnum |= (devad << 16) | MII_ADDR_C45; in ixgbe_mdio_write()
8970 return hw->phy.ops.write_reg(hw, addr, devad, value); in ixgbe_mdio_write()
/linux-6.1.9/drivers/net/ethernet/chelsio/cxgb4/
Dcxgb4_main.c3058 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-6.1.9/drivers/net/ethernet/broadcom/
Dtg3.c1233 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()