diff mbox series

chelsio/chtls: Re-add dependencies on CHELSIO_T4 to fix modular CHELSIO_T4

Message ID 20200915093551.29368-1-geert+renesas@glider.be
State Accepted
Delegated to: David Miller
Headers show
Series chelsio/chtls: Re-add dependencies on CHELSIO_T4 to fix modular CHELSIO_T4 | expand

Commit Message

Geert Uytterhoeven Sept. 15, 2020, 9:35 a.m. UTC
As CHELSIO_INLINE_CRYPTO is bool, and CHELSIO_T4 is tristate, the
dependency of CHELSIO_INLINE_CRYPTO on CHELSIO_T4 is not sufficient to
protect CRYPTO_DEV_CHELSIO_TLS and CHELSIO_IPSEC_INLINE.  The latter two
are also tristate, hence if CHELSIO_T4=n, they cannot be builtin, as
that would lead to link failures like:

    drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c:259: undefined reference to `cxgb4_port_viid'

and

    drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/chcr_ipsec.c:752: undefined reference to `cxgb4_reclaim_completed_tx'

Fix this by re-adding dependencies on CHELSIO_T4 to tristate symbols.
The dependency of CHELSIO_INLINE_CRYPTO on CHELSIO_T4 is kept to avoid
asking the user.

Fixes: 6bd860ac1c2a0ec2 ("chelsio/chtls: CHELSIO_INLINE_CRYPTO should depend on CHELSIO_T4")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/net/ethernet/chelsio/inline_crypto/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

Comments

David Miller Sept. 15, 2020, 10:59 p.m. UTC | #1
From: Geert Uytterhoeven <geert+renesas@glider.be>
Date: Tue, 15 Sep 2020 11:35:51 +0200

> As CHELSIO_INLINE_CRYPTO is bool, and CHELSIO_T4 is tristate, the
> dependency of CHELSIO_INLINE_CRYPTO on CHELSIO_T4 is not sufficient to
> protect CRYPTO_DEV_CHELSIO_TLS and CHELSIO_IPSEC_INLINE.  The latter two
> are also tristate, hence if CHELSIO_T4=n, they cannot be builtin, as
> that would lead to link failures like:
> 
>     drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c:259: undefined reference to `cxgb4_port_viid'
> 
> and
> 
>     drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/chcr_ipsec.c:752: undefined reference to `cxgb4_reclaim_completed_tx'
> 
> Fix this by re-adding dependencies on CHELSIO_T4 to tristate symbols.
> The dependency of CHELSIO_INLINE_CRYPTO on CHELSIO_T4 is kept to avoid
> asking the user.
> 
> Fixes: 6bd860ac1c2a0ec2 ("chelsio/chtls: CHELSIO_INLINE_CRYPTO should depend on CHELSIO_T4")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Applied, thank you.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/chelsio/inline_crypto/Kconfig b/drivers/net/ethernet/chelsio/inline_crypto/Kconfig
index 1923e713b53a1bf5..7dfa57348d542921 100644
--- a/drivers/net/ethernet/chelsio/inline_crypto/Kconfig
+++ b/drivers/net/ethernet/chelsio/inline_crypto/Kconfig
@@ -15,6 +15,7 @@  if CHELSIO_INLINE_CRYPTO
 
 config CRYPTO_DEV_CHELSIO_TLS
 	tristate "Chelsio Crypto Inline TLS Driver"
+	depends on CHELSIO_T4
 	depends on TLS_TOE
 	help
 	  Support Chelsio Inline TLS with Chelsio crypto accelerator.
@@ -25,6 +26,7 @@  config CRYPTO_DEV_CHELSIO_TLS
 
 config CHELSIO_IPSEC_INLINE
        tristate "Chelsio IPSec XFRM Tx crypto offload"
+       depends on CHELSIO_T4
        depends on XFRM_OFFLOAD
        depends on INET_ESP_OFFLOAD || INET6_ESP_OFFLOAD
        help