diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2016-03-15 17:47:14 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2016-03-18 19:36:48 -0400 |
| commit | 019ded3aa7c9799fbe6533baeac9aafc7063bd39 (patch) | |
| tree | 7884ee1a41450c3831ebed60cae62a80d3e9283f | |
| parent | 3a461da1d03e7a857edfa6a002040d07e118c639 (diff) | |
net: mvneta: bm: clarify dependencies
MVNETA_BM has a dependency on MVNETA, so we can only select the former
if the latter is enabled. However, the code dependency is the reverse:
The mvneta module can call into the mvneta_bm module, so mvneta cannot
be a built-in if mvneta_bm is a module, or we get a link error:
drivers/net/built-in.o: In function `mvneta_remove':
drivers/net/ethernet/marvell/mvneta.c:4211: undefined reference to `mvneta_bm_pool_destroy'
drivers/net/built-in.o: In function `mvneta_bm_update_mtu':
drivers/net/ethernet/marvell/mvneta.c:1034: undefined reference to `mvneta_bm_bufs_free'
This avoids the problem by further clarifying the dependency so that
MVNETA_BM is a silent Kconfig option that gets turned on by the
new MVNETA_BM_ENABLE option. This way both the core HWBM module and
the MVNETA_BM code are always built-in when needed.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: dc35a10f68d3 ("net: mvneta: bm: add support for hardware buffer management")
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | drivers/net/ethernet/marvell/Kconfig | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/ethernet/marvell/Kconfig b/drivers/net/ethernet/marvell/Kconfig index 62d80fddbe34..b5c6d42daa12 100644 --- a/drivers/net/ethernet/marvell/Kconfig +++ b/drivers/net/ethernet/marvell/Kconfig | |||
| @@ -40,10 +40,9 @@ config MVMDIO | |||
| 40 | 40 | ||
| 41 | This driver is used by the MV643XX_ETH and MVNETA drivers. | 41 | This driver is used by the MV643XX_ETH and MVNETA drivers. |
| 42 | 42 | ||
| 43 | config MVNETA_BM | 43 | config MVNETA_BM_ENABLE |
| 44 | tristate "Marvell Armada 38x/XP network interface BM support" | 44 | tristate "Marvell Armada 38x/XP network interface BM support" |
| 45 | depends on MVNETA | 45 | depends on MVNETA |
| 46 | select HWBM | ||
| 47 | ---help--- | 46 | ---help--- |
| 48 | This driver supports auxiliary block of the network | 47 | This driver supports auxiliary block of the network |
| 49 | interface units in the Marvell ARMADA XP and ARMADA 38x SoC | 48 | interface units in the Marvell ARMADA XP and ARMADA 38x SoC |
| @@ -67,6 +66,15 @@ config MVNETA | |||
| 67 | driver, which should be used for the older Marvell SoCs | 66 | driver, which should be used for the older Marvell SoCs |
| 68 | (Dove, Orion, Discovery, Kirkwood). | 67 | (Dove, Orion, Discovery, Kirkwood). |
| 69 | 68 | ||
| 69 | config MVNETA_BM | ||
| 70 | tristate | ||
| 71 | default y if MVNETA=y && MVNETA_BM_ENABLE | ||
| 72 | default MVNETA_BM_ENABLE | ||
| 73 | select HWBM | ||
| 74 | help | ||
| 75 | MVNETA_BM must not be 'm' if MVNETA=y, so this symbol ensures | ||
| 76 | that all dependencies are met. | ||
| 77 | |||
| 70 | config MVPP2 | 78 | config MVPP2 |
| 71 | tristate "Marvell Armada 375 network interface support" | 79 | tristate "Marvell Armada 375 network interface support" |
| 72 | depends on MACH_ARMADA_375 | 80 | depends on MACH_ARMADA_375 |
