From 065be5b18aae060787e82d34739f1ef912266be3 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 5 Aug 2021 23:40:21 +0100 Subject: [PATCH] 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 --- ...atek-register-of_platform-for-every-.patch | 27 -------- ...register-every-port-with-of_platform.patch | 35 ----------- ...-missing-linux-if_ether.h-for-ETH_AL.patch | 61 +++++++++++++++++++ ...-missing-linux-if_ether.h-for-ETH_AL.patch | 61 +++++++++++++++++++ 4 files changed, 122 insertions(+), 62 deletions(-) delete mode 100644 target/linux/generic/hack-5.10/780-drivers-net-mediatek-register-of_platform-for-every-.patch delete mode 100644 target/linux/generic/hack-5.10/781-dsa-register-every-port-with-of_platform.patch create mode 100644 target/linux/generic/pending-5.10/780-ARM-kirkwood-add-missing-linux-if_ether.h-for-ETH_AL.patch create mode 100644 target/linux/generic/pending-5.4/780-ARM-kirkwood-add-missing-linux-if_ether.h-for-ETH_AL.patch diff --git a/target/linux/generic/hack-5.10/780-drivers-net-mediatek-register-of_platform-for-every-.patch b/target/linux/generic/hack-5.10/780-drivers-net-mediatek-register-of_platform-for-every-.patch deleted file mode 100644 index fa80b0e5f..000000000 --- a/target/linux/generic/hack-5.10/780-drivers-net-mediatek-register-of_platform-for-every-.patch +++ /dev/null @@ -1,27 +0,0 @@ -From c94b2cfd25c282e2974accc1b07da98ae7139b47 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -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 ---- - 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; - diff --git a/target/linux/generic/hack-5.10/781-dsa-register-every-port-with-of_platform.patch b/target/linux/generic/hack-5.10/781-dsa-register-every-port-with-of_platform.patch deleted file mode 100644 index 330d9f1f8..000000000 --- a/target/linux/generic/hack-5.10/781-dsa-register-every-port-with-of_platform.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 8bab551f44204fc5d43977063cd704112c17c750 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -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 ---- - 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 - #include - #include -+#include - #include - - #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) diff --git a/target/linux/generic/pending-5.10/780-ARM-kirkwood-add-missing-linux-if_ether.h-for-ETH_AL.patch b/target/linux/generic/pending-5.10/780-ARM-kirkwood-add-missing-linux-if_ether.h-for-ETH_AL.patch new file mode 100644 index 000000000..fcf7892c0 --- /dev/null +++ b/target/linux/generic/pending-5.10/780-ARM-kirkwood-add-missing-linux-if_ether.h-for-ETH_AL.patch @@ -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 +X-Patchwork-Id: 12422209 +Date: Thu, 5 Aug 2021 23:23:30 +0100 +From: Daniel Golle +To: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, + linux-kernel@vger.kernel.org +Cc: "David S. Miller" , Andrew Lunn , + Michael Walle +Subject: [PATCH] ARM: kirkwood: add missing for ETH_ALEN +Message-ID: +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: +List-Archive: +Sender: "linux-arm-kernel" + +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 to fix this. + +Cc: David S. Miller +Cc: Andrew Lunn +Cc: Michael Walle +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 +--- + 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 + #include + #include ++#include + #include + #include + #include diff --git a/target/linux/generic/pending-5.4/780-ARM-kirkwood-add-missing-linux-if_ether.h-for-ETH_AL.patch b/target/linux/generic/pending-5.4/780-ARM-kirkwood-add-missing-linux-if_ether.h-for-ETH_AL.patch new file mode 100644 index 000000000..fcf7892c0 --- /dev/null +++ b/target/linux/generic/pending-5.4/780-ARM-kirkwood-add-missing-linux-if_ether.h-for-ETH_AL.patch @@ -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 +X-Patchwork-Id: 12422209 +Date: Thu, 5 Aug 2021 23:23:30 +0100 +From: Daniel Golle +To: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, + linux-kernel@vger.kernel.org +Cc: "David S. Miller" , Andrew Lunn , + Michael Walle +Subject: [PATCH] ARM: kirkwood: add missing for ETH_ALEN +Message-ID: +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: +List-Archive: +Sender: "linux-arm-kernel" + +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 to fix this. + +Cc: David S. Miller +Cc: Andrew Lunn +Cc: Michael Walle +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 +--- + 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 + #include + #include ++#include + #include + #include + #include