net: mscc: ocelot: add ETHTOOL_NETLINK dependency
Subsystems (4)
PATCH 1/1 net: mscc: ocelot: add ETHTOOL_NETLINK dependency
From: Arnd Bergmann <[email protected]>
The driver now directly calls into ethtool code, which fails if ethtool is disabled:
arm-linux-gnueabi-ld: drivers/net/ethernet/mscc/ocelot_stats.o: in function `ocelot_port_get_pause_stats':
ocelot_stats.c:(.text+0xe54): undefined reference to `ethtool_aggregate_pause_stats'
arm-linux-gnueabi-ld: drivers/net/ethernet/mscc/ocelot_stats.o: in function `ocelot_port_get_rmon_stats':
ocelot_stats.c:(.text+0x1090): undefined reference to `ethtool_aggregate_rmon_stats'
arm-linux-gnueabi-ld: drivers/net/ethernet/mscc/ocelot_stats.o: in function `ocelot_port_get_eth_ctrl_stats':
ocelot_stats.c:(.text+0x1228): undefined reference to `ethtool_aggregate_ctrl_stats'
arm-linux-gnueabi-ld: drivers/net/ethernet/mscc/ocelot_stats.o: in function `ocelot_port_get_eth_mac_stats':
ocelot_stats.c:(.text+0x13a8): undefined reference to `ethtool_aggregate_mac_stats'
arm-linux-gnueabi-ld: drivers/net/ethernet/mscc/ocelot_stats.o: in function `ocelot_port_get_eth_phy_stats':
ocelot_stats.c:(.text+0x1540): undefined reference to `ethtool_aggregate_phy_stats'
Add a dependency on ETHTOOL_NETLINK, since that controls the compilation of the ethtool stats code. It would probably be possible to have a more fine-grained symbol there, but in practice this is already required.
--- drivers/net/dsa/ocelot/Kconfig | 2 ++ drivers/net/ethernet/mscc/Kconfig | 2 ++ 2 files changed, 4 insertions(+)
drivers/net/dsa/ocelot/Kconfig +2 -0
@@ -7,6 +7,7 @@ config NET_DSA_MSCC_FELIX depends on HAS_IOMEM depends on PTP_1588_CLOCK_OPTIONAL depends on NET_SCH_TAPRIO || NET_SCH_TAPRIO=n + depends on ETHTOOL_NETLINK select MSCC_OCELOT_SWITCH_LIB select NET_DSA_TAG_OCELOT_8021Q select NET_DSA_TAG_OCELOT
@@ -22,6 +23,7 @@ config NET_DSA_MSCC_SEVILLE depends on NET_VENDOR_MICROSEMI depends on HAS_IOMEM depends on PTP_1588_CLOCK_OPTIONAL + depends on ETHTOOL_NETLINK select MDIO_MSCC_MIIM select MSCC_OCELOT_SWITCH_LIB select NET_DSA_TAG_OCELOT_8021Q
drivers/net/ethernet/mscc/Kconfig +2 -0
@@ -13,6 +13,7 @@ if NET_VENDOR_MICROSEMI # Users should depend on NET_SWITCHDEV, HAS_IOMEM, BRIDGE config MSCC_OCELOT_SWITCH_LIB + depends on ETHTOOL_NETLINK select NET_DEVLINK select REGMAP_MMIO select PACKING
@@ -25,6 +26,7 @@ config MSCC_OCELOT_SWITCH_LIB config MSCC_OCELOT_SWITCH tristate "Ocelot switch driver" depends on PTP_1588_CLOCK_OPTIONAL + depends on ETHTOOL_NETLINK depends on BRIDGE || BRIDGE=n depends on NET_SWITCHDEV depends on HAS_IOMEM
Signature · 1 line
2.39.0
Vladimir Oltean
maintainerHi Arnd,
Quoted 16 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The driver now directly calls into ethtool code, which fails if ethtool is disabled:
arm-linux-gnueabi-ld:
drivers/net/ethernet/mscc/ocelot_stats.o: in function `ocelot_port_get_pause_stats':
ocelot_stats.c:(.text+0xe54): undefined reference to `ethtool_aggregate_pause_stats'
arm-linux-gnueabi-ld:drivers/net/ethernet/mscc/ocelot_stats.o: in function `ocelot_port_get_rmon_stats':
ocelot_stats.c:(.text+0x1090): undefined reference to `ethtool_aggregate_rmon_stats'
arm-linux-gnueabi-ld:drivers/net/ethernet/mscc/ocelot_stats.o: in function `ocelot_port_get_eth_ctrl_stats':
ocelot_stats.c:(.text+0x1228): undefined reference to `ethtool_aggregate_ctrl_stats'
arm-linux-gnueabi-ld:drivers/net/ethernet/mscc/ocelot_stats.o: in function `ocelot_port_get_eth_mac_stats':
ocelot_stats.c:(.text+0x13a8): undefined reference to `ethtool_aggregate_mac_stats'
arm-linux-gnueabi-ld:drivers/net/ethernet/mscc/ocelot_stats.o: in function `ocelot_port_get_eth_phy_stats':
ocelot_stats.c:(.text+0x1540): undefined reference to `ethtool_aggregate_phy_stats'
Quoted 8 lines
Add a dependency on
ETHTOOL_NETLINK, since that controls the compilation of the ethtool stats code. It would probably be possible to have a more fine-grained symbol there, but in practice this is already required.Fixes 6505b6805655 ("net: mscc: ocelot: add MAC Merge layer support for VSC9959")Signed-off-by Arnd Bergmann <[email protected]>---
Thanks for the patch and sorry for the breakage. This is now fixed by commit:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=9179f5fe4173
Quoted 3 lines · Vladimir Oltean
Thanks for the patch and sorry for the breakage. This is now fixed by commit:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=9179f5fe4173
Looks good, thanks!
Arnd