Linux SCSI subsystem development
 help / color / mirror / Atom feed
* [PATCH] scsi: ultrastor.c depends on ISA_DMA_API
       [not found] <20160519164501.4cc8bc4f@canb.auug.org.au>
@ 2016-05-19 17:57 ` Randy Dunlap
  2016-05-19 18:53   ` William Breathitt Gray
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2016-05-19 17:57 UTC (permalink / raw)
  To: linux-kernel, James E.J. Bottomley, Martin K. Petersen
  Cc: Stephen Rothwell, linux-next, linux-scsi, vilhelm.gray

From: Randy Dunlap <rdunlap@infradead.org>

Fix build when CONFIG_ISA_DMA_API is not enabled. Fixes these
build errors (on x86_64):

../drivers/scsi/ultrastor.c: In function 'ultrastor_14f_detect':
../drivers/scsi/ultrastor.c:519:5: error: implicit declaration of function 'request_dma' [-Werror=implicit-function-declaration]
     if (config.dma_channel && request_dma(config.dma_channel,"Ultrastor")) {
     ^
../drivers/scsi/ultrastor.c: In function 'ultrastor_release':
../drivers/scsi/ultrastor.c:658:3: error: implicit declaration of function 'free_dma' [-Werror=implicit-function-declaration]
   free_dma(shost->dma_channel);
   ^

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
 drivers/scsi/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Found in linux-next but also applies to mainline.

--- linux-next-20160519.orig/drivers/scsi/Kconfig
+++ linux-next-20160519/drivers/scsi/Kconfig
@@ -1433,7 +1433,7 @@ config SCSI_U14_34F_MAX_TAGS
 
 config SCSI_ULTRASTOR
 	tristate "UltraStor SCSI support"
-	depends on X86 && ISA && SCSI
+	depends on X86 && ISA && SCSI && ISA_DMA_API
 	---help---
 	  This is support for the UltraStor 14F, 24F and 34F SCSI-2 host
 	  adapter family.  This driver is explained in section 3.12 of the

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

* Re: [PATCH] scsi: ultrastor.c depends on ISA_DMA_API
  2016-05-19 17:57 ` [PATCH] scsi: ultrastor.c depends on ISA_DMA_API Randy Dunlap
@ 2016-05-19 18:53   ` William Breathitt Gray
  2016-05-19 19:14     ` William Breathitt Gray
  0 siblings, 1 reply; 3+ messages in thread
From: William Breathitt Gray @ 2016-05-19 18:53 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, James E.J. Bottomley, Martin K. Petersen,
	Stephen Rothwell, linux-next, linux-scsi

On Thu, May 19, 2016 at 10:57:31AM -0700, Randy Dunlap wrote:
>From: Randy Dunlap <rdunlap@infradead.org>
>
>Fix build when CONFIG_ISA_DMA_API is not enabled. Fixes these
>build errors (on x86_64):
>
>../drivers/scsi/ultrastor.c: In function 'ultrastor_14f_detect':
>../drivers/scsi/ultrastor.c:519:5: error: implicit declaration of function 'request_dma' [-Werror=implicit-function-declaration]
>     if (config.dma_channel && request_dma(config.dma_channel,"Ultrastor")) {
>     ^
>../drivers/scsi/ultrastor.c: In function 'ultrastor_release':
>../drivers/scsi/ultrastor.c:658:3: error: implicit declaration of function 'free_dma' [-Werror=implicit-function-declaration]
>   free_dma(shost->dma_channel);
>   ^
>
>Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>---
> drivers/scsi/Kconfig |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>Found in linux-next but also applies to mainline.
>
>--- linux-next-20160519.orig/drivers/scsi/Kconfig
>+++ linux-next-20160519/drivers/scsi/Kconfig
>@@ -1433,7 +1433,7 @@ config SCSI_U14_34F_MAX_TAGS
> 
> config SCSI_ULTRASTOR
> 	tristate "UltraStor SCSI support"
>-	depends on X86 && ISA && SCSI
>+	depends on X86 && ISA && SCSI && ISA_DMA_API
> 	---help---
> 	  This is support for the UltraStor 14F, 24F and 34F SCSI-2 host
> 	  adapter family.  This driver is explained in section 3.12 of the

The CONFIG_ISA dependency may be removed from the CONFIG_SCSI_ULTRASTOR
Kconfig depends line; the drivers/scsi/ultrastor.c file does not appear
to use the ISA bus driver symbols at all.

Although request_dma and free_dma are conditionally dependent on
CONFIG_ISA_DMA_API inside the arch/x86/include/asm/dma.h file, they are
defined inside the kernel/dma.c file which depends on
CONFIG_GENERIC_ISA_DMA in order to build on X86. Therefore,
GENERIC_ISA_DMA should be in the depends line for SCSI_ULTRASTOR instead
of ISA_DMA_API.

William Breathitt Gray

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

* Re: [PATCH] scsi: ultrastor.c depends on ISA_DMA_API
  2016-05-19 18:53   ` William Breathitt Gray
@ 2016-05-19 19:14     ` William Breathitt Gray
  0 siblings, 0 replies; 3+ messages in thread
From: William Breathitt Gray @ 2016-05-19 19:14 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, James E.J. Bottomley, Martin K. Petersen,
	Stephen Rothwell, linux-next, linux-scsi

On Thu, May 19, 2016 at 02:53:35PM -0400, William Breathitt Gray wrote:
>Although request_dma and free_dma are conditionally dependent on
>CONFIG_ISA_DMA_API inside the arch/x86/include/asm/dma.h file, they are
>defined inside the kernel/dma.c file which depends on
>CONFIG_GENERIC_ISA_DMA in order to build on X86. Therefore,
>GENERIC_ISA_DMA should be in the depends line for SCSI_ULTRASTOR instead
>of ISA_DMA_API.
>
>William Breathitt Gray

My apologies, I was too quick to send and didn't realize
CONFIG_GENERIC_ISA_DMA is "def_bool y" in X86. In that case, ISA_DMA_API
should suffice; thus the line becomes:

    depends X86 && SCSI && ISA_DMA_API

William Breathitt Gray

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

end of thread, other threads:[~2016-05-19 19:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20160519164501.4cc8bc4f@canb.auug.org.au>
2016-05-19 17:57 ` [PATCH] scsi: ultrastor.c depends on ISA_DMA_API Randy Dunlap
2016-05-19 18:53   ` William Breathitt Gray
2016-05-19 19:14     ` William Breathitt Gray

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox