linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: hisi_sas: Fix build error without SATA_HOST
@ 2020-04-02  6:30 YueHaibing
  2020-04-02  7:30 ` John Garry
  2020-04-02  8:58 ` [PATCH v2] " YueHaibing
  0 siblings, 2 replies; 8+ messages in thread
From: YueHaibing @ 2020-04-02  6:30 UTC (permalink / raw)
  To: john.garry, jejb, martin.petersen, chenxiang66
  Cc: linux-scsi, linux-kernel, YueHaibing

If SATA_HOST is n, build fails:

drivers/scsi/hisi_sas/hisi_sas_main.o: In function `hisi_sas_fill_ata_reset_cmd':
hisi_sas_main.c:(.text+0x2500): undefined reference to `ata_tf_to_fis'

Select SATA_HOST to fix this.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 7c594f0407de ("scsi: hisi_sas: add softreset function for SATA disk")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/scsi/hisi_sas/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/hisi_sas/Kconfig b/drivers/scsi/hisi_sas/Kconfig
index 90a17452a50d..13ed9073fc72 100644
--- a/drivers/scsi/hisi_sas/Kconfig
+++ b/drivers/scsi/hisi_sas/Kconfig
@@ -6,6 +6,7 @@ config SCSI_HISI_SAS
 	select SCSI_SAS_LIBSAS
 	select BLK_DEV_INTEGRITY
 	depends on ATA
+	select SATA_HOST
 	help
 		This driver supports HiSilicon's SAS HBA, including support based
 		on platform device
-- 
2.17.1



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

* Re: [PATCH] scsi: hisi_sas: Fix build error without SATA_HOST
  2020-04-02  6:30 [PATCH] scsi: hisi_sas: Fix build error without SATA_HOST YueHaibing
@ 2020-04-02  7:30 ` John Garry
  2020-04-02  8:51   ` Yuehaibing
  2020-04-02  8:53   ` Bartlomiej Zolnierkiewicz
  2020-04-02  8:58 ` [PATCH v2] " YueHaibing
  1 sibling, 2 replies; 8+ messages in thread
From: John Garry @ 2020-04-02  7:30 UTC (permalink / raw)
  To: YueHaibing, jejb, martin.petersen, chenxiang66
  Cc: linux-scsi, linux-kernel, Bartlomiej Zolnierkiewicz, linux-ide

On 02/04/2020 07:30, YueHaibing wrote:

+

> If SATA_HOST is n, build fails:
> 
> drivers/scsi/hisi_sas/hisi_sas_main.o: In function `hisi_sas_fill_ata_reset_cmd':
> hisi_sas_main.c:(.text+0x2500): undefined reference to `ata_tf_to_fis'
> 
> Select SATA_HOST to fix this.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: 7c594f0407de ("scsi: hisi_sas: add softreset function for SATA disk")

That's not right. SATA_HOST was only introduced recently in the ATA 
code. It would fix those kconfig changes.

> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>   drivers/scsi/hisi_sas/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/scsi/hisi_sas/Kconfig b/drivers/scsi/hisi_sas/Kconfig
> index 90a17452a50d..13ed9073fc72 100644
> --- a/drivers/scsi/hisi_sas/Kconfig
> +++ b/drivers/scsi/hisi_sas/Kconfig
> @@ -6,6 +6,7 @@ config SCSI_HISI_SAS
>   	select SCSI_SAS_LIBSAS
>   	select BLK_DEV_INTEGRITY
>   	depends on ATA
> +	select SATA_HOST

That does not feel right.

SCSI_HISI_SAS depends on ATA, but SATA_HOST also depends on ATA, so it 
seems better to just depend on SATA_HOST (and omit explicit ATA 
dependency), rather than select it.

Thanks,
John

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

