提交 679e283e 编写于 作者: V Vladimir Oltean 提交者: David S. Miller

net: pcs: xpcs: use mdiobus_c45_addr in xpcs_{read,write}

Use the dedicated helper for abstracting away how the clause 45 address
is packed in reg_addr.
Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 8e2bb956
......@@ -240,14 +240,14 @@ static bool __xpcs_linkmode_supported(const struct xpcs_compat *compat,
static int xpcs_read(struct mdio_xpcs_args *xpcs, int dev, u32 reg)
{
u32 reg_addr = MII_ADDR_C45 | dev << 16 | reg;
u32 reg_addr = mdiobus_c45_addr(dev, reg);
return mdiobus_read(xpcs->bus, xpcs->addr, reg_addr);
}
static int xpcs_write(struct mdio_xpcs_args *xpcs, int dev, u32 reg, u16 val)
{
u32 reg_addr = MII_ADDR_C45 | dev << 16 | reg;
u32 reg_addr = mdiobus_c45_addr(dev, reg);
return mdiobus_write(xpcs->bus, xpcs->addr, reg_addr, val);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册