Re: [PATCH net 1/2] dsa: lan9303: Fix mapping between DSA port number and PHY address

From: Vladimir Oltean
Date: Thu Jul 04 2024 - 13:33:18 EST


On Wed, Jul 03, 2024 at 04:57:17PM +0200, Christian Eggers wrote:
> The 'phy' parameter supplied to lan9303_phy_read/_write was sometimes a
> DSA port number and sometimes a PHY address. This isn't a problem as
> long as they are equal. But if the external phy_addr_sel_strap pin is
> wired to 'high', the PHY addresses change from 0-1-2 to 1-2-3 (CPU,
> slave0, slave1). In this case, lan9303_phy_read/_write must translate
> between DSA port numbers and the corresponding PHY address.
>
> Fixes: a1292595e006 ("net: dsa: add new DSA switch driver for the SMSC-LAN9303")
> Signed-off-by: Christian Eggers <ceggers@xxxxxxx>
> ---

Reviewed-by: Vladimir Oltean <olteanv@xxxxxxxxx>