Re: [PATCH 1/1] net: dsa: rtl8366rb: standardize init jam tables

From: Vladimir Oltean
Date: Tue Jan 26 2021 - 22:35:21 EST


On Tue, Jan 26, 2021 at 11:08:37PM +0200, Vladimir Oltean wrote:
> > and also makes it possible for a single function to handle all of them,
> > removing some duplicated code.

But at least I'll give you that, it is pretty straightforward refactoring.
The register jamming routine for green Ethernet did not check for the
address to start with 0xBE00 before checking RTL8366RB_PHY_ACCESS_BUSY_REG,
because apparently that's pointless, since all register addresses start
with 0xBE00 for the green Ethernet register jamming table. So no
functional changes should be introduced by the patch, and no harm in
checking for those high address bits in order to reuse a common function.

Reviewed-by: Vladimir Oltean <olteanv@xxxxxxxxx>