Skip to contentSkip to conversation

scsi: mpi3mr: select CONFIG_SCSI_SAS_ATTRS

PATCH Applied Michal Kubecek 3 participants 3 messages Oct 17, 2022 – Oct 22, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 scsi: mpi3mr: select CONFIG_SCSI_SAS_ATTRS

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")

v2: use select instead of depend

---
 drivers/scsi/mpi3mr/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/mpi3mr/Kconfig +1 -0
index 8997531940c2..f48740cd5b95 100644
@@ -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.
Signature · 1 line
2.38.0
maintainer Acked-by on v2 1/1
#1 lore raw
Quoted 12 lines · Michal Kubecek

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!
...

Quoted 8 lines

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")

v2: use select instead of depend
---

Quoted 17 lines
 drivers/scsi/mpi3mr/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/mpi3mr/Kconfig +1 -1
index 8997531940c2..f48740cd5b95 100644
@@ -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.
--

2.38.0

Signature · 11 lines
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.
#2 lore raw
In reply to Michal Kubecek
Quoted 5 lines · Michal Kubecek

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:

Quoted 7 lines

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
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering