On Mon, Jan 25, 2021 at 09:41:12AM -0800, Randy Dunlap wrote: > on x86_64: > > ld: drivers/crypto/marvell/octeontx2/otx2_cptpf_main.o: in function `cptpf_flr_wq_handler': > otx2_cptpf_main.c:(.text+0x2b): undefined reference to `otx2_mbox_alloc_msg_rsp' Thanks for the report. The issue is that the crypto driver depends on code that sits under net so if that option is off then you'll end up with these errors. ---8<--- The crypto octeontx2 driver depends on the mbox code in the network tree. It tries to select the MBOX Kconfig option but that option itself depends on many other options which are not selected, e.g., CONFIG_NET_VENDOR_MARVELL. It would be inappropriate to select them all as randomly prompting the user for network options which would oterhwise be disabled just because a crypto driver has been enabled makes no sense. This patch fixes this by adding a dependency on NET_VENDOR_MARVELL. This makes the crypto driver invisible if the network option is off. If the crypto driver must be visible even without the network stack then the shared mbox code should be moved out of drivers/net. Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> Reported-by: kernel test robot <lkp@xxxxxxxxx> Fixes: 5e8ce8334734 ("crypto: marvell - add Marvell OcteonTX2 CPT...") Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> diff --git a/drivers/crypto/marvell/Kconfig b/drivers/crypto/marvell/Kconfig index 2efbd79180ce..a188ad1fadd3 100644 --- a/drivers/crypto/marvell/Kconfig +++ b/drivers/crypto/marvell/Kconfig @@ -41,6 +41,7 @@ config CRYPTO_DEV_OCTEONTX2_CPT depends on ARM64 || COMPILE_TEST depends on PCI_MSI && 64BIT depends on CRYPTO_LIB_AES + depends on NET_VENDOR_MARVELL select OCTEONTX2_MBOX select CRYPTO_DEV_MARVELL select CRYPTO_SKCIPHER -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt