diff mbox series

[v2] scsi: mpi3mr: select CONFIG_SCSI_SAS_ATTRS

Message ID 20221017145517.93BCB6043B@lion.mk-sys.cz
State New
Headers show
Series [v2] scsi: mpi3mr: select CONFIG_SCSI_SAS_ATTRS | expand

Commit Message

Michal Kubecek Oct. 17, 2022, 2:55 p.m. UTC
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!
  ...

Select CONFIG_SCSI_SAS_ATTRS when CONFIG_SCSI_MPI3MR is enabled to prevent
inconsistent configs.

Fixes: 42fc9fee116f ("scsi: mpi3mr: Add helper functions to manage device's port")
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>

v2: use select instead of depend
---
 drivers/scsi/mpi3mr/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Martin K. Petersen Oct. 22, 2022, 3:52 a.m. UTC | #1
On Mon, 17 Oct 2022 16:55:17 +0200 (CEST), 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!
>   ...
> 
> [...]

Applied to 6.1/scsi-fixes, thanks!

[1/1] scsi: mpi3mr: select CONFIG_SCSI_SAS_ATTRS
      https://git.kernel.org/mkp/scsi/c/65244389b1b3
diff mbox series

Patch

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