* Re: [PATCH] scsi: hisi_sas: Fix build error without SATA_HOST
  2020-04-02  7:30 ` John Garry
@ 2020-04-02  8:51   ` Yuehaibing
  2020-04-02  8:53   ` Bartlomiej Zolnierkiewicz
  1 sibling, 0 replies; 8+ messages in thread
From: Yuehaibing @ 2020-04-02  8:51 UTC (permalink / raw)
  To: John Garry, jejb, martin.petersen, chenxiang66
  Cc: linux-scsi, linux-kernel, Bartlomiej Zolnierkiewicz, linux-ide



On 2020/4/2 15:30, John Garry wrote:
> On 02/04/2020 07:30, YueHaibing wrote:
> 
> +
> 
>> If SATA_HOST is n, build fails:
>>
>> drivers/scsi/hisi_sas/hisi_sas_main.o: In function `hisi_sas_fill_ata_reset_cmd':
>> hisi_sas_main.c:(.text+0x2500): undefined reference to `ata_tf_to_fis'
>>
>> Select SATA_HOST to fix this.
>>
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Fixes: 7c594f0407de ("scsi: hisi_sas: add softreset function for SATA disk")
> 
> That's not right. SATA_HOST was only introduced recently in the ATA code. It would fix those kconfig changes.

Ok, thanks

> 
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> ---
>>   drivers/scsi/hisi_sas/Kconfig | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/scsi/hisi_sas/Kconfig b/drivers/scsi/hisi_sas/Kconfig
>> index 90a17452a50d..13ed9073fc72 100644
>> --- a/drivers/scsi/hisi_sas/Kconfig
>> +++ b/drivers/scsi/hisi_sas/Kconfig
>> @@ -6,6 +6,7 @@ config SCSI_HISI_SAS
>>       select SCSI_SAS_LIBSAS
>>       select BLK_DEV_INTEGRITY
>>       depends on ATA
>> +    select SATA_HOST
> 
> That does not feel right.
> 
> SCSI_HISI_SAS depends on ATA, but SATA_HOST also depends on ATA, so it seems better to just depend on SATA_HOST (and omit explicit ATA dependency), rather than select it.

Depends on SATA_HOST will result int this:

scripts/kconfig/mconf  Kconfig
drivers/scsi/hisi_sas/Kconfig:2:error: recursive dependency detected!
drivers/scsi/hisi_sas/Kconfig:2:        symbol SCSI_HISI_SAS depends on SATA_HOST
drivers/ata/Kconfig:37: symbol SATA_HOST is selected by SCSI_SAS_ATA
drivers/scsi/libsas/Kconfig:18: symbol SCSI_SAS_ATA depends on SCSI_SAS_LIBSAS
drivers/scsi/libsas/Kconfig:9:  symbol SCSI_SAS_LIBSAS is selected by SCSI_HISI_SAS
For a resolution refer to Documentation/kbuild/kconfig-language.rst
subsection "Kconfig recursive dependency limitations"


All users of SATA_HOST have the 'select' statement, so we should do the same here.

> 
> Thanks,
> John
> 
> .
> 


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

* Re: [PATCH] scsi: hisi_sas: Fix build error without SATA_HOST
  2020-04-02  7:30 ` John Garry
  2020-04-02  8:51   ` Yuehaibing
@ 2020-04-02  8:53   ` Bartlomiej Zolnierkiewicz
  1 sibling, 0 replies; 8+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-04-02  8:53 UTC (permalink / raw)
  To: John Garry, YueHaibing
  Cc: jejb, martin.petersen, chenxiang66, linux-scsi, linux-kernel, linux-ide


On 4/2/20 9:30 AM, John Garry wrote:
> On 02/04/2020 07:30, YueHaibing wrote:
> 
> +
> 
>> If SATA_HOST is n, build fails:
>>
>> drivers/scsi/hisi_sas/hisi_sas_main.o: In function `hisi_sas_fill_ata_reset_cmd':
>> hisi_sas_main.c:(.text+0x2500): undefined reference to `ata_tf_to_fis'
>>
>> Select SATA_HOST to fix this.

Sorry for missing hisi_sas and thanks for fixing it.

>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Fixes: 7c594f0407de ("scsi: hisi_sas: add softreset function for SATA disk")
> 
> That's not right. SATA_HOST was only introduced recently in the ATA code. It would fix those kconfig changes.

Yes, this should be:

Fixes: bd322af15ce9 ("ata: make SATA_PMP option selectable only if any SATA host driver is enabled")

