Commit d2f1e81a authored by Arnd Bergmann's avatar Arnd Bergmann Committed by David S. Miller

net: dsa: b53: Fix build with B53_SRAB enabled and B53_SERDES=m

When B53_SERDES is a loadable module, a built-in srab driver still
cannot reach it, so the previous fix is incomplete:

b53_srab.c:(.text+0x3f4): undefined reference to `b53_serdes_init'
drivers/net/dsa/b53/b53_srab.o:(.rodata+0xe64): undefined reference to `b53_serdes_link_state'
drivers/net/dsa/b53/b53_srab.o:(.rodata+0xe74): undefined reference to `b53_serdes_link_set'
drivers/net/dsa/b53/b53_srab.o:(.rodata+0xe88): undefined reference to `b53_serdes_an_restart'
drivers/net/dsa/b53/b53_srab.o:(.rodata+0xea0): undefined reference to `b53_serdes_phylink_validate'
drivers/net/dsa/b53/b53_srab.o:(.rodata+0xea4): undefined reference to `b53_serdes_config'

Add a Kconfig dependency that forces srab to also be a module
in this case, but allow it to be built-in when serdes is
disabled or built-in.

Fixes: 7a8c7f5c ("net: dsa: b53: Fix build with B53_SRAB enabled and not B53_SERDES")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9b97123a
...@@ -31,6 +31,7 @@ config B53_MMAP_DRIVER ...@@ -31,6 +31,7 @@ config B53_MMAP_DRIVER
config B53_SRAB_DRIVER config B53_SRAB_DRIVER
tristate "B53 SRAB connected switch driver" tristate "B53 SRAB connected switch driver"
depends on B53 && HAS_IOMEM depends on B53 && HAS_IOMEM
depends on B53_SERDES || !B53_SERDES
default ARCH_BCM_IPROC default ARCH_BCM_IPROC
help help
Select to enable support for memory-mapped Switch Register Access Select to enable support for memory-mapped Switch Register Access
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment