]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
net: dsa: lantiq_gswip: Only allow phy-mode = "internal" on the CPU port
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Tue, 11 Jun 2024 13:54:24 +0000 (15:54 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 14 Jun 2024 00:07:10 +0000 (17:07 -0700)
Add the CPU port to gswip_xrx200_phylink_get_caps() and
gswip_xrx300_phylink_get_caps(). It connects through a SoC-internal bus,
so the only allowed phy-mode is PHY_INTERFACE_MODE_INTERNAL.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Link: https://lore.kernel.org/r/20240611135434.3180973-3-ms@dev.tdt.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/lantiq_gswip.c

index a557049e34f51545200b7120100f00df11282e32..b9c7076ce32f2061cfd2e1cc03d9579fbbb79689 100644 (file)
@@ -1516,6 +1516,7 @@ static void gswip_xrx200_phylink_get_caps(struct dsa_switch *ds, int port,
        case 2:
        case 3:
        case 4:
+       case 6:
                __set_bit(PHY_INTERFACE_MODE_INTERNAL,
                          config->supported_interfaces);
                break;
@@ -1547,6 +1548,7 @@ static void gswip_xrx300_phylink_get_caps(struct dsa_switch *ds, int port,
        case 2:
        case 3:
        case 4:
+       case 6:
                __set_bit(PHY_INTERFACE_MODE_INTERNAL,
                          config->supported_interfaces);
                break;