diff options
author | Karel Kočí <cynerd@email.cz> | 2022-10-15 23:01:29 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2022-10-16 13:20:32 +0200 |
commit | 462a088c474832b19ff2730de1e6bea66d399c23 (patch) | |
tree | a512b3b451afde09a9cb06449bd7a3bdc5a8bdb4 /pkgs/patches-linux-5.15/779-v5.16-2-net-mvpp2-remove-interface-checks-in-mvpp2_phylink_v.patch | |
parent | d5514ca4aeddc711639f46024528becfff7c2a70 (diff) | |
download | nixturris-462a088c474832b19ff2730de1e6bea66d399c23.tar.gz nixturris-462a088c474832b19ff2730de1e6bea66d399c23.tar.bz2 nixturris-462a088c474832b19ff2730de1e6bea66d399c23.zip |
Add Turris kernel (includes patches from OpenWrt)
Diffstat (limited to 'pkgs/patches-linux-5.15/779-v5.16-2-net-mvpp2-remove-interface-checks-in-mvpp2_phylink_v.patch')
-rw-r--r-- | pkgs/patches-linux-5.15/779-v5.16-2-net-mvpp2-remove-interface-checks-in-mvpp2_phylink_v.patch | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/patches-linux-5.15/779-v5.16-2-net-mvpp2-remove-interface-checks-in-mvpp2_phylink_v.patch b/pkgs/patches-linux-5.15/779-v5.16-2-net-mvpp2-remove-interface-checks-in-mvpp2_phylink_v.patch new file mode 100644 index 0000000..1ac1b4b --- /dev/null +++ b/pkgs/patches-linux-5.15/779-v5.16-2-net-mvpp2-remove-interface-checks-in-mvpp2_phylink_v.patch @@ -0,0 +1,63 @@ +From 7e6f41d50ea0af9f04c17937c4060ddcafa1bc90 Mon Sep 17 00:00:00 2001 +From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk> +Date: Wed, 27 Oct 2021 10:49:19 +0100 +Subject: [PATCH 2/4] net: mvpp2: remove interface checks in + mvpp2_phylink_validate() + +As phylink checks the interface mode against the supported_interfaces +bitmap, we no longer need to validate the interface mode in the +validation function. Remove this to simplify it. + +Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> +Signed-off-by: David S. Miller <davem@davemloft.net> +--- + .../net/ethernet/marvell/mvpp2/mvpp2_main.c | 33 ++++--------------- + 1 file changed, 7 insertions(+), 26 deletions(-) + +diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +index d765559f7bd0..9ee1b7ef6edf 100644 +--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c ++++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +@@ -6265,32 +6265,13 @@ static void mvpp2_phylink_validate(struct phylink_config *config, + struct mvpp2_port *port = mvpp2_phylink_to_port(config); + __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, }; + +- /* Invalid combinations */ +- switch (state->interface) { +- case PHY_INTERFACE_MODE_10GBASER: +- case PHY_INTERFACE_MODE_XAUI: +- if (!mvpp2_port_supports_xlg(port)) +- goto empty_set; +- break; +- case PHY_INTERFACE_MODE_RGMII: +- case PHY_INTERFACE_MODE_RGMII_ID: +- case PHY_INTERFACE_MODE_RGMII_RXID: +- case PHY_INTERFACE_MODE_RGMII_TXID: +- if (!mvpp2_port_supports_rgmii(port)) +- goto empty_set; +- break; +- case PHY_INTERFACE_MODE_1000BASEX: +- case PHY_INTERFACE_MODE_2500BASEX: +- /* When in 802.3z mode, we must have AN enabled: +- * Bit 2 Field InBandAnEn In-band Auto-Negotiation enable. ... +- * When <PortType> = 1 (1000BASE-X) this field must be set to 1. +- */ +- if (!phylink_test(state->advertising, Autoneg)) +- goto empty_set; +- break; +- default: +- break; +- } ++ /* When in 802.3z mode, we must have AN enabled: ++ * Bit 2 Field InBandAnEn In-band Auto-Negotiation enable. ... ++ * When <PortType> = 1 (1000BASE-X) this field must be set to 1. ++ */ ++ if (phy_interface_mode_is_8023z(state->interface) && ++ !phylink_test(state->advertising, Autoneg)) ++ goto empty_set; + + phylink_set(mask, Autoneg); + phylink_set_port_modes(mask); +-- +2.35.1 + |