net: dsa: mv88e6xxx: fix mdio bus' phy_mask member
authorMarek Behún <kabel@kernel.org>
Sun, 19 Mar 2023 14:02:38 +0000 (15:02 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 21 Mar 2023 11:52:04 +0000 (12:52 +0100)
commita4926c2943dd17f84b552ba6fb754df0dc6a2fa8
tree195bf28fdb838698b10f1db3a21eb70dd0b06d82
parenta08df15eab0c572bc1d98c2392bcfcd744f26eda
net: dsa: mv88e6xxx: fix mdio bus' phy_mask member

Commit 2c7e46edbd03 ("net: dsa: mv88e6xxx: mask apparently non-existing
phys during probing") added non-trivial bus->phy_mask in
mv88e6xxx_mdio_register() in order to avoid excessive mdio bus
transactions during probing.

But the mask is incorrect for switches with non-zero phy_base_addr (such
as 88E6341).

Fix this.

Fixes: 2c7e46edbd03 ("net: dsa: mv88e6xxx: mask apparently non-existing phys during probing")
Signed-off-by: Marek Behún <kabel@kernel.org>
Tested-by: Klaus Kudielka <klaus.kudielka@gmail.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://lore.kernel.org/r/20230319140238.9470-1-kabel@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/dsa/mv88e6xxx/chip.c