From a0b827b916ed51317eddf41cdca35ab73ec4cbdb Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 5 Aug 2021 23:40:21 +0100 Subject: 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: 91a52f22a1 ("treewide: backport support for nvmem on non platform devices") Signed-off-by: Daniel Golle --- ...-mac-address-support-to-of_get_mac_addres.patch | 4 +- ...-of_net-add-mac-address-increment-support.patch | 2 +- .../683-of_net-add-mac-address-to-of-tree.patch | 4 +- ...d-add-missing-linux-if_ether.h-for-ETH_AL.patch | 61 ++++++++++++++++++++++ 4 files changed, 66 insertions(+), 5 deletions(-) create mode 100644 target/linux/generic/pending-5.10/780-ARM-kirkwood-add-missing-linux-if_ether.h-for-ETH_AL.patch (limited to 'target/linux/generic/pending-5.10') diff --git a/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch b/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch index 463fc270c6..30e292a25d 100644 --- a/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch +++ b/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch @@ -78,7 +78,7 @@ Signed-off-by: Ansuel Smith /** * Search the device tree for the best MAC address to use. 'mac-address' is * checked first, because that is supposed to contain to "most recent" MAC -@@ -115,6 +161,10 @@ static int of_get_mac_addr_nvmem(struct +@@ -115,6 +162,10 @@ static int of_get_mac_addr_nvmem(struct * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists * but is all zeros. * @@ -89,7 +89,7 @@ Signed-off-by: Ansuel Smith * Return: 0 on success and errno in case of error. */ int of_get_mac_address(struct device_node *np, u8 *addr) -@@ -136,6 +186,10 @@ int of_get_mac_address(struct device_nod +@@ -136,6 +187,10 @@ int of_get_mac_address(struct device_nod if (!ret) return 0; diff --git a/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch b/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch index ce5211a21b..e48e6311c6 100644 --- a/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch +++ b/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch @@ -20,7 +20,7 @@ Signed-off-by: Ansuel Smith --- a/drivers/of/of_net.c +++ b/drivers/of/of_net.c -@@ -165,31 +165,56 @@ static int of_get_mac_address_mtd(struct +@@ -166,31 +166,56 @@ static int of_get_mac_address_mtd(struct * If a mtd-mac-address property exists, try to fetch the MAC address from the * specified mtd device. * diff --git a/target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch b/target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch index 377f16e7c9..509d721403 100644 --- a/target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch +++ b/target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch @@ -1,6 +1,6 @@ --- a/drivers/of/of_net.c +++ b/drivers/of/of_net.c -@@ -132,6 +132,30 @@ static void *of_get_mac_address_mtd(stru +@@ -141,6 +141,30 @@ static int of_get_mac_address_mtd(struct return -EINVAL; } @@ -31,7 +31,7 @@ /** * Search the device tree for the best MAC address to use. 'mac-address' is -@@ -205,6 +232,7 @@ found: +@@ -216,6 +240,7 @@ found: if (!of_property_read_u32(np, "mac-address-increment", &mac_inc)) addr[inc_idx] += mac_inc; 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 0000000000..fcf7892c04 --- /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 -- cgit v1.2.3