Re: [net-next PATCH 3/3] net: phy: add support for PHY package MMD read/write

From: Andrew Lunn
Date: Sun Nov 26 2023 - 13:19:34 EST


On Sun, Nov 26, 2023 at 01:37:48AM +0100, Christian Marangi wrote:
> Some PHY in PHY package may require to read/write MMD regs to correctly
> configure the PHY package.
>
> Add support for these additional required function in both lock and no
> lock variant.

You are assuming the PHY only supports C45 over C22. But what about
those PHYs which have native C45? And maybe don't have C22 at all?

You should refactor the code of __phy_read_mmd() into a helper and use
it here.

Andrew