aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-4.4/071-0000-net-bgmac-clarify-CONFIG_BCMA-dependency.patch
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2016-08-17 07:45:48 +0200
committerRafał Miłecki <rafal@milecki.pl>2016-08-17 09:31:45 +0200
commit533d16822c84bf33ff5d18b775dafd3ab4810b17 (patch)
tree782f1d25143fcfa695756a34cdf83ba0bd321538 /target/linux/generic/patches-4.4/071-0000-net-bgmac-clarify-CONFIG_BCMA-dependency.patch
parentdf4f41261cf9da3cb1681c7495c51badfe1d999c (diff)
downloadupstream-533d16822c84bf33ff5d18b775dafd3ab4810b17.tar.gz
upstream-533d16822c84bf33ff5d18b775dafd3ab4810b17.tar.bz2
upstream-533d16822c84bf33ff5d18b775dafd3ab4810b17.zip
kernel: bgmac: backport patch switching to feature_flags
It was needed upstream to avoid bcma references in the main code. To match this new code our patch adding SRAB was also updated. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/generic/patches-4.4/071-0000-net-bgmac-clarify-CONFIG_BCMA-dependency.patch')
-rw-r--r--target/linux/generic/patches-4.4/071-0000-net-bgmac-clarify-CONFIG_BCMA-dependency.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/target/linux/generic/patches-4.4/071-0000-net-bgmac-clarify-CONFIG_BCMA-dependency.patch b/target/linux/generic/patches-4.4/071-0000-net-bgmac-clarify-CONFIG_BCMA-dependency.patch
new file mode 100644
index 0000000000..cd0d09887f
--- /dev/null
+++ b/target/linux/generic/patches-4.4/071-0000-net-bgmac-clarify-CONFIG_BCMA-dependency.patch
@@ -0,0 +1,46 @@
+From 1f820f538f7396db7fd40684b9c3620816acc5a3 Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Fri, 29 Jan 2016 12:39:12 +0100
+Subject: [PATCH] net: bgmac: clarify CONFIG_BCMA dependency
+
+The bgmac driver depends on BCMA_HOST_SOC, which is only used
+when CONFIG_BCMA is enabled. However, it is a bool option and can
+be set when CONFIG_BCMA=m, and then bgmac can be built-in, leading
+to an obvious link error:
+
+drivers/built-in.o: In function `bgmac_init':
+:(.init.text+0x7f2c): undefined reference to `__bcma_driver_register'
+drivers/built-in.o: In function `bgmac_exit':
+:(.exit.text+0x110a): undefined reference to `bcma_driver_unregister'
+
+To avoid this case, we need to depend on both BCMA and BCMA_SOC,
+as this patch does. I'm also trying to make the dependency more
+readable by splitting it into three lines, and adding a COMPILE_TEST
+alternative so we can test-build it in all configurations that
+support BCMA.
+
+The added dependency on FIXED_PHY addresses a related issue where
+we cannot call fixed_phy_register() when CONFIG_FIXED_PHY=m and
+CONFIG_BGMAC=y.
+
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ drivers/net/ethernet/broadcom/Kconfig | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/broadcom/Kconfig
++++ b/drivers/net/ethernet/broadcom/Kconfig
+@@ -151,8 +151,11 @@ config BNX2X_VXLAN
+
+ config BGMAC
+ tristate "BCMA bus GBit core support"
+- depends on BCMA_HOST_SOC && HAS_DMA && (BCM47XX || ARCH_BCM_5301X)
++ depends on BCMA && BCMA_HOST_SOC
++ depends on HAS_DMA
++ depends on BCM47XX || ARCH_BCM_5301X || COMPILE_TEST
+ select PHYLIB
++ select FIXED_PHY
+ ---help---
+ This driver supports GBit MAC and BCM4706 GBit MAC cores on BCMA bus.
+ They can be found on BCM47xx SoCs and provide gigabit ethernet.