From 751640584848f7a8f6fe6774ea4e989fce9d91e9 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Fri, 4 Mar 2022 15:21:17 -0500 Subject: [PATCH] Fixes for 5.15 Signed-off-by: Sasha Levin --- ...stub-of_net-helpers-for-config_net-n.patch | 45 +++++++++++++++++++ queue-5.15/series | 1 + 2 files changed, 46 insertions(+) create mode 100644 queue-5.15/net-of-fix-stub-of_net-helpers-for-config_net-n.patch diff --git a/queue-5.15/net-of-fix-stub-of_net-helpers-for-config_net-n.patch b/queue-5.15/net-of-fix-stub-of_net-helpers-for-config_net-n.patch new file mode 100644 index 00000000000..759de21bbf4 --- /dev/null +++ b/queue-5.15/net-of-fix-stub-of_net-helpers-for-config_net-n.patch @@ -0,0 +1,45 @@ +From 3258d71f32585ed5ed73a758ee30a7e2792225ae Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 14 Oct 2021 11:00:37 +0200 +Subject: net: of: fix stub of_net helpers for CONFIG_NET=n + +From: Arnd Bergmann + +[ Upstream commit 8b017fbe0bbb98dd71fb4850f6b9cc0e136a26b8 ] + +Moving the of_net code from drivers/of/ to net/core means we +no longer stub out the helpers when networking is disabled, +which leads to a randconfig build failure with at least one +ARM platform that calls this from non-networking code: + +arm-linux-gnueabi-ld: arch/arm/mach-mvebu/kirkwood.o: in function `kirkwood_dt_eth_fixup': +kirkwood.c:(.init.text+0x54): undefined reference to `of_get_mac_address' + +Restore the way this worked before by changing that #ifdef +check back to testing for both CONFIG_OF and CONFIG_NET. + +Fixes: e330fb14590c ("of: net: move of_net under net/") +Signed-off-by: Arnd Bergmann +Link: https://lore.kernel.org/r/20211014090055.2058949-1-arnd@kernel.org +Signed-off-by: Jakub Kicinski +Signed-off-by: Sasha Levin +--- + include/linux/of_net.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/linux/of_net.h b/include/linux/of_net.h +index cf31188329b5a..55460ecfa50ad 100644 +--- a/include/linux/of_net.h ++++ b/include/linux/of_net.h +@@ -8,7 +8,7 @@ + + #include + +-#ifdef CONFIG_OF ++#if defined(CONFIG_OF) && defined(CONFIG_NET) + #include + + struct net_device; +-- +2.34.1 + diff --git a/queue-5.15/series b/queue-5.15/series index adece2a912f..f75d9ba9986 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -133,3 +133,4 @@ drm-amd-display-fix-stream-link_enc-unassigned-durin.patch bnxt_en-fix-occasional-ethtool-t-loopback-test-failu.patch drm-amd-display-for-vblank_disable_immediate-check-p.patch pci-mvebu-fix-device-enumeration-regression.patch +net-of-fix-stub-of_net-helpers-for-config_net-n.patch -- 2.47.3