* [PATCH] scsi: hisi_sas: fix SATA dependency
@ 2017-03-28 14:22 Arnd Bergmann
2017-03-28 16:48 ` John Garry
2017-03-30 2:45 ` Martin K. Petersen
0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2017-03-28 14:22 UTC (permalink / raw)
To: John Garry, James E.J. Bottomley, Martin K. Petersen
Cc: Arnd Bergmann, Xiang Chen, linux-scsi, linux-kernel
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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/scsi/hisi_sas/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/hisi_sas/Kconfig b/drivers/scsi/hisi_sas/Kconfig
index ded2c201071d..374a329b91fc 100644
--- a/drivers/scsi/hisi_sas/Kconfig
+++ b/drivers/scsi/hisi_sas/Kconfig
@@ -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.9.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: hisi_sas: fix SATA dependency
2017-03-28 14:22 [PATCH] scsi: hisi_sas: fix SATA dependency Arnd Bergmann
@ 2017-03-28 16:48 ` John Garry
2017-03-30 2:45 ` Martin K. Petersen
1 sibling, 0 replies; 4+ messages in thread
From: John Garry @ 2017-03-28 16:48 UTC (permalink / raw)
To: Arnd Bergmann, James E.J. Bottomley, Martin K. Petersen
Cc: Xiang Chen, linux-scsi, linux-kernel
On 28/03/2017 15:22, Arnd Bergmann wrote:
> 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.
>
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.
> Fixes: 7c594f0407de ("scsi: hisi_sas: add softreset function for SATA disk")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: John Garry <john.garry@huawei.com>
> ---
> drivers/scsi/hisi_sas/Kconfig | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/hisi_sas/Kconfig b/drivers/scsi/hisi_sas/Kconfig
> index ded2c201071d..374a329b91fc 100644
> --- a/drivers/scsi/hisi_sas/Kconfig
> +++ b/drivers/scsi/hisi_sas/Kconfig
> @@ -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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: hisi_sas: fix SATA dependency
@ 2017-03-28 16:48 ` John Garry
0 siblings, 0 replies; 4+ messages in thread
From: John Garry @ 2017-03-28 16:48 UTC (permalink / raw)
To: Arnd Bergmann, James E.J. Bottomley, Martin K. Petersen
Cc: Xiang Chen, linux-scsi, linux-kernel
On 28/03/2017 15:22, Arnd Bergmann wrote:
> 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.
>
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.
> Fixes: 7c594f0407de ("scsi: hisi_sas: add softreset function for SATA disk")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: John Garry <john.garry@huawei.com>
> ---
> drivers/scsi/hisi_sas/Kconfig | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/hisi_sas/Kconfig b/drivers/scsi/hisi_sas/Kconfig
> index ded2c201071d..374a329b91fc 100644
> --- a/drivers/scsi/hisi_sas/Kconfig
> +++ b/drivers/scsi/hisi_sas/Kconfig
> @@ -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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: hisi_sas: fix SATA dependency
2017-03-28 14:22 [PATCH] scsi: hisi_sas: fix SATA dependency Arnd Bergmann
2017-03-28 16:48 ` John Garry
@ 2017-03-30 2:45 ` Martin K. Petersen
1 sibling, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2017-03-30 2:45 UTC (permalink / raw)
To: Arnd Bergmann
Cc: John Garry, James E.J. Bottomley, Martin K. Petersen, Xiang Chen,
linux-scsi, linux-kernel
Arnd Bergmann <arnd@arndb.de> writes:
> 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!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-30 2:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-28 14:22 [PATCH] scsi: hisi_sas: fix SATA dependency Arnd Bergmann
2017-03-28 16:48 ` John Garry
2017-03-28 16:48 ` John Garry
2017-03-30 2:45 ` Martin K. Petersen
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.