ARM randconfig fixes for SCSI
cover ARM randconfig fixes for SCSI
Hi James,
These are some fixes for ancient randconfig build bugs I ran into on ARM. Clearly none of these are urgent, but it would be nice to have them merged for 3.17 if they look good to you.
Arnd Bergmann (4):
[SCSI] Don't build AdvanSys on ARM
[SCSI] pas16: don't call free_dma()
[SCSI] qlogicfas: don't call free_dma() [SCSI] NCR53c406a: don't call free_dma() by default
drivers/scsi/Kconfig | 2 +- drivers/scsi/NCR53c406a.c | 2 +- drivers/scsi/pas16.c | 2 -- drivers/scsi/qlogicfas.c | 2 -- 4 files changed, 2 insertions(+), 6 deletions(-)
Signature · 5 lines
1.8.3.2 Cc: Matthew Wilcox <[email protected]> Cc: Finn Thain <[email protected]> Cc: Michael Schmitz <[email protected]>
PATCH 1/4 Don't build AdvanSys on ARM
The advansys SCSI driver uses the dma_cache_sync function, which is not available on the ARM architecture, and cannot be implemented correctly, so we always get this build error:
drivers/scsi/advansys.c: In function 'advansys_get_sense_buffer_dma':drivers/scsi/advansys.c:7882:2: error: implicit declaration of function 'dma_cache_sync' [-Werror=implicit-function-declaration]
dma_cache_sync(board->dev, scp->sense_buffer,
^
It seems nobody has missed this driver so far, so let's just disable it for ARM to help randconfig builds.
--- drivers/scsi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/Kconfig +1 -1
@@ -528,7 +528,7 @@ config SCSI_DPT_I2O config SCSI_ADVANSYS tristate "AdvanSys SCSI support" - depends on SCSI && VIRT_TO_BUS + depends on SCSI && VIRT_TO_BUS && !ARM depends on ISA || EISA || PCI help This is a driver for all SCSI host adapters manufactured by
Signature · 1 line
1.8.3.2
PATCH 1/4 Don't build AdvanSys on ARM
Looks good,
PATCH 2/4 pas16: don't call free_dma()
In reply to Arnd BergmannThe pas16 scsi driver does not use DMA, and the call to free_dma() in its exit function seems to have been copied incorrectly from another driver but never caused trouble.
One case where it gets in the way is randconfig builds on ARM, which depending on the configuration does not provide a free_dma() function, causing this build error:
drivers/scsi/pas16.c: In function 'pas16_release':drivers/scsi/pas16.c:611:3: error: implicit declaration of function 'free_dma' [-Werror=implicit-function-declaration]
free_dma(shost->dma_channel);
Removing the incorrect function calls should be the obvious fix for this, with no downsides.
--- drivers/scsi/pas16.c | 2 -- 1 file changed, 2 deletions(-)
drivers/scsi/pas16.c +0 -2
@@ -607,8 +607,6 @@ static int pas16_release(struct Scsi_Host *shost)if (shost->irq)free_irq (shost->irq, shost);NCR5380_exit (shost); -if (shost->dma_channel !=0xff ) -free_dma (shost->dma_channel);if (shost->io_port && shost->n_io_port)release_region (shost->io_port, shost->n_io_port);scsi_unregister (shost);
Signature · 1 line
1.8.3.2
PATCH 2/4 pas16: don't call free_dma()
Quoted 7 lines · Arnd Bergmann
The pas16 scsi driver does not use DMA, and the call to
free_dma()in its exit function seems to have been copied incorrectly from another driver but never caused trouble.One case where it gets in the way is randconfig builds on ARM, which depending on the configuration does not provide a
free_dma()function, causing this build error:
Looks good,
PATCH 3/4 qlogicfas: don't call free_dma()
In reply to Arnd BergmannThe qlogicfas scsi driver does not use DMA, and the call to free_dma() in its exit function seems to have been copied incorrectly from another driver but never caused trouble.
One case where it gets in the way is randconfig builds on ARM, which depending on the configuration does not provide a free_dma() function, causing this build error:
drivers/scsi/qlogicfas.c: In function 'qlogicfas_release':drivers/scsi/qlogicfas.c:175:3: error: implicit declaration of function 'free_dma' [-Werror=implicit-function-declaration]
free_dma(shost->dma_channel);
^
Removing the incorrect function calls should be the obvious fix for this, with no downsides.
--- drivers/scsi/qlogicfas.c | 2 -- 1 file changed, 2 deletions(-)
drivers/scsi/qlogicfas.c +0 -2
@@ -171,8 +171,6 @@ static int qlogicfas_release(struct Scsi_Host *shost)qlogicfas408_disable_ints (priv);free_irq (shost->irq, shost); } -if (shost->dma_channel !=0xff ) -free_dma (shost->dma_channel);if (shost->io_port && shost->n_io_port)release_region (shost->io_port, shost->n_io_port);scsi_host_put (shost);
Signature · 1 line
1.8.3.2
PATCH 3/4 qlogicfas: don't call free_dma()
Quoted 7 lines · Arnd Bergmann
The qlogicfas scsi driver does not use DMA, and the call to
free_dma()in its exit function seems to have been copied incorrectly from another driver but never caused trouble.One case where it gets in the way is randconfig builds on ARM, which depending on the configuration does not provide a
free_dma()function, causing this build error:
Looks good,
PATCH 4/4 NCR53c406a: don't call free_dma() by default
In reply to Arnd BergmannThe NCR53c406a scsi driver normally does not use DMA, unless the USE_PIO macro is disabled by modifying the source code.
The call to free_dma() for some reason uses #ifdef USE_DMA, which does not do the right thing, since USE_DMA is defined as a boolean that is either 0 or 1, but always present.
One case where it gets in the way is randconfig builds on ARM, which depending on the configuration does not provide a free_dma() function, causing this build error:
drivers/scsi/NCR53c406a.c: In function 'NCR53c406a_release':drivers/scsi/NCR53c406a.c:600:3: error: implicit declaration of function 'free_dma' [-Werror=implicit-function-declaration]
free_dma(shost->dma_channel);
^
This changes the code to use #if USE_DMA, to match the rest of the file, which seems to be what the author intended.
--- drivers/scsi/NCR53c406a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/NCR53c406a.c +1 -1
@@ -595,7 +595,7 @@ static int NCR53c406a_release(struct Scsi_Host *shost) {if (shost->irq)free_irq (shost->irq,NULL ); -#ifdef USE_DMA +#if USE_DMA if (shost->dma_channel !=0xff )free_dma (shost->dma_channel);#endif
Signature · 1 line
1.8.3.2
PATCH 4/4 NCR53c406a: don't call free_dma() by default
Quoted 10 lines · Arnd Bergmann
The NCR53c406a scsi driver normally does not use DMA, unless the
USE_PIOmacro is disabled by modifying the source code.The call to
free_dma()for some reason uses #ifdefUSE_DMA, which does not do the right thing, sinceUSE_DMAis defined as a boolean that is either 0 or 1, but always present.One case where it gets in the way is randconfig builds on ARM, which depending on the configuration does not provide a
free_dma()function, causing this build error:
Looks good,
cover ARM randconfig fixes for SCSI
In reply to Arnd BergmannCan I get another set of reviews for these?
Quoted 13 lines · Arnd Bergmann
Hi James,
These are some fixes for ancient randconfig build bugs I ran into on ARM. Clearly none of these are urgent, but it would be nice to have them merged for 3.17 if they look good to you.
Arnd Bergmann (4):
[SCSI] Don't build AdvanSys on ARM
[SCSI] pas16: don't callfree_dma()
[SCSI] qlogicfas: don't callfree_dma()[SCSI] NCR53c406a: don't callfree_dma()by default
Quoted 16 lines
drivers/scsi/Kconfig | 2 +- drivers/scsi/NCR53c406a.c | 2 +- drivers/scsi/pas16.c | 2 -- drivers/scsi/qlogicfas.c | 2 -- 4 files changed, 2 insertions(+), 6 deletions(-)Signature · 9 lines
1.8.3.2 Cc: Matthew Wilcox <[email protected]> Cc: Finn Thain <[email protected]> Cc: Michael Schmitz <[email protected]> -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
---end quoted text---
cover ARM randconfig fixes for SCSI
Quoted 1 line · Christoph Hellwig
Can I get another set of reviews for these?
(All four patches.)
Quoted 2 lines
Quoted 2 lines
[SCSI] pas16: don't call
free_dma()
[SCSI] qlogicfas: don't callfree_dma()
BTW, I found that the suprious free_dma() calls appeared in 2.5.73 when a generic release implementation was apparently added to drivers that lacked any release method.
--