>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> ---
>>   drivers/scsi/hisi_sas/Kconfig | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/scsi/hisi_sas/Kconfig b/drivers/scsi/hisi_sas/Kconfig
>> index 90a17452a50d..13ed9073fc72 100644
>> --- a/drivers/scsi/hisi_sas/Kconfig
>> +++ b/drivers/scsi/hisi_sas/Kconfig
>> @@ -6,6 +6,7 @@ config SCSI_HISI_SAS
>>       select SCSI_SAS_LIBSAS
>>       select BLK_DEV_INTEGRITY
>>       depends on ATA
>> +    select SATA_HOST
> 
> That does not feel right.
> 
> SCSI_HISI_SAS depends on ATA, but SATA_HOST also depends on ATA, so it seems better to just depend on SATA_HOST (and omit explicit ATA dependency), rather than select it.

SATA_HOST config option is invisible to user so it needs to be
selected.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

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

* [PATCH v2] scsi: hisi_sas: Fix build error without SATA_HOST
  2020-04-02  6:30 [PATCH] scsi: hisi_sas: Fix build error without SATA_HOST YueHaibing
  2020-04-02  7:30 ` John Garry
@ 2020-04-02  8:58 ` YueHaibing
  2020-04-02  9:08   ` Bartlomiej Zolnierkiewicz
                     ` (2 more replies)
  1 sibling, 3 replies; 8+ messages in thread
From: YueHaibing @ 2020-04-02  8:58 UTC (permalink / raw)
  To: john.garry, jejb, martin.petersen, chenxiang66, b.zolnierkie
  Cc: linux-scsi, linux-kernel, YueHaibing

If SATA_HOST is n, build fails:

drivers/scsi/hisi_sas/hisi_sas_main.o: In function `hisi_sas_fill_ata_reset_cmd':
hisi_sas_main.c:(.text+0x2500): undefined reference to `ata_tf_to_fis'

Select SATA_HOST to fix this.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: bd322af15ce9 ("ata: make SATA_PMP option selectable only if any SATA host driver is enabled")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
v2: use correct Fixes tag
---
 drivers/scsi/hisi_sas/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/hisi_sas/Kconfig b/drivers/scsi/hisi_sas/Kconfig
index 90a17452a50d..13ed9073fc72 100644
--- a/drivers/scsi/hisi_sas/Kconfig
+++ b/drivers/scsi/hisi_sas/Kconfig
@@ -6,6 +6,7 @@ config SCSI_HISI_SAS
 	select SCSI_SAS_LIBSAS
 	select BLK_DEV_INTEGRITY
 	depends on ATA
+	select SATA_HOST
 	help
 		This driver supports HiSilicon's SAS HBA, including support based
 		on platform device
-- 
2.17.1



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

* Re: [PATCH v2] scsi: hisi_sas: Fix build error without SATA_HOST
  2020-04-02  8:58 ` [PATCH v2] " YueHaibing
@ 2020-04-02  9:08   ` Bartlomiej Zolnierkiewicz
  2020-04-02  9:09   ` John Garry
  2020-04-13 17:28   ` Martin K. Petersen
  2 siblings, 0 replies; 8+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-04-02  9:08 UTC (permalink / raw)
  To: YueHaibing
  Cc: john.garry, jejb, martin.petersen, chenxiang66, linux-scsi, linux-kernel


On 4/2/20 10:58 AM, YueHaibing wrote:
> If SATA_HOST is n, build fails:
> 
> drivers/scsi/hisi_sas/hisi_sas_main.o: In function `hisi_sas_fill_ata_reset_cmd':
> hisi_sas_main.c:(.text+0x2500): undefined reference to `ata_tf_to_fis'
> 
> Select SATA_HOST to fix this.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: bd322af15ce9 ("ata: make SATA_PMP option selectable only if any SATA host driver is enabled")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

PS I have audited all drivers dependent on ATA again and this is
the only driver needing fixing.

