Re: [PATCH net-next 6/6] net: phy: added ethtool master-slave configuration support

From: Andrew Lunn
Date: Fri Mar 04 2022 - 08:51:32 EST


> > It looks like you can just call genphy_read_master_slave()? Or am i
> > missing some subtle difference?
>
> Thanks for the comment.
>
> genphy_read_master_slave() and genphy_setup_master_slave() functions
> first check for whether phy is gigabit capable. If no, it returns.
> LAN87XX is not gigabit capable, so I replicated the genphy function and
> removed only the gigabit capable check. I took nxp-tja11xx code as
> reference, which has similar implementation.

O.K, please refactor genphy_read_master_slave() and split it into two.
You can then call the inner function which does not perform the speed
check. Maybe you can also change nxp-tja11xx in the same way.

Andrew