Re: [PATCH net-next v3 2/2] net: dsa: mt7530: simplify core operations

From: Arınç ÜNAL
Date: Tue Apr 23 2024 - 05:13:08 EST


On 23/04/2024 11:40, Paolo Abeni wrote:
On Thu, 2024-04-18 at 08:35 +0300, Arınç ÜNAL wrote:
/* Select the Function : DATA with no post increment */
ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
- MII_MMD_CTRL, devad | MII_MMD_CTRL_NOINCR);
+ MII_MMD_CTRL, MDIO_MMD_VEND2 | MII_MMD_CTRL_NOINCR);
if (ret < 0)
goto err;

What about a possible follow-up, moving the above writes in a separate
helper (say, 'core_select_register' or the like) and reusing it here
and in core_rmw() ?

There's a possibility where the Clause 45 access method could be used here
which would make this redundant. I will do your suggestion if that won't
work out.


Not blocking this series, I'm applying it.

Cheers.
Arınç