Re: [PATCH net-next] net: phy: realtek: make sure paged read is protected by mutex
From: Andrew Lunn
Date: Fri Oct 04 2024 - 17:26:57 EST
On Fri, Oct 04, 2024 at 04:52:04PM +0100, Daniel Golle wrote:
> As we cannot rely on phy_read_paged function before the PHY is
> identified, the paged read in rtlgen_supports_2_5gbps needs to be open
> coded as it is being called by the match_phy_device function, ie. before
> .read_page and .write_page have been populated.
>
> Make sure it is also protected by the MDIO bus mutex and use
> rtl821x_write_page instead of 3 individually locked MDIO bus operations.
match_phy_device() as far as i know, is only used during bus probe,
when trying to match a driver to a device. What are you trying to lock
against during probe?
Andrew