1 From eb57941154e2ad142c07d47e874a221328467349 Mon Sep 17 00:00:00 2001
2 From: Ioana Ciornei <ioana.ciornei@nxp.com>
3 Date: Thu, 2 Jun 2022 12:11:11 +0300
4 Subject: [PATCH] net: phylink: treat PHY_INTERFACE_MODE_2500SGMII in
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
10 There is a downstream patch which adds a new interface type -
11 PHY_INTERFACE_MODE_2500SGMII (which is really the same one as
12 PHY_INTERFACE_MODE_2500BASEX).
14 We backported from upstream the following phylink patch which, of
15 course, does not treat the PHY_INTERFACE_MODE_2500SGMII interface mode
16 in a switch case statement.
17 34ae2c09d46a ("net: phylink: add generic validate implementation")
19 Because of this, we get the following build warning.
21 drivers/net/phy/phylink.c: In function ‘phylink_get_linkmodes’:
22 drivers/net/phy/phylink.c:322:2: warning: enumeration value ‘PHY_INTERFACE_MODE_2500SGMII’ not handled in switch [-Wswitch]
23 322 | switch (interface) {
26 Fix it by treating the new interface mode in the switch-case statement.
28 Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
30 drivers/net/phy/phylink.c | 1 +
31 1 file changed, 1 insertion(+)
33 --- a/drivers/net/phy/phylink.c
34 +++ b/drivers/net/phy/phylink.c
35 @@ -487,6 +487,7 @@ unsigned long phylink_get_capabilities(p
38 case PHY_INTERFACE_MODE_2500BASEX:
39 + case PHY_INTERFACE_MODE_2500SGMII: