mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] scsi: mpi3mr: add explicit dependency on CONFIG_SCSI_SAS_ATTRS
@ 2022-10-17 14:05 Michal Kubecek
  2022-10-17 14:13 ` James Bottomley
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Kubecek @ 2022-10-17 14:05 UTC (permalink / raw)
  To: mpi3mr-linuxdrv.pdl, Sathya Prakash Veerichetty, Kashyap Desai,
	Sumit Saxena, Sreekanth Reddy
  Cc: linux-scsi, linux-kernel

Starting with commit 42fc9fee116f ("scsi: mpi3mr: Add helper functions to
manage device's port"), kernel configured with CONFIG_SCSI_MPI3MR=m and
CONFIG_SCSI_SAS_ATTRS=n fails to build because modpost cannot find symbols
used in mpi3mr_transport.c:

  ERROR: modpost: "sas_port_alloc_num" [drivers/scsi/mpi3mr/mpi3mr.ko] undefined!
  ERROR: modpost: "sas_remove_host" [drivers/scsi/mpi3mr/mpi3mr.ko] undefined!
  ERROR: modpost: "sas_phy_alloc" [drivers/scsi/mpi3mr/mpi3mr.ko] undefined!
  ERROR: modpost: "sas_phy_free" [drivers/scsi/mpi3mr/mpi3mr.ko] undefined!
  ...

Add an explicit dependency of CONFIG_SCSI_MPI3MR on CONFIG_SCSI_SAS_ATTRS
to prevent inconsistent configs.

Fixes: 42fc9fee116f ("scsi: mpi3mr: Add helper functions to manage device's port")
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
---
 drivers/scsi/mpi3mr/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/mpi3mr/Kconfig b/drivers/scsi/mpi3mr/Kconfig
index 8997531940c2..8ada8e8d25ac 100644
--- a/drivers/scsi/mpi3mr/Kconfig
+++ b/drivers/scsi/mpi3mr/Kconfig
@@ -2,7 +2,7 @@
 
 config SCSI_MPI3MR
 	tristate "Broadcom MPI3 Storage Controller Device Driver"
-	depends on PCI && SCSI
+	depends on PCI && SCSI && SCSI_SAS_ATTRS
 	select BLK_DEV_BSGLIB
 	help
 	MPI3 based Storage & RAID Controllers Driver.
-- 
2.38.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: mpi3mr: add explicit dependency on CONFIG_SCSI_SAS_ATTRS
  2022-10-17 14:05 [PATCH] scsi: mpi3mr: add explicit dependency on CONFIG_SCSI_SAS_ATTRS Michal Kubecek
@ 2022-10-17 14:13 ` James Bottomley
  2022-10-17 14:44   ` Michal Kubecek
  0 siblings, 1 reply; 3+ messages in thread
From: James Bottomley @ 2022-10-17 14:13 UTC (permalink / raw)
  To: Michal Kubecek, mpi3mr-linuxdrv.pdl, Sathya Prakash Veerichetty,
	Kashyap Desai, Sumit Saxena, Sreekanth Reddy
  Cc: linux-scsi, linux-kernel

On Mon, 2022-10-17 at 16:05 +0200, Michal Kubecek wrote:
> Starting with commit 42fc9fee116f ("scsi: mpi3mr: Add helper
> functions to
> manage device's port"), kernel configured with CONFIG_SCSI_MPI3MR=m
> and
> CONFIG_SCSI_SAS_ATTRS=n fails to build because modpost cannot find
> symbols
> used in mpi3mr_transport.c:
> 
>   ERROR: modpost: "sas_port_alloc_num"
> [drivers/scsi/mpi3mr/mpi3mr.ko] undefined!
>   ERROR: modpost: "sas_remove_host" [drivers/scsi/mpi3mr/mpi3mr.ko]
> undefined!
>   ERROR: modpost: "sas_phy_alloc" [drivers/scsi/mpi3mr/mpi3mr.ko]
> undefined!
>   ERROR: modpost: "sas_phy_free" [drivers/scsi/mpi3mr/mpi3mr.ko]
> undefined!
>   ...
> 
> Add an explicit dependency of CONFIG_SCSI_MPI3MR on
> CONFIG_SCSI_SAS_ATTRS
> to prevent inconsistent configs.
> 
> Fixes: 42fc9fee116f ("scsi: mpi3mr: Add helper functions to manage
> device's port")
> Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
> ---
>  drivers/scsi/mpi3mr/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/mpi3mr/Kconfig
> b/drivers/scsi/mpi3mr/Kconfig
> index 8997531940c2..8ada8e8d25ac 100644
> --- a/drivers/scsi/mpi3mr/Kconfig
> +++ b/drivers/scsi/mpi3mr/Kconfig
> @@ -2,7 +2,7 @@
>  
>  config SCSI_MPI3MR
>  	tristate "Broadcom MPI3 Storage Controller Device Driver"
> -	depends on PCI && SCSI
> +	depends on PCI && SCSI && SCSI_SAS_ATTRS

This should probably be select not depends.

All transport attributes are designed to be selected.  The reason is to
avoid people having to figure out what attributes they have to set in
Kconfig before they see the HBAs they're interested in.

James



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: mpi3mr: add explicit dependency on CONFIG_SCSI_SAS_ATTRS
  2022-10-17 14:13 ` James Bottomley
@ 2022-10-17 14:44   ` Michal Kubecek
  0 siblings, 0 replies; 3+ messages in thread
From: Michal Kubecek @ 2022-10-17 14:44 UTC (permalink / raw)
  To: James Bottomley
  Cc: mpi3mr-linuxdrv.pdl, Sathya Prakash Veerichetty, Kashyap Desai,
	Sumit Saxena, Sreekanth Reddy, linux-scsi, linux-kernel

On Mon, Oct 17, 2022 at 10:13:58AM -0400, James Bottomley wrote:
> On Mon, 2022-10-17 at 16:05 +0200, Michal Kubecek wrote:
> > Starting with commit 42fc9fee116f ("scsi: mpi3mr: Add helper
> > functions to
> > manage device's port"), kernel configured with CONFIG_SCSI_MPI3MR=m
> > and
> > CONFIG_SCSI_SAS_ATTRS=n fails to build because modpost cannot find
> > symbols
> > used in mpi3mr_transport.c:
> > 
> >   ERROR: modpost: "sas_port_alloc_num"
> > [drivers/scsi/mpi3mr/mpi3mr.ko] undefined!
> >   ERROR: modpost: "sas_remove_host" [drivers/scsi/mpi3mr/mpi3mr.ko]
> > undefined!
> >   ERROR: modpost: "sas_phy_alloc" [drivers/scsi/mpi3mr/mpi3mr.ko]
> > undefined!
> >   ERROR: modpost: "sas_phy_free" [drivers/scsi/mpi3mr/mpi3mr.ko]
> > undefined!
> >   ...
> > 
> > Add an explicit dependency of CONFIG_SCSI_MPI3MR on
> > CONFIG_SCSI_SAS_ATTRS
> > to prevent inconsistent configs.
> > 
> > Fixes: 42fc9fee116f ("scsi: mpi3mr: Add helper functions to manage
> > device's port")
> > Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
> > ---
> >  drivers/scsi/mpi3mr/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/scsi/mpi3mr/Kconfig
> > b/drivers/scsi/mpi3mr/Kconfig
> > index 8997531940c2..8ada8e8d25ac 100644
> > --- a/drivers/scsi/mpi3mr/Kconfig
> > +++ b/drivers/scsi/mpi3mr/Kconfig
> > @@ -2,7 +2,7 @@
> >  
> >  config SCSI_MPI3MR
> >  	tristate "Broadcom MPI3 Storage Controller Device Driver"
> > -	depends on PCI && SCSI
> > +	depends on PCI && SCSI && SCSI_SAS_ATTRS
> 
> This should probably be select not depends.
> 
> All transport attributes are designed to be selected.  The reason is to
> avoid people having to figure out what attributes they have to set in
> Kconfig before they see the HBAs they're interested in.

OK, I'll send v2 with select in a moment.

Michal

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-17 14:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-17 14:05 [PATCH] scsi: mpi3mr: add explicit dependency on CONFIG_SCSI_SAS_ATTRS Michal Kubecek
2022-10-17 14:13 ` James Bottomley
2022-10-17 14:44   ` Michal Kubecek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®