diff options
author | Scott Roberts <ttocsr@gmail.com> | 2019-09-27 14:19:01 -0600 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2019-10-12 23:43:08 +0200 |
commit | d2a1075973728b55231688809b68a0f0b93c9da4 (patch) | |
tree | aa026543b3be26f0e5b71c4596f9e7a4b440e486 /target/linux/mvebu/patches-4.19/533-net-mvneta-Dont-advertise-2.5G-modes.patch | |
parent | e11fc8439c9f7230441408c4d257efc46f372312 (diff) | |
download | upstream-d2a1075973728b55231688809b68a0f0b93c9da4.tar.gz upstream-d2a1075973728b55231688809b68a0f0b93c9da4.tar.bz2 upstream-d2a1075973728b55231688809b68a0f0b93c9da4.zip |
mvebu: backport mvneta and comphy from linux 5.x
These patches backport support for the ARMADA 3700 COMPHY driver.
Also backported is the mvneta driver. This will allow switching
the SGMII speed using SMC calls. To support this you must update
the firmware using Marvells 18.12 version (this has now been
upstreamed). The mvneta driver allows 2500basex and 2500baset.
Signed-off-by: Scott Roberts <ttocsr@gmail.com>
Diffstat (limited to 'target/linux/mvebu/patches-4.19/533-net-mvneta-Dont-advertise-2.5G-modes.patch')
-rw-r--r-- | target/linux/mvebu/patches-4.19/533-net-mvneta-Dont-advertise-2.5G-modes.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-4.19/533-net-mvneta-Dont-advertise-2.5G-modes.patch b/target/linux/mvebu/patches-4.19/533-net-mvneta-Dont-advertise-2.5G-modes.patch new file mode 100644 index 0000000000..31292a638e --- /dev/null +++ b/target/linux/mvebu/patches-4.19/533-net-mvneta-Dont-advertise-2.5G-modes.patch @@ -0,0 +1,55 @@ +From 83e65df6dfece9eb588735459428f221eb930c0c Mon Sep 17 00:00:00 2001 +From: Maxime Chevallier <maxime.chevallier@bootlin.com> +Date: Fri, 9 Nov 2018 09:17:33 +0100 +Subject: [PATCH] net: mvneta: Don't advertise 2.5G modes + +Using 2.5G speed relies on the SerDes lanes being configured +accordingly. The lanes have to be reconfigured to switch between +1G and 2.5G, and for now only the bootloader does this configuration. + +In the case we add a Comphy driver to handle switching the lanes +dynamically, it's better for now to stick with supporting only 1G and +add advertisement for 2.5G once we really are capable of handling both +speeds without problem. + +Since the interface mode is initialy taken from the DT, we want to make +sure that adding comphy support won't break boards that don't update +their dtb. + +Fixes: da58a931f248 ("net: mvneta: Add support for 2500Mbps SGMII") +Reported-by: Andrew Lunn <andrew@lunn.ch> +Reported-by: Russell King <linux@armlinux.org.uk> +Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> +Signed-off-by: David S. Miller <davem@davemloft.net> +--- + drivers/net/ethernet/marvell/mvneta.c | 12 +++--------- + 1 file changed, 3 insertions(+), 9 deletions(-) + +--- a/drivers/net/ethernet/marvell/mvneta.c ++++ b/drivers/net/ethernet/marvell/mvneta.c +@@ -3346,7 +3346,6 @@ static void mvneta_validate(struct net_d + if (state->interface != PHY_INTERFACE_MODE_NA && + state->interface != PHY_INTERFACE_MODE_QSGMII && + state->interface != PHY_INTERFACE_MODE_SGMII && +- state->interface != PHY_INTERFACE_MODE_2500BASEX && + !phy_interface_mode_is_8023z(state->interface) && + !phy_interface_mode_is_rgmii(state->interface)) { + bitmap_zero(supported, __ETHTOOL_LINK_MODE_MASK_NBITS); +@@ -3360,14 +3359,9 @@ static void mvneta_validate(struct net_d + /* Asymmetric pause is unsupported */ + phylink_set(mask, Pause); + +- /* We cannot use 1Gbps when using the 2.5G interface. */ +- if (state->interface == PHY_INTERFACE_MODE_2500BASEX) { +- phylink_set(mask, 2500baseT_Full); +- phylink_set(mask, 2500baseX_Full); +- } else { +- phylink_set(mask, 1000baseT_Full); +- phylink_set(mask, 1000baseX_Full); +- } ++ /* Half-duplex at speeds higher than 100Mbit is unsupported */ ++ phylink_set(mask, 1000baseT_Full); ++ phylink_set(mask, 1000baseX_Full); + + if (!phy_interface_mode_is_8023z(state->interface)) { + /* 10M and 100M are only supported in non-802.3z mode */ |