> ---
> v2: use correct Fixes tag
> ---
>  drivers/scsi/hisi_sas/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/scsi/hisi_sas/Kconfig b/drivers/scsi/hisi_sas/Kconfig
> index 90a17452a50d..13ed9073fc72 100644
> --- a/drivers/scsi/hisi_sas/Kconfig
> +++ b/drivers/scsi/hisi_sas/Kconfig
> @@ -6,6 +6,7 @@ config SCSI_HISI_SAS
>  	select SCSI_SAS_LIBSAS
>  	select BLK_DEV_INTEGRITY
>  	depends on ATA
> +	select SATA_HOST
>  	help
>  		This driver supports HiSilicon's SAS HBA, including support based
>  		on platform device
> 

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

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

* Re: [PATCH v2] scsi: hisi_sas: Fix build error without SATA_HOST
  2020-04-02  8:58 ` [PATCH v2] " YueHaibing
  2020-04-02  9:08   ` Bartlomiej Zolnierkiewicz
@ 2020-04-02  9:09   ` John Garry
  2020-04-13 17:28   ` Martin K. Petersen
  2 siblings, 0 replies; 8+ messages in thread
From: John Garry @ 2020-04-02  9:09 UTC (permalink / raw)
  To: YueHaibing, jejb, martin.petersen, chenxiang66, b.zolnierkie
  Cc: linux-scsi, linux-kernel

On 02/04/2020 09:58, YueHaibing wrote:
> If SATA_HOST is n, build fails:
> 
> drivers/scsi/hisi_sas/hisi_sas_main.o: In function `hisi_sas_fill_ata_reset_cmd':
> hisi_sas_main.c:(.text+0x2500): undefined reference to `ata_tf_to_fis'
> 
> Select SATA_HOST to fix this.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: bd322af15ce9 ("ata: make SATA_PMP option selectable only if any SATA host driver is enabled")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Acked-by: John Garry <john.garry@huawei.com>

> ---
> v2: use correct Fixes tag
> ---
>   drivers/scsi/hisi_sas/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/scsi/hisi_sas/Kconfig b/drivers/scsi/hisi_sas/Kconfig
> index 90a17452a50d..13ed9073fc72 100644
> --- a/drivers/scsi/hisi_sas/Kconfig
> +++ b/drivers/scsi/hisi_sas/Kconfig
> @@ -6,6 +6,7 @@ config SCSI_HISI_SAS
>   	select SCSI_SAS_LIBSAS
>   	select BLK_DEV_INTEGRITY
>   	depends on ATA
> +	select SATA_HOST
>   	help
>   		This driver supports HiSilicon's SAS HBA, including support based
>   		on platform device
> 


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

* Re: [PATCH v2] scsi: hisi_sas: Fix build error without SATA_HOST
  2020-04-02  8:58 ` [PATCH v2] " YueHaibing
  2020-04-02  9:08   ` Bartlomiej Zolnierkiewicz
  2020-04-02  9:09   ` John Garry
@ 2020-04-13 17:28   ` Martin K. Petersen
  2 siblings, 0 replies; 8+ messages in thread
From: Martin K. Petersen @ 2020-04-13 17:28 UTC (permalink / raw)
  To: YueHaibing
  Cc: john.garry, jejb, martin.petersen, chenxiang66, b.zolnierkie,
	linux-scsi, linux-kernel


Yue Haibing,

> If SATA_HOST is n, build fails:
>
> drivers/scsi/hisi_sas/hisi_sas_main.o: In function
> `hisi_sas_fill_ata_reset_cmd': hisi_sas_main.c:(.text+0x2500):
> undefined reference to `ata_tf_to_fis'
>
> Select SATA_HOST to fix this.

Applied to 5.7/scsi-fixes. Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2020-04-13 17:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-02  6:30 [PATCH] scsi: hisi_sas: Fix build error without SATA_HOST YueHaibing
2020-04-02  7:30 ` John Garry
2020-04-02  8:51   ` Yuehaibing
2020-04-02  8:53   ` Bartlomiej Zolnierkiewicz
2020-04-02  8:58 ` [PATCH v2] " YueHaibing
2020-04-02  9:08   ` Bartlomiej Zolnierkiewicz
2020-04-02  9:09   ` John Garry
2020-04-13 17:28   ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).