Re: [PATCH] net: phy: leds: Trigger leds only if PHY speed is known
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
Date: 2021-08-09 14:16:43
On Wed, Aug 04, 2021 at 11:33:10AM +0300, Ivan T. Ivanov wrote:
I have sent new patch[1] which I think is proper fix for this. [1] https://lore.kernel.org/netdev/20210804081339.19909-1-iivanov@suse.de/T/#u
Thanks. I haven't reviewed the driver, but the patch itself LGTM from the point of view that phy_read_status() should definitely only be called with phydev->lock held. I think we also need the "Doing it all yourself" section in Documentation/networking/phy.rst fixed to specify that if you call this function, you must be holding phydev->lock. Lastly, I'm wondering how many other places call phy_read_status() without holding phydev->lock - sounds like something that needs a kernel-wide review, and then possibly we should introduce a lockdep check for this in phy_read_status() to catch any new introductions. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!