kernel: bump 4.14 to 4.14.105
[openwrt/openwrt.git] / target / linux / sunxi / patches-4.14 / 004-net-stmmac-dwmac-sun8i-fix-allwinner-leds-active-low.patch
1 From 1c08ac0c4bd8e9d66c4dde29bc496c3b430dd028 Mon Sep 17 00:00:00 2001
2 From: Corentin Labbe <clabbe.montjoie@gmail.com>
3 Date: Tue, 28 Nov 2017 17:48:22 +0100
4 Subject: net: stmmac: dwmac-sun8i: fix allwinner,leds-active-low handling
5
6 The driver expect "allwinner,leds-active-low" to be in PHY node, but
7 the binding doc expect it to be in MAC node.
8
9 Since all board DT use it also in MAC node, the driver need to search
10 allwinner,leds-active-low in MAC node.
11
12 Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
13 Signed-off-by: David S. Miller <davem@davemloft.net>
14 ---
15 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 3 +--
16 1 file changed, 1 insertion(+), 2 deletions(-)
17
18 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
19 +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
20 @@ -809,8 +809,7 @@ static int sun8i_dwmac_set_syscon(struct
21 val, reg);
22
23 if (gmac->variant->soc_has_internal_phy) {
24 - if (of_property_read_bool(priv->plat->phy_node,
25 - "allwinner,leds-active-low"))
26 + if (of_property_read_bool(node, "allwinner,leds-active-low"))
27 reg |= H3_EPHY_LED_POL;
28 else
29 reg &= ~H3_EPHY_LED_POL;