Subject: Re: [PATCH net-next v5 09/23] net: phy: start using genphy_c45_ethtool_get/set_eee()

From: Andrew Lunn <[email-masked]>
Date: Tue, 7 Feb 2023 02:05:44 +0100

On Mon, Feb 06, 2023 at 02:50:36PM +0100, Oleksij Rempel wrote:
> All preparations are done. Now we can start using new functions and remove
> the old code.
> 
> Signed-off-by: Oleksij Rempel <[email-masked]>

This change looks correct, in that it just replaces code with other
equivalent code.

But looking at it, i started to wonder about locking. I don't see
phydev->lock held anywhere. But it does access members of phydev, in
particular speed and duplex. If the PHY state machine is running at
the same time, and phy_read_status() is called, those members can
contain invalid information.

So i think another patch is needed to add locking to these two
functions.

Otherwise:

Reviewed-by: Andrew Lunn <[email-masked]>

    Andrew