mediatek: Add support for Xiaomi Redmi Router AX6S
[openwrt/staging/chunkeey.git] / target / linux / layerscape / patches-5.4 / 701-net-0403-net-dsa-felix-Don-t-error-out-on-disabled-ports-with.patch
1 From 921af144d0022ae6036024ae4981e774711949a7 Mon Sep 17 00:00:00 2001
2 From: Vladimir Oltean <vladimir.oltean@nxp.com>
3 Date: Thu, 16 Jan 2020 20:41:53 +0200
4 Subject: [PATCH] net: dsa: felix: Don't error out on disabled ports with no
5 phy-mode
6
7 The felix_parse_ports_node function was tested only on device trees
8 where all ports were enabled. Fix this check so that the driver
9 continues to probe only with the ports where status is not "disabled",
10 as expected.
11
12 Fixes: bdeced75b13f ("net: dsa: felix: Add PCS operations for PHYLINK")
13 Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
14 Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
15 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
16 Signed-off-by: David S. Miller <davem@davemloft.net>
17 ---
18 drivers/net/dsa/ocelot/felix.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21 --- a/drivers/net/dsa/ocelot/felix.c
22 +++ b/drivers/net/dsa/ocelot/felix.c
23 @@ -372,7 +372,7 @@ static int felix_parse_ports_node(struct
24 struct device *dev = felix->ocelot.dev;
25 struct device_node *child;
26
27 - for_each_child_of_node(ports_node, child) {
28 + for_each_available_child_of_node(ports_node, child) {
29 phy_interface_t phy_mode;
30 u32 port;
31 int err;