kernel: bump 4.19 to 4.19.105
[openwrt/openwrt.git] / target / linux / mvebu / patches-4.19 / 533-net-mvneta-Dont-advertise-2.5G-modes.patch
1 From 83e65df6dfece9eb588735459428f221eb930c0c Mon Sep 17 00:00:00 2001
2 From: Maxime Chevallier <maxime.chevallier@bootlin.com>
3 Date: Fri, 9 Nov 2018 09:17:33 +0100
4 Subject: [PATCH] net: mvneta: Don't advertise 2.5G modes
5
6 Using 2.5G speed relies on the SerDes lanes being configured
7 accordingly. The lanes have to be reconfigured to switch between
8 1G and 2.5G, and for now only the bootloader does this configuration.
9
10 In the case we add a Comphy driver to handle switching the lanes
11 dynamically, it's better for now to stick with supporting only 1G and
12 add advertisement for 2.5G once we really are capable of handling both
13 speeds without problem.
14
15 Since the interface mode is initialy taken from the DT, we want to make
16 sure that adding comphy support won't break boards that don't update
17 their dtb.
18
19 Fixes: da58a931f248 ("net: mvneta: Add support for 2500Mbps SGMII")
20 Reported-by: Andrew Lunn <andrew@lunn.ch>
21 Reported-by: Russell King <linux@armlinux.org.uk>
22 Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
23 Signed-off-by: David S. Miller <davem@davemloft.net>
24 ---
25 drivers/net/ethernet/marvell/mvneta.c | 12 +++---------
26 1 file changed, 3 insertions(+), 9 deletions(-)
27
28 --- a/drivers/net/ethernet/marvell/mvneta.c
29 +++ b/drivers/net/ethernet/marvell/mvneta.c
30 @@ -3361,7 +3361,6 @@ static void mvneta_validate(struct net_d
31 if (state->interface != PHY_INTERFACE_MODE_NA &&
32 state->interface != PHY_INTERFACE_MODE_QSGMII &&
33 state->interface != PHY_INTERFACE_MODE_SGMII &&
34 - state->interface != PHY_INTERFACE_MODE_2500BASEX &&
35 !phy_interface_mode_is_8023z(state->interface) &&
36 !phy_interface_mode_is_rgmii(state->interface)) {
37 bitmap_zero(supported, __ETHTOOL_LINK_MODE_MASK_NBITS);
38 @@ -3375,14 +3374,9 @@ static void mvneta_validate(struct net_d
39 /* Asymmetric pause is unsupported */
40 phylink_set(mask, Pause);
41
42 - /* We cannot use 1Gbps when using the 2.5G interface. */
43 - if (state->interface == PHY_INTERFACE_MODE_2500BASEX) {
44 - phylink_set(mask, 2500baseT_Full);
45 - phylink_set(mask, 2500baseX_Full);
46 - } else {
47 - phylink_set(mask, 1000baseT_Full);
48 - phylink_set(mask, 1000baseX_Full);
49 - }
50 + /* Half-duplex at speeds higher than 100Mbit is unsupported */
51 + phylink_set(mask, 1000baseT_Full);
52 + phylink_set(mask, 1000baseX_Full);
53
54 if (!phy_interface_mode_is_8023z(state->interface)) {
55 /* 10M and 100M are only supported in non-802.3z mode */