75a21a931d5e787ef0ab81d1e05f46c2f3361285
[openwrt/staging/neocturne.git] /
1 From 73cbfad9296eed004992806e056db5b48583ca41 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Alexis=20Lothor=C3=A9?= <alexis.lothore@bootlin.com>
3 Date: Mon, 29 May 2023 10:02:42 +0200
4 Subject: [PATCH 2/6] net: dsa: mv88e6xxx: use mv88e6xxx_phy_is_internal in
5 mv88e6xxx_port_ppu_updates
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 Make sure to use existing helper to get internal PHYs count instead of
11 redoing it manually
12
13 Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
14 Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
15 Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
16 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
17 ---
18 drivers/net/dsa/mv88e6xxx/chip.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21 --- a/drivers/net/dsa/mv88e6xxx/chip.c
22 +++ b/drivers/net/dsa/mv88e6xxx/chip.c
23 @@ -484,7 +484,7 @@ static int mv88e6xxx_port_ppu_updates(st
24 * report whether the port is internal.
25 */
26 if (chip->info->family == MV88E6XXX_FAMILY_6250)
27 - return port < chip->info->num_internal_phys;
28 + return mv88e6xxx_phy_is_internal(chip, port);
29
30 err = mv88e6xxx_port_read(chip, port, MV88E6XXX_PORT_STS, &reg);
31 if (err) {