* [PATCH] cxgb4: fix TLS dependencies again
@ 2021-01-03 14:01 Arnd Bergmann
2021-01-03 16:51 ` James Bottomley
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2021-01-03 14:01 UTC (permalink / raw)
To: Karen Xie, James E.J. Bottomley, Martin K. Petersen,
Jakub Kicinski, Tom Seewald
Cc: Arnd Bergmann, Randy Dunlap, Masahiro Yamada, linux-scsi, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
A previous patch tried to avoid a build failure, but missed one case
that Kconfig warns about:
WARNING: unmet direct dependencies detected for CHELSIO_T4
Depends on [m]: NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_CHELSIO [=y] && PCI [=y] && (IPV6 [=y] || IPV6 [=y]=n) && (TLS [=m] || TLS [=m]=n)
Selected by [y]:
- SCSI_CXGB4_ISCSI [=y] && SCSI_LOWLEVEL [=y] && SCSI [=y] && PCI [=y] && INET [=y] && (IPV6 [=y] || IPV6 [=y]=n) && ETHERNET [=y]
x86_64-linux-ld: drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.o: in function `cxgb_select_queue':
cxgb4_main.c:(.text+0xf5df): undefined reference to `tls_validate_xmit_skb'
When any of the dependencies of CHELSIO_T4 are not met, then
SCSI_CXGB4_ISCSI must not 'select' it either.
Fix it by mirroring the network driver dependencies on the iscsi
driver. A more invasive but also more reliable alternative would
be to use 'depends on CHELSIO_T4' instead.
Fixes: 659fbdcf2f14 ("cxgb4: Fix build failure when CONFIG_TLS=m")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/scsi/cxgbi/cxgb4i/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/cxgbi/cxgb4i/Kconfig b/drivers/scsi/cxgbi/cxgb4i/Kconfig
index 8b0deece9758..2af88a55fbca 100644
--- a/drivers/scsi/cxgbi/cxgb4i/Kconfig
+++ b/drivers/scsi/cxgbi/cxgb4i/Kconfig
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
config SCSI_CXGB4_ISCSI
tristate "Chelsio T4 iSCSI support"
- depends on PCI && INET && (IPV6 || IPV6=n)
+ depends on PCI && INET && (IPV6 || IPV6=n) && (TLS || TLS=n)
depends on THERMAL || !THERMAL
depends on ETHERNET
depends on TLS || TLS=n
--
2.29.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cxgb4: fix TLS dependencies again
2021-01-03 14:01 [PATCH] cxgb4: fix TLS dependencies again Arnd Bergmann
@ 2021-01-03 16:51 ` James Bottomley
2021-01-03 18:42 ` Arnd Bergmann
0 siblings, 1 reply; 3+ messages in thread
From: James Bottomley @ 2021-01-03 16:51 UTC (permalink / raw)
To: Arnd Bergmann, Karen Xie, Martin K. Petersen, Jakub Kicinski,
Tom Seewald
Cc: Arnd Bergmann, Randy Dunlap, Masahiro Yamada, linux-scsi, linux-kernel
On Sun, 2021-01-03 at 15:01 +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> A previous patch tried to avoid a build failure, but missed one case
> that Kconfig warns about:
>
> WARNING: unmet direct dependencies detected for CHELSIO_T4
> Depends on [m]: NETDEVICES [=y] && ETHERNET [=y] &&
> NET_VENDOR_CHELSIO [=y] && PCI [=y] && (IPV6 [=y] || IPV6 [=y]=n) &&
> (TLS [=m] || TLS [=m]=n)
> Selected by [y]:
> - SCSI_CXGB4_ISCSI [=y] && SCSI_LOWLEVEL [=y] && SCSI [=y] && PCI
> [=y] && INET [=y] && (IPV6 [=y] || IPV6 [=y]=n) && ETHERNET [=y]
> x86_64-linux-ld: drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.o: in
> function `cxgb_select_queue':
> cxgb4_main.c:(.text+0xf5df): undefined reference to
> `tls_validate_xmit_skb'
>
> When any of the dependencies of CHELSIO_T4 are not met, then
> SCSI_CXGB4_ISCSI must not 'select' it either.
>
> Fix it by mirroring the network driver dependencies on the iscsi
> driver. A more invasive but also more reliable alternative would
> be to use 'depends on CHELSIO_T4' instead.
>
> Fixes: 659fbdcf2f14 ("cxgb4: Fix build failure when CONFIG_TLS=m")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/scsi/cxgbi/cxgb4i/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/cxgbi/cxgb4i/Kconfig
> b/drivers/scsi/cxgbi/cxgb4i/Kconfig
> index 8b0deece9758..2af88a55fbca 100644
> --- a/drivers/scsi/cxgbi/cxgb4i/Kconfig
> +++ b/drivers/scsi/cxgbi/cxgb4i/Kconfig
> @@ -1,7 +1,7 @@
> # SPDX-License-Identifier: GPL-2.0-only
> config SCSI_CXGB4_ISCSI
> tristate "Chelsio T4 iSCSI support"
> - depends on PCI && INET && (IPV6 || IPV6=n)
> + depends on PCI && INET && (IPV6 || IPV6=n) && (TLS || TLS=n)
> depends on THERMAL || !THERMAL
> depends on ETHERNET
> depends on TLS || TLS=n
I thought all separated depends statements were the equivalent of && in
a single statement. If so, how does repeating TLS || TLS=n twice fix
the problem? This sounds more like we have some sort of bug in our
Kconfig apparatus.
James
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cxgb4: fix TLS dependencies again
2021-01-03 16:51 ` James Bottomley
@ 2021-01-03 18:42 ` Arnd Bergmann
0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2021-01-03 18:42 UTC (permalink / raw)
To: James E.J. Bottomley
Cc: Karen Xie, Martin K. Petersen, Jakub Kicinski, Tom Seewald,
Arnd Bergmann, Randy Dunlap, Masahiro Yamada, linux-scsi,
linux-kernel
On Sun, Jan 3, 2021 at 5:51 PM James Bottomley <jejb@linux.ibm.com> wrote:
> On Sun, 2021-01-03 at 15:01 +0100, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > A previous patch tried to avoid a build failure, but missed one case
> > that Kconfig warns about:
> >
> > WARNING: unmet direct dependencies detected for CHELSIO_T4
> > Depends on [m]: NETDEVICES [=y] && ETHERNET [=y] &&
> > NET_VENDOR_CHELSIO [=y] && PCI [=y] && (IPV6 [=y] || IPV6 [=y]=n) &&
> > (TLS [=m] || TLS [=m]=n)
> > Selected by [y]:
> > - SCSI_CXGB4_ISCSI [=y] && SCSI_LOWLEVEL [=y] && SCSI [=y] && PCI
> > [=y] && INET [=y] && (IPV6 [=y] || IPV6 [=y]=n) && ETHERNET [=y]
> > x86_64-linux-ld: drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.o: in
> > function `cxgb_select_queue':
> > cxgb4_main.c:(.text+0xf5df): undefined reference to
> > `tls_validate_xmit_skb'
> >
> > When any of the dependencies of CHELSIO_T4 are not met, then
> > SCSI_CXGB4_ISCSI must not 'select' it either.
> >
> > Fix it by mirroring the network driver dependencies on the iscsi
> > driver. A more invasive but also more reliable alternative would
> > be to use 'depends on CHELSIO_T4' instead.
> >
> > Fixes: 659fbdcf2f14 ("cxgb4: Fix build failure when CONFIG_TLS=m")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> > drivers/scsi/cxgbi/cxgb4i/Kconfig | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/scsi/cxgbi/cxgb4i/Kconfig
> > b/drivers/scsi/cxgbi/cxgb4i/Kconfig
> > index 8b0deece9758..2af88a55fbca 100644
> > --- a/drivers/scsi/cxgbi/cxgb4i/Kconfig
> > +++ b/drivers/scsi/cxgbi/cxgb4i/Kconfig
> > @@ -1,7 +1,7 @@
> > # SPDX-License-Identifier: GPL-2.0-only
> > config SCSI_CXGB4_ISCSI
> > tristate "Chelsio T4 iSCSI support"
> > - depends on PCI && INET && (IPV6 || IPV6=n)
> > + depends on PCI && INET && (IPV6 || IPV6=n) && (TLS || TLS=n)
> > depends on THERMAL || !THERMAL
> > depends on ETHERNET
> > depends on TLS || TLS=n
>
> I thought all separated depends statements were the equivalent of && in
> a single statement. If so, how does repeating TLS || TLS=n twice fix
> the problem? This sounds more like we have some sort of bug in our
> Kconfig apparatus.
No, just a mistake on my end. I had tried v5.10-rc1 to make sure the
patch was still required, but then rebased on top of torvalds/master
(close to -rc2) before sending it out, and this contains Randy's version
of the same patch, cb5253198f10 ("scsi: cxgb4i: Fix TLS dependency").
Arnd
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-03 18:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-03 14:01 [PATCH] cxgb4: fix TLS dependencies again Arnd Bergmann
2021-01-03 16:51 ` James Bottomley
2021-01-03 18:42 ` Arnd Bergmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.