Skip to contentSkip to conversation

scsi: hisi_sas: fix SATA dependency

PATCH Applied Arnd Bergmann 3 participants 3 messages Mar 28, 2017 – Mar 30, 2017

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

PATCH 1/1 scsi: hisi_sas: fix SATA dependency

Removing the 'select SCSI_SAS_LIBSAS' statement in Kconfig resulted in a link failure in configurations that have hisi_sas built-in but libsas as a loadable module:

drivers/scsi/built-in.o: In function `hisi_sas_scan_finished':
hisi_sas_main.c:(.text+0x37ce9): undefined reference to sas_drain_work' drivers/scsi/built-in.o: In function hisi_sas_slave_configure':
hisi_sas_main.c:(.text+0x37d17): undefined reference to sas_slave_configure' hisi_sas_main.c:(.text+0x37d40): undefined reference to sas_change_queue_depth' drivers/scsi/built-in.o: In function `hisi_sas_remove':

All other libsas users have the 'select' statement, so we should do the same here for consistency. For all I can tell, the patch that added the sata softreset does not actually introduce a dependency on SCSI_SAS_ATA but instead adds calls into libata itself, so we can express that with a more specific dependency.

We cannot have 'select SCSI_SAS_LIBSAS; depends on SCSI_SAS_ATA' as that would cause a dependency loop.

Fixes 7c594f0407de ("scsi: hisi_sas: add softreset function for SATA disk")
---
 drivers/scsi/hisi_sas/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/hisi_sas/Kconfig +2 -1
index ded2c201071d..374a329b91fc 100644
@@ -2,7 +2,8 @@ config SCSI_HISI_SAS
 	tristate "HiSilicon SAS"
 	depends on HAS_DMA && HAS_IOMEM
 	depends on ARM64 || COMPILE_TEST
-	depends on SCSI_SAS_ATA
+	select SCSI_SAS_LIBSAS
 	select BLK_DEV_INTEGRITY
+	depends on ATA
 	help
 		This driver supports HiSilicon's SAS HBA
Signature · 1 line
2.9.0
#1 lore raw
Quoted 11 lines · Arnd Bergmann

Removing the 'select SCSI_SAS_LIBSAS' statement in Kconfig resulted in a link failure in configurations that have hisi_sas built-in but libsas as a loadable module:

drivers/scsi/built-in.o: In function `hisi_sas_scan_finished':
hisi_sas_main.c:(.text+0x37ce9): undefined reference to sas_drain_work' drivers/scsi/built-in.o: In function hisi_sas_slave_configure':
hisi_sas_main.c:(.text+0x37d17): undefined reference to sas_slave_configure' hisi_sas_main.c:(.text+0x37d40): undefined reference to sas_change_queue_depth' drivers/scsi/built-in.o: In function `hisi_sas_remove':

Quoted 9 lines

All other libsas users have the 'select' statement, so we should do the same here for consistency. For all I can tell, the patch that added the sata softreset does not actually introduce a dependency on SCSI_SAS_ATA but instead adds calls into libata itself, so we can express that with a more specific dependency.

We cannot have 'select SCSI_SAS_LIBSAS; depends on SCSI_SAS_ATA' as that would cause a dependency loop.

Hi Arnd,

Thanks for the fix. So we missed that SCSI_SAS_ATA is a bool and not a tristate, like SCSI_SAS_LIBSAS. Just adding the dependency on ATA is better.

Quoted 2 lines
Fixes 7c594f0407de ("scsi: hisi_sas: add softreset function for SATA disk")
Quoted 19 lines
---
 drivers/scsi/hisi_sas/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/hisi_sas/Kconfig +2 -1
index ded2c201071d..374a329b91fc 100644
@@ -2,7 +2,8 @@ config SCSI_HISI_SAS
 	tristate "HiSilicon SAS"
 	depends on HAS_DMA && HAS_IOMEM
 	depends on ARM64 || COMPILE_TEST
-	depends on SCSI_SAS_ATA
+	select SCSI_SAS_LIBSAS
 	select BLK_DEV_INTEGRITY
+	depends on ATA
 	help
 		This driver supports HiSilicon's SAS HBA
#2 lore raw
In reply to Arnd Bergmann
Quoted 3 lines · Arnd Bergmann

Removing the 'select SCSI_SAS_LIBSAS' statement in Kconfig resulted in a link failure in configurations that have hisi_sas built-in but libsas as a loadable module:

Applied to 4.12/scsi-queue. Thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering