mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
kirkwood: import patch to fix build and refresh patches
kirkwood build broke due to missing include needed for ETH_ALEN. Add patch (sent upstream as well) to address that. Refresh patches for 5.4 and 5.10. Fixes: #9154, #9155 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
parent
7a7f9d647d
commit
065be5b18a
@ -1,27 +0,0 @@
|
||||
From c94b2cfd25c282e2974accc1b07da98ae7139b47 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Fri, 23 Jul 2021 12:14:33 +0200
|
||||
Subject: [PATCH 1/2] drivers: net: mediatek: register of_platform for every
|
||||
port
|
||||
|
||||
Currently the nvmem framework require the devicenode to be registred on
|
||||
the of_platform or of_get_mac_address fail to get the macaddress if
|
||||
defined using an nvmem cell. Fix this by registrering these special node
|
||||
so they can be found by of_find_device_by_node.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
---
|
||||
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -3005,6 +3005,8 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||
eth->netdev[id]->dev.of_node = np;
|
||||
|
||||
eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH - MTK_RX_ETH_HLEN;
|
||||
+
|
||||
+ of_platform_device_create(np, NULL, NULL);
|
||||
|
||||
return 0;
|
||||
|
@ -1,35 +0,0 @@
|
||||
From 8bab551f44204fc5d43977063cd704112c17c750 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Fri, 23 Jul 2021 12:17:27 +0200
|
||||
Subject: [PATCH 2/2] dsa: register every port with of_platform
|
||||
|
||||
The declaration of a different mac-addr using the nvmem framework is
|
||||
currently broken. The dsa code use the generic of_get_mac_address where
|
||||
the nvmem function require the device node to be registred in the
|
||||
of_platform to be found by of_find_device_by_node. Register every port
|
||||
in the of_platform so they can corrently found and a custom mac-addr can
|
||||
correctly be declared using a nvmem-cell declared in the dts.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
---
|
||||
net/dsa/dsa2.c | 2 +
|
||||
1 file changed, 2 insertion(+)
|
||||
|
||||
--- a/net/dsa/dsa2.c
|
||||
+++ b/net/dsa/dsa2.c
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <linux/rtnetlink.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_net.h>
|
||||
+#include <linux/of_platform.h>
|
||||
#include <net/devlink.h>
|
||||
|
||||
#include "dsa_priv.h"
|
||||
@@ -288,6 +289,7 @@ static int dsa_port_setup(struct dsa_por
|
||||
|
||||
break;
|
||||
case DSA_PORT_TYPE_USER:
|
||||
+ of_platform_device_create(dp->dn, NULL, NULL);
|
||||
dp->mac = of_get_mac_address(dp->dn);
|
||||
err = dsa_slave_create(dp);
|
||||
if (err)
|
@ -0,0 +1,61 @@
|
||||
From patchwork Thu Aug 5 22:23:30 2021
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Daniel Golle <daniel@makrotopia.org>
|
||||
X-Patchwork-Id: 12422209
|
||||
Date: Thu, 5 Aug 2021 23:23:30 +0100
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
To: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org
|
||||
Cc: "David S. Miller" <davem@davemloft.net>, Andrew Lunn <andrew@lunn.ch>,
|
||||
Michael Walle <michael@walle.cc>
|
||||
Subject: [PATCH] ARM: kirkwood: add missing <linux/if_ether.h> for ETH_ALEN
|
||||
Message-ID: <YQxk4jrbm31NM1US@makrotopia.org>
|
||||
MIME-Version: 1.0
|
||||
Content-Disposition: inline
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.34
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
|
||||
After commit 83216e3988cd1 ("of: net: pass the dst buffer to
|
||||
of_get_mac_address()") build fails for kirkwood as ETH_ALEN is not
|
||||
defined.
|
||||
|
||||
arch/arm/mach-mvebu/kirkwood.c: In function 'kirkwood_dt_eth_fixup':
|
||||
arch/arm/mach-mvebu/kirkwood.c:87:13: error: 'ETH_ALEN' undeclared (first use in this function); did you mean 'ESTALE'?
|
||||
u8 tmpmac[ETH_ALEN];
|
||||
^~~~~~~~
|
||||
ESTALE
|
||||
arch/arm/mach-mvebu/kirkwood.c:87:13: note: each undeclared identifier is reported only once for each function it appears in
|
||||
arch/arm/mach-mvebu/kirkwood.c:87:6: warning: unused variable 'tmpmac' [-Wunused-variable]
|
||||
u8 tmpmac[ETH_ALEN];
|
||||
^~~~~~
|
||||
make[5]: *** [scripts/Makefile.build:262: arch/arm/mach-mvebu/kirkwood.o] Error 1
|
||||
make[5]: *** Waiting for unfinished jobs....
|
||||
|
||||
Add missing #include <linux/if_ether.h> to fix this.
|
||||
|
||||
Cc: David S. Miller <davem@davemloft.net>
|
||||
Cc: Andrew Lunn <andrew@lunn.ch>
|
||||
Cc: Michael Walle <michael@walle.cc>
|
||||
Reported-by: https://buildbot.openwrt.org/master/images/#/builders/56/builds/220/steps/44/logs/stdio
|
||||
Fixes: 83216e3988cd1 ("of: net: pass the dst buffer to of_get_mac_address()")
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
---
|
||||
arch/arm/mach-mvebu/kirkwood.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/arch/arm/mach-mvebu/kirkwood.c
|
||||
+++ b/arch/arm/mach-mvebu/kirkwood.c
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/mbus.h>
|
||||
+#include <linux/if_ether.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_net.h>
|
@ -0,0 +1,61 @@
|
||||
From patchwork Thu Aug 5 22:23:30 2021
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Daniel Golle <daniel@makrotopia.org>
|
||||
X-Patchwork-Id: 12422209
|
||||
Date: Thu, 5 Aug 2021 23:23:30 +0100
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
To: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org
|
||||
Cc: "David S. Miller" <davem@davemloft.net>, Andrew Lunn <andrew@lunn.ch>,
|
||||
Michael Walle <michael@walle.cc>
|
||||
Subject: [PATCH] ARM: kirkwood: add missing <linux/if_ether.h> for ETH_ALEN
|
||||
Message-ID: <YQxk4jrbm31NM1US@makrotopia.org>
|
||||
MIME-Version: 1.0
|
||||
Content-Disposition: inline
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.34
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
|
||||
After commit 83216e3988cd1 ("of: net: pass the dst buffer to
|
||||
of_get_mac_address()") build fails for kirkwood as ETH_ALEN is not
|
||||
defined.
|
||||
|
||||
arch/arm/mach-mvebu/kirkwood.c: In function 'kirkwood_dt_eth_fixup':
|
||||
arch/arm/mach-mvebu/kirkwood.c:87:13: error: 'ETH_ALEN' undeclared (first use in this function); did you mean 'ESTALE'?
|
||||
u8 tmpmac[ETH_ALEN];
|
||||
^~~~~~~~
|
||||
ESTALE
|
||||
arch/arm/mach-mvebu/kirkwood.c:87:13: note: each undeclared identifier is reported only once for each function it appears in
|
||||
arch/arm/mach-mvebu/kirkwood.c:87:6: warning: unused variable 'tmpmac' [-Wunused-variable]
|
||||
u8 tmpmac[ETH_ALEN];
|
||||
^~~~~~
|
||||
make[5]: *** [scripts/Makefile.build:262: arch/arm/mach-mvebu/kirkwood.o] Error 1
|
||||
make[5]: *** Waiting for unfinished jobs....
|
||||
|
||||
Add missing #include <linux/if_ether.h> to fix this.
|
||||
|
||||
Cc: David S. Miller <davem@davemloft.net>
|
||||
Cc: Andrew Lunn <andrew@lunn.ch>
|
||||
Cc: Michael Walle <michael@walle.cc>
|
||||
Reported-by: https://buildbot.openwrt.org/master/images/#/builders/56/builds/220/steps/44/logs/stdio
|
||||
Fixes: 83216e3988cd1 ("of: net: pass the dst buffer to of_get_mac_address()")
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
---
|
||||
arch/arm/mach-mvebu/kirkwood.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/arch/arm/mach-mvebu/kirkwood.c
|
||||
+++ b/arch/arm/mach-mvebu/kirkwood.c
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/mbus.h>
|
||||
+#include <linux/if_ether.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_net.h>
|
Loading…
Reference in New Issue
Block a user