summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexis Lothoré <alexis.lothore@bootlin.com>2023-05-29 10:02:42 +0200
committerJakub Kicinski <kuba@kernel.org>2023-05-31 08:54:33 +0200
commit7a2dd00be869f0bcdcb13f4272913ba7371ab583 (patch)
treef1dec8e6b90cff162d56df8a4229572f8fd0be48
parentnet: dsa: mv88e6xxx: pass directly chip structure to mv88e6xxx_phy_is_internal (diff)
downloadlinux-7a2dd00be869f0bcdcb13f4272913ba7371ab583.tar.xz
linux-7a2dd00be869f0bcdcb13f4272913ba7371ab583.zip
net: dsa: mv88e6xxx: use mv88e6xxx_phy_is_internal in mv88e6xxx_port_ppu_updates
Make sure to use existing helper to get internal PHYs count instead of redoing it manually Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--drivers/net/dsa/mv88e6xxx/chip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index e6f6c062cf77..1b5a05f118b4 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -477,7 +477,7 @@ static int mv88e6xxx_port_ppu_updates(struct mv88e6xxx_chip *chip, int port)
* report whether the port is internal.
*/
if (chip->info->family == MV88E6XXX_FAMILY_6250)
- return port < chip->info->num_internal_phys;
+ return mv88e6xxx_phy_is_internal(chip, port);
err = mv88e6xxx_port_read(chip, port, MV88E6XXX_PORT_STS, &reg);
if (err) {