[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YGiB88Z7zc2h+e6u@lunn.ch>
Date: Sat, 3 Apr 2021 16:55:47 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Russell King <linux@...linux.org.uk>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mips@...r.kernel.org
Subject: Re: [PATCH net-next v1 3/9] net: dsa: qca: ar9331: reorder MDIO
write sequence
Hi Oleksij
Maybe add a short comment about why the order is important.
> - ret = __ar9331_mdio_write(sbus, AR9331_SW_MDIO_PHY_MODE_REG, reg, val);
> + ret = __ar9331_mdio_write(sbus, AR9331_SW_MDIO_PHY_MODE_REG, reg + 2,
> + val >> 16);
> if (ret < 0)
> goto error;
>
> - ret = __ar9331_mdio_write(sbus, AR9331_SW_MDIO_PHY_MODE_REG, reg + 2,
> - val >> 16);
> + ret = __ar9331_mdio_write(sbus, AR9331_SW_MDIO_PHY_MODE_REG, reg, val);
> if (ret < 0)
> goto error;
>
> return 0;
> +
> error:
> dev_err_ratelimited(&sbus->dev, "Bus error. Failed to write register.\n");
> return ret;
With that:
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Andrew
> --
> 2.29.2
>
Powered by blists - more mailing lists