Skip to content

Commit 02f5999

Browse files
Yang Yingliangkuba-moo
authored andcommitted
octeontx2-pf: fix build error when CONFIG_OCTEONTX2_PF=y
If CONFIG_MACSEC=m and CONFIG_OCTEONTX2_PF=y, it leads a build error: ld: drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.o: in function `otx2_pfaf_mbox_up_handler': otx2_pf.c:(.text+0x181c): undefined reference to `cn10k_handle_mcs_event' ld: drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.o: in function `otx2_probe': otx2_pf.c:(.text+0x437e): undefined reference to `cn10k_mcs_init' ld: drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.o: in function `otx2_remove': otx2_pf.c:(.text+0x5031): undefined reference to `cn10k_mcs_free' ld: drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.o: in function `otx2_mbox_up_handler_mcs_intr_notify': otx2_pf.c:(.text+0x5f11): undefined reference to `cn10k_handle_mcs_event' Make CONFIG_OCTEONTX2_PF depends on CONFIG_MACSEC to fix it. Because it has empty stub functions of cn10k, CONFIG_OCTEONTX2_PF can be enabled if CONFIG_MACSEC is disabled Fixes: c54ffc7 ("octeontx2-pf: mcs: Introduce MACSEC hardware offloading") Reported-by: kernel test robot <[email protected]> Signed-off-by: Yang Yingliang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent ec683f0 commit 02f5999

File tree

1 file changed

+1
-0
lines changed
  • drivers/net/ethernet/marvell/octeontx2

1 file changed

+1
-0
lines changed

drivers/net/ethernet/marvell/octeontx2/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ config OCTEONTX2_PF
3232
tristate "Marvell OcteonTX2 NIC Physical Function driver"
3333
select OCTEONTX2_MBOX
3434
select NET_DEVLINK
35+
depends on MACSEC || !MACSEC
3536
depends on (64BIT && COMPILE_TEST) || ARM64
3637
select DIMLIB
3738
depends on PCI

0 commit comments

Comments
 (0)