layerscape: add patches for SFP support on DPAA2 platforms
[openwrt/openwrt.git] / target / linux / layerscape / patches-5.15 / 703-net-dpaa2-mac-add-support-for-more-10G-modes.patch
1 From c314138bd045e050432158ab021160de3ba51c5e Mon Sep 17 00:00:00 2001
2 From: Russell King <rmk+kernel@armlinux.org.uk>
3 Date: Thu, 30 Jan 2020 22:42:38 +0000
4 Subject: [PATCH 2/4] net: dpaa2-mac: add support for more 10G modes
5
6 Phylink documentation says:
7 * Note that the PHY may be able to transform from one connection
8 * technology to another, so, eg, don't clear 1000BaseX just
9 * because the MAC is unable to BaseX mode. This is more about
10 * clearing unsupported speeds and duplex settings. The port modes
11 * should not be cleared; phylink_set_port_modes() will help with this.
12
13 So add the missing 10G modes.
14
15 Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
16 ---
17 drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 6 ++++++
18 1 file changed, 6 insertions(+)
19
20 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
21 +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
22 @@ -140,6 +140,12 @@ static void dpaa2_mac_validate(struct ph
23 case PHY_INTERFACE_MODE_10GBASER:
24 case PHY_INTERFACE_MODE_USXGMII:
25 phylink_set(mask, 10000baseT_Full);
26 + phylink_set(mask, 10000baseKR_Full);
27 + phylink_set(mask, 10000baseCR_Full);
28 + phylink_set(mask, 10000baseSR_Full);
29 + phylink_set(mask, 10000baseLR_Full);
30 + phylink_set(mask, 10000baseLRM_Full);
31 + phylink_set(mask, 10000baseER_Full);
32 if (state->interface == PHY_INTERFACE_MODE_10GBASER)
33 break;
34 phylink_set(mask, 5000baseT_Full);