[PATCH net-next v2 02/11] net: stmmac: mdio: provide stmmac_mdio_wait()
Andrew Lunn
andrew at lunn.ch
Thu Sep 4 11:56:26 PDT 2025
On Thu, Sep 04, 2025 at 01:11:05PM +0100, Russell King (Oracle) wrote:
> All the readl_poll_timeout()s follow the same pattern - test a register
> for a bit being clear every 100us, and timeout after 10ms returning
> -EBUSY. Wrap this up into a function to avoid duplicating this.
>
> This slightly changes the return value for stmmac_mdio_write() if the
> second readl_poll_timeout() fails - rather than returning -ETIMEDOUT
> we return -EBUSY matching the stmmac_mdio_read() behaviour.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew at lunn.ch>
Andrew
More information about the linux-arm-kernel
mailing list