scsi: advansys needs ISA dma api for ISA support
Subsystems (2)
PATCH 1/1 scsi: advansys needs ISA dma api for ISA support
The advansys drvier uses the request_dma function that is used on ISA machines for the internal DMA controller, which causes build errors on platforms that have ISA slots but do not provide the ISA DMA API:
drivers/scsi/advansys.c: In function 'advansys_board_found':drivers/scsi/advansys.c:11300:10: error: implicit declaration of function 'request_dma' [-Werror=implicit-function-declaration]
The problem now showed up in ARM randconfig builds after commit 6571fb3f8b7f ("advansys: Update to version 3.5 and remove compilation warning") made it possible to build on platforms that have neither VIRT_TO_BUS nor ISA_DMA_API but that do have ISA.
This adds the missing dependency.
drivers/scsi/Kconfig +1 -0
@@ -499,6 +499,7 @@ config SCSI_ADVANSYS tristate "AdvanSys SCSI support" depends on SCSI depends on ISA || EISA || PCI + depends on ISA_DMA_API || !ISA help This is a driver for all SCSI host adapters manufactured by AdvanSys. It is documented in the kernel source in
James Bottomley
maintainerQuoted 21 lines · Arnd Bergmann
The advansys drvier uses the
request_dmafunction that is used on ISA machines for the internal DMA controller, which causes build errors on platforms that have ISA slots but do not provide the ISA DMA API:
drivers/scsi/advansys.c: In function 'advansys_board_found':drivers/scsi/advansys.c:11300:10: error: implicit declaration of function 'request_dma' [-Werror=implicit-function-declaration]The problem now showed up in ARM randconfig builds after commit
6571fb3f8b7f("advansys: Update to version 3.5 and remove compilation warning") made it possible to build on platforms that have neitherVIRT_TO_BUSnorISA_DMA_APIbut that do have ISA.This adds the missing dependency.
Signed-off-by Arnd Bergmann <[email protected]>drivers/scsi/Kconfig +0
-0
drivers/scsi/Kconfig config SCSI_ADVANSYS · line 505
Quoted 7 lines
drivers/scsi/Kconfig +1
-0@@ -499,6 +499,7 @@ config SCSI_ADVANSYS tristate "AdvanSys SCSI support" depends on SCSI depends on ISA || EISA || PCI + depends on ISA_DMA_API || !ISA help This is a driver for all SCSI host adapters manufactured by AdvanSys. It is documented in the kernel source in
This fix looks wrong. the request_dma code is confined within an #ifdef CONFIG_ISA section but the advansys doesn't actually require an ISA DMA channel to function, so you're saying there are systems with ISA but without request_dma()?
If so I think we leave the depends alone and try to bring the board up in NO_ISA_DMA mode. That means the narrowboard check should be gated by CONFIG_ISA_DMA_API ... do we also have to gate free_dma as well?
James
Quoted 10 lines · On Monday 12 October 2015 08:28:01 James Bottomley wrote:
Quoted 10 lines
drivers/scsi/Kconfig +1
-0@@ -499,6 +499,7 @@ config SCSI_ADVANSYS tristate "AdvanSys SCSI support" depends on SCSI depends on ISA || EISA || PCI + depends on ISA_DMA_API || !ISA
Quoted 8 lines
drivers/scsi/Kconfig config SCSI_ADVANSYS · line 505
Quoted 3 lines
drivers/scsi/Kconfig +0
-0help This is a driver for all SCSI host adapters manufactured by AdvanSys. It is documented in the kernel source inThis fix looks wrong. the
request_dmacode is confined within an #ifdefCONFIG_ISAsection but the advansys doesn't actually require an ISA DMA channel to function, so you're saying there are systems with ISA but withoutrequest_dma()?
Yes. Specifically, the ARM EBSA110 and SA1100 platforms can have some PIO based ISA devices, but they have nothing close enough to an i8237 to support the request_dma interface.
Quoted 2 lines
If so I think we leave the depends alone and try to bring the board up in
NO_ISA_DMAmode.
Ok
Quoted 2 lines
That means the narrowboard check should be gated by
CONFIG_ISA_DMA_API... do we also have to gatefree_dmaas well?
Yes. A few more as well, as we also don't want to do inb/outb instructions to a DMA controller that is not there.
I've compile-tested the patch below.
Arnd
8<-------
Quoted 1 line
From
67fed3da5dd65abf5e4d01d8731c5217eb823fdbMon Sep 17 00:00:00 2001
From: Arnd Bergmann <[email protected]>
Date: Sat, 10 Oct 2015 21:13:29 +0200
Subject: [PATCH] scsi: advansys: fix build without ISA DMA API
The advansys drvier uses the request_dma function that is used on ISA machines for the internal DMA controller, which causes build errors on platforms that have ISA slots but do not provide the ISA DMA API:
drivers/scsi/advansys.c: In function 'advansys_board_found':drivers/scsi/advansys.c:11300:10: error: implicit declaration of function 'request_dma' [-Werror=implicit-function-declaration]
The problem now showed up in ARM randconfig builds after commit 6571fb3f8b7f ("advansys: Update to version 3.5 and remove compilation warning") made it possible to build on platforms that have neither VIRT_TO_BUS nor ISA_DMA_API but that do have ISA.
This changes the existing #ifdefs in the driver to check for both CONFIG_ISA and CONFIG_ISA_DMA_API where appropriate. It should still be possible to use the driver in PIO mode with ISA when DMA is not available.
drivers/scsi/advansys.c +20 -14
@@ -2883,9 +2883,9 @@ static void asc_prt_asc_board_eeprom(struct seq_file *m, struct Scsi_Host *shostASC_DVC_VAR *asc_dvc_varp;ASCEEP_CONFIG *ep;int i; -#ifdef CONFIG_ISA +#if defined(CONFIG_ISA ) && defined(CONFIG_ISA_DMA_API )int isa_dma_speed[] = {10 ,8 ,7 ,6 ,5 ,4 ,3 ,2 }; -#endif /* CONFIG_ISA */ +#endif /* ISA */ uchar serialstr[13 ]; asc_dvc_varp = &boardp->dvc_var.asc_dvc_var;
@@ -2937,13 +2937,13 @@ static void asc_prt_asc_board_eeprom(struct seq_file *m, struct Scsi_Host *shost (ep->init_sdtr & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N');seq_putc (m,'\n' ); -#ifdef CONFIG_ISA +#if defined(CONFIG_ISA ) && defined(CONFIG_ISA_DMA_API )if (asc_dvc_varp->bus_type &ASC_IS_ISA ) {seq_printf (m," Host ISA DMA speed: %d MB/S\n" , isa_dma_speed[ASC_EEP_GET_DMA_SPD (ep)]); } -#endif /* CONFIG_ISA */ +#endif /* ISA */ }/*
@@ -8664,7 +8664,7 @@ static unsigned char AscGetChipVersion(PortAddr iop_base,return AscGetChipVerNo (iop_base); } -#ifdef CONFIG_ISA +#if defined(CONFIG_ISA ) && defined(CONFIG_ISA_DMA_API )static void AscEnableIsaDma (uchar dma_channel) {if (dma_channel <4 ) {
@@ -8675,7 +8675,7 @@ static void AscEnableIsaDma(uchar dma_channel) outp(0x00D4, (ushort)(dma_channel - 4)); } } -#endif /* CONFIG_ISA */ +#endif /* ISA */ static int AscStopQueueExe (PortAddr iop_base) {
@@ -8704,7 +8704,7 @@ static unsigned int AscGetMaxDmaCount(ushort bus_type)return ASC_MAX_PCI_DMA_COUNT ; } -#ifdef CONFIG_ISA +#if defined(CONFIG_ISA ) && defined(CONFIG_ISA_DMA_API )static ushort AscGetIsaDmaChannel (PortAddr iop_base) {ushort channel;
@@ -8754,7 +8754,7 @@ static uchar AscSetIsaDmaSpeed(PortAddr iop_base, uchar speed_value)AscSetBank (iop_base,0 ); return AscGetIsaDmaSpeed(iop_base); } -#endif /* CONFIG_ISA */ +#endif /* ISA */ static void AscInitAscDvcVar (ASC_DVC_VAR *asc_dvc) {
@@ -8821,16 +8821,18 @@ static void AscInitAscDvcVar(ASC_DVC_VAR *asc_dvc) } asc_dvc->cfg->isa_dma_speed =ASC_DEF_ISA_DMA_SPEED ; -#ifdef CONFIG_ISA +#if defined(CONFIG_ISA )if ((asc_dvc->bus_type &ASC_IS_ISA ) !=0 ) {if (chip_version >=ASC_CHIP_MIN_VER_ISA_PNP ) {AscSetChipIFC (iop_base,IFC_INIT_DEFAULT ); asc_dvc->bus_type =ASC_IS_ISAPNP ; } +#if defined(CONFIG_ISA_DMA_API ) asc_dvc->cfg->isa_dma_channel = (uchar )AscGetIsaDmaChannel (iop_base); +#endif /* ISA DMA */ } -#endif /* CONFIG_ISA */ +#endif /* ISA */ for (i =0 ; i <=ASC_MAX_TID ; i++) { asc_dvc->cur_dvc_qng[i] =0 ; asc_dvc->max_dvc_qng[i] =ASC_MAX_SCSI1_QNG ;
@@ -9377,7 +9379,7 @@ static int AscInitSetConfig(struct pci_dev *pdev, struct Scsi_Host *shost) asc_dvc->cfg->chip_scsi_id) { asc_dvc->err_code |=ASC_IERR_SET_SCSI_ID ; } -#ifdef CONFIG_ISA +#if defined(CONFIG_ISA ) && defined(CONFIG_ISA_DMA_API )if (asc_dvc->bus_type &ASC_IS_ISA ) {AscSetIsaDmaChannel (iop_base, asc_dvc->cfg->isa_dma_channel);AscSetIsaDmaSpeed (iop_base, asc_dvc->cfg->isa_dma_speed);
@@ -10986,7 +10988,11 @@ static int advansys_board_found(struct Scsi_Host *shost, unsigned int iop,switch (asc_dvc_varp->bus_type) {#ifdef CONFIG_ISA case ASC_IS_ISA : +#if defined(CONFIG_ISA_DMA_API ) shost->unchecked_isa_dma = true; +#else + shost->unchecked_isa_dma = false; +#endif share_irq =0 ;break ;case ASC_IS_VL :
@@ -11292,7 +11298,7 @@ static int advansys_board_found(struct Scsi_Host *shost, unsigned int iop,/* Register DMA Channel for Narrow boards. */ shost->dma_channel =NO_ISA_DMA ;/* Default to no ISA DMA. */ -#ifdef CONFIG_ISA +#if defined(CONFIG_ISA ) && defined(CONFIG_ISA_DMA_API )if (ASC_NARROW_BOARD (boardp)) {/* Register DMA channel for ISA bus. */ if (asc_dvc_varp->bus_type &ASC_IS_ISA ) {
@@ -11379,7 +11385,7 @@ static int advansys_board_found(struct Scsi_Host *shost, unsigned int iop, err_free_irq:free_irq (boardp->irq, shost); err_free_dma: -#ifdef CONFIG_ISA +#if defined(CONFIG_ISA ) && defined(CONFIG_ISA_DMA_API )if (shost->dma_channel !=NO_ISA_DMA )free_dma (shost->dma_channel);#endif
@@ -11403,7 +11409,7 @@ static int advansys_release(struct Scsi_Host *shost)ASC_DBG (1 ,"begin\n" );scsi_remove_host (shost);free_irq (board->irq, shost); -#ifdef CONFIG_ISA +#if defined(CONFIG_ISA ) && defined(CONFIG_ISA_DMA_API )if (shost->dma_channel !=NO_ISA_DMA ) {ASC_DBG (1 ,"free_dma()\n" );free_dma (shost->dma_channel);
James Bottomley
maintainerQuoted 193 lines · Arnd Bergmann
Quoted 10 lines · On Monday 12 October 2015 08:28:01 James Bottomley wrote:
Quoted 10 lines
drivers/scsi/Kconfig +1
-0@@ -499,6 +499,7 @@ config SCSI_ADVANSYS tristate "AdvanSys SCSI support" depends on SCSI depends on ISA || EISA || PCI + depends on ISA_DMA_API || !ISAQuoted 8 lines
drivers/scsi/Kconfig config SCSI_ADVANSYS · line 505
Quoted 3 lines
drivers/scsi/Kconfig +0
-0help This is a driver for all SCSI host adapters manufactured by AdvanSys. It is documented in the kernel source inThis fix looks wrong. the
request_dmacode is confined within an #ifdefCONFIG_ISAsection but the advansys doesn't actually require an ISA DMA channel to function, so you're saying there are systems with ISA but withoutrequest_dma()?Yes. Specifically, the ARM EBSA110 and SA1100 platforms can have some PIO based ISA devices, but they have nothing close enough to an i8237 to support the
request_dmainterface.Quoted 2 lines
If so I think we leave the depends alone and try to bring the board up in
NO_ISA_DMAmode.Ok
Quoted 2 lines
That means the narrowboard check should be gated by
CONFIG_ISA_DMA_API... do we also have to gatefree_dmaas well?Yes. A few more as well, as we also don't want to do inb/outb instructions to a DMA controller that is not there.
I've compile-tested the patch below.
Arnd
8<-------
From67fed3da5dd65abf5e4d01d8731c5217eb823fdbMon Sep 17 00:00:00 2001
From: Arnd Bergmann <[email protected]>
Date: Sat, 10 Oct 2015 21:13:29 +0200
Subject: [PATCH] scsi: advansys: fix build without ISA DMA APIThe advansys drvier uses the
request_dmafunction that is used on ISA machines for the internal DMA controller, which causes build errors on platforms that have ISA slots but do not provide the ISA DMA API:
drivers/scsi/advansys.c: In function 'advansys_board_found':drivers/scsi/advansys.c:11300:10: error: implicit declaration of function 'request_dma' [-Werror=implicit-function-declaration]The problem now showed up in ARM randconfig builds after commit
6571fb3f8b7f("advansys: Update to version 3.5 and remove compilation warning") made it possible to build on platforms that have neitherVIRT_TO_BUSnorISA_DMA_APIbut that do have ISA.This changes the existing #ifdefs in the driver to check for both
CONFIG_ISAandCONFIG_ISA_DMA_APIwhere appropriate. It should still be possible to use the driver in PIO mode with ISA when DMA is not available.Signed-off-by Arnd Bergmann <[email protected]>drivers/scsi/advansys.c +19
-13@@ -2883,9 +2883,9 @@ static void asc_prt_asc_board_eeprom(struct seq_file *m, struct Scsi_Host *shostASC_DVC_VAR *asc_dvc_varp;ASCEEP_CONFIG *ep;int i; -#ifdef CONFIG_ISA +#if defined(CONFIG_ISA ) && defined(CONFIG_ISA_DMA_API )int isa_dma_speed[] = {10 ,8 ,7 ,6 ,5 ,4 ,3 ,2 }; -#endif /* CONFIG_ISA */ +#endif /* ISA */ uchar serialstr[13 ]; asc_dvc_varp = &boardp->dvc_var.asc_dvc_var;@@ -2937,13 +2937,13 @@ static void asc_prt_asc_board_eeprom(struct seq_file *m, struct Scsi_Host *shost (ep->init_sdtr & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N');seq_putc (m,'\n' ); -#ifdef CONFIG_ISA +#if defined(CONFIG_ISA ) && defined(CONFIG_ISA_DMA_API )if (asc_dvc_varp->bus_type &ASC_IS_ISA ) {seq_printf (m," Host ISA DMA speed: %d MB/S\n" , isa_dma_speed[ASC_EEP_GET_DMA_SPD (ep)]); } -#endif /* CONFIG_ISA */ +#endif /* ISA */ }/* @@ -8664,7 +8664,7 @@ static unsigned char AscGetChipVersion(PortAddr iop_base,return AscGetChipVerNo (iop_base); } -#ifdef CONFIG_ISA +#if defined(CONFIG_ISA ) && defined(CONFIG_ISA_DMA_API )static void AscEnableIsaDma (uchar dma_channel) {if (dma_channel <4 ) {@@ -8675,7 +8675,7 @@ static void AscEnableIsaDma(uchar dma_channel) outp(0x00D4, (ushort)(dma_channel - 4)); } } -#endif /* CONFIG_ISA */ +#endif /* ISA */ static int AscStopQueueExe (PortAddr iop_base) {@@ -8704,7 +8704,7 @@ static unsigned int AscGetMaxDmaCount(ushort bus_type)return ASC_MAX_PCI_DMA_COUNT ; } -#ifdef CONFIG_ISA +#if defined(CONFIG_ISA ) && defined(CONFIG_ISA_DMA_API )static ushort AscGetIsaDmaChannel (PortAddr iop_base) {ushort channel;@@ -8754,7 +8754,7 @@ static uchar AscSetIsaDmaSpeed(PortAddr iop_base, uchar speed_value)AscSetBank (iop_base,0 ); return AscGetIsaDmaSpeed(iop_base); } -#endif /* CONFIG_ISA */ +#endif /* ISA */ static void AscInitAscDvcVar (ASC_DVC_VAR *asc_dvc) {@@ -8821,16 +8821,18 @@ static void AscInitAscDvcVar(ASC_DVC_VAR *asc_dvc) } asc_dvc->cfg->isa_dma_speed =ASC_DEF_ISA_DMA_SPEED ; -#ifdef CONFIG_ISA +#if defined(CONFIG_ISA )if ((asc_dvc->bus_type &ASC_IS_ISA ) !=0 ) {if (chip_version >=ASC_CHIP_MIN_VER_ISA_PNP ) {AscSetChipIFC (iop_base,IFC_INIT_DEFAULT ); asc_dvc->bus_type =ASC_IS_ISAPNP ; } +#if defined(CONFIG_ISA_DMA_API ) asc_dvc->cfg->isa_dma_channel = (uchar )AscGetIsaDmaChannel (iop_base); +#endif /* ISA DMA */ } -#endif /* CONFIG_ISA */ +#endif /* ISA */ for (i =0 ; i <=ASC_MAX_TID ; i++) { asc_dvc->cur_dvc_qng[i] =0 ; asc_dvc->max_dvc_qng[i] =ASC_MAX_SCSI1_QNG ;@@ -9377,7 +9379,7 @@ static int AscInitSetConfig(struct pci_dev *pdev, struct Scsi_Host *shost) asc_dvc->cfg->chip_scsi_id) { asc_dvc->err_code |=ASC_IERR_SET_SCSI_ID ; } -#ifdef CONFIG_ISA +#if defined(CONFIG_ISA ) && defined(CONFIG_ISA_DMA_API )if (asc_dvc->bus_type &ASC_IS_ISA ) {AscSetIsaDmaChannel (iop_base, asc_dvc->cfg->isa_dma_channel);AscSetIsaDmaSpeed (iop_base, asc_dvc->cfg->isa_dma_speed);@@ -10986,7 +10988,11 @@ static int advansys_board_found(struct Scsi_Host *shost, unsigned int iop,switch (asc_dvc_varp->bus_type) {#ifdef CONFIG_ISA case ASC_IS_ISA : +#if defined(CONFIG_ISA_DMA_API ) shost->unchecked_isa_dma = true; +#else + shost->unchecked_isa_dma = false; +#endif share_irq =0 ;break ;case ASC_IS_VL :@@ -11292,7 +11298,7 @@ static int advansys_board_found(struct Scsi_Host *shost, unsigned int iop,/* Register DMA Channel for Narrow boards. */ shost->dma_channel =NO_ISA_DMA ;/* Default to no ISA DMA. */ -#ifdef CONFIG_ISA +#if defined(CONFIG_ISA ) && defined(CONFIG_ISA_DMA_API )if (ASC_NARROW_BOARD (boardp)) {/* Register DMA channel for ISA bus. */ if (asc_dvc_varp->bus_type &ASC_IS_ISA ) {@@ -11379,7 +11385,7 @@ static int advansys_board_found(struct Scsi_Host *shost, unsigned int iop, err_free_irq:free_irq (boardp->irq, shost); err_free_dma: -#ifdef CONFIG_ISA +#if defined(CONFIG_ISA ) && defined(CONFIG_ISA_DMA_API )if (shost->dma_channel !=NO_ISA_DMA )free_dma (shost->dma_channel);#endif
drivers/scsi/advansys.c static int advansys_release(struct Scsi_Host *shost) · line 11415
Quoted 8 lines
drivers/scsi/advansys.c +1
-1@@ -11403,7 +11409,7 @@ static int advansys_release(struct Scsi_Host *shost)ASC_DBG (1 ,"begin\n" );scsi_remove_host (shost);free_irq (board->irq, shost); -#ifdef CONFIG_ISA +#if defined(CONFIG_ISA ) && defined(CONFIG_ISA_DMA_API )if (shost->dma_channel !=NO_ISA_DMA ) {ASC_DBG (1 ,"free_dma()\n" );free_dma (shost->dma_channel);
OK, that makes much more of a mess of the driver than I'd anticipated. Unless there's an actual use case for forcing the non-DMA channel on the relevant hardware, let's just go with the dependency based fix.
James
Quoted 22 lines · Arnd Bergmann
The advansys drvier uses the
request_dmafunction that is used on ISA machines for the internal DMA controller, which causes build errors on platforms that have ISA slots but do not provide the ISA DMA API:
drivers/scsi/advansys.c: In function 'advansys_board_found':drivers/scsi/advansys.c:11300:10: error: implicit declaration of function 'request_dma' [-Werror=implicit-function-declaration]The problem now showed up in ARM randconfig builds after commit
6571fb3f8b7f("advansys: Update to version 3.5 and remove compilation warning") made it possible to build on platforms that have neitherVIRT_TO_BUSnorISA_DMA_APIbut that do have ISA.This adds the missing dependency.
Signed-off-by Arnd Bergmann <[email protected]>drivers/scsi/Kconfig +0
-0
drivers/scsi/Kconfig config SCSI_ADVANSYS · line 505
Quoted 7 lines
drivers/scsi/Kconfig +1
-0@@ -499,6 +499,7 @@ config SCSI_ADVANSYS tristate "AdvanSys SCSI support" depends on SCSI depends on ISA || EISA || PCI + depends on ISA_DMA_API || !ISA help This is a driver for all SCSI host adapters manufactured by AdvanSys. It is documented in the kernel source in
Cheers,
Hannes
Signature · 5 lines
Dr. Hannes Reinecke zSeries & Storage hare at suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: F. Imend?rffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG N?rnberg)
Quoted 22 lines · Arnd Bergmann
The advansys drvier uses the
request_dmafunction that is used on ISA machines for the internal DMA controller, which causes build errors on platforms that have ISA slots but do not provide the ISA DMA API:
drivers/scsi/advansys.c: In function 'advansys_board_found':drivers/scsi/advansys.c:11300:10: error: implicit declaration of function 'request_dma' [-Werror=implicit-function-declaration]The problem now showed up in ARM randconfig builds after commit
6571fb3f8b7f("advansys: Update to version 3.5 and remove compilation warning") made it possible to build on platforms that have neitherVIRT_TO_BUSnorISA_DMA_APIbut that do have ISA.This adds the missing dependency.
Signed-off-by Arnd Bergmann <[email protected]>drivers/scsi/Kconfig +0
-0
drivers/scsi/Kconfig config SCSI_ADVANSYS · line 505
Quoted 7 lines
drivers/scsi/Kconfig +1
-0@@ -499,6 +499,7 @@ config SCSI_ADVANSYS tristate "AdvanSys SCSI support" depends on SCSI depends on ISA || EISA || PCI + depends on ISA_DMA_API || !ISA help This is a driver for all SCSI host adapters manufactured by AdvanSys. It is documented in the kernel source in
Sorry to chime in again, but wouldn't this allow to build on platforms which have neither ISA_DMA_API nor ISA, like oldish sparc systems with proprietary S-BUS?
Why not ISA_DMA_API || EISA || PCI ?
Cheers,
Hannes
Signature · 4 lines
Dr. Hannes Reinecke zSeries & Storage hare at suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: J. Hawn, J. Guild, F. Imend?rffer, HRB 16746 (AG N?rnberg)
Quoted 34 lines · Hannes Reinecke
Quoted 22 lines · Arnd Bergmann
The advansys drvier uses the
request_dmafunction that is used on ISA machines for the internal DMA controller, which causes build errors on platforms that have ISA slots but do not provide the ISA DMA API:
drivers/scsi/advansys.c: In function 'advansys_board_found':drivers/scsi/advansys.c:11300:10: error: implicit declaration of function 'request_dma' [-Werror=implicit-function-declaration]The problem now showed up in ARM randconfig builds after commit
6571fb3f8b7f("advansys: Update to version 3.5 and remove compilation warning") made it possible to build on platforms that have neitherVIRT_TO_BUSnorISA_DMA_APIbut that do have ISA.This adds the missing dependency.
Signed-off-by Arnd Bergmann <[email protected]>drivers/scsi/Kconfig +0
-0drivers/scsi/Kconfig config SCSI_ADVANSYS · line 505
Quoted 7 lines
drivers/scsi/Kconfig +1
-0@@ -499,6 +499,7 @@ config SCSI_ADVANSYS tristate "AdvanSys SCSI support" depends on SCSI depends on ISA || EISA || PCI + depends on ISA_DMA_API || !ISA help This is a driver for all SCSI host adapters manufactured by AdvanSys. It is documented in the kernel source inSorry to chime in again, but wouldn't this allow to build on platforms which have neither
ISA_DMA_APInor ISA, like oldish sparc systems with proprietary S-BUS?
Quoted 2 lines
Why not
ISA_DMA_API|| EISA || PCI ?
Gnaa. Ignore this.
Mailer got confused about which mails are more recent than others :-(
Cheers,
Hannes
Signature · 4 lines
Dr. Hannes Reinecke zSeries & Storage hare at suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: J. Hawn, J. Guild, F. Imend?rffer, HRB 16746 (AG N?rnberg)
Quoted 18 lines · On Thursday 15 October 2015 14:09:31 Hannes Reinecke wrote:
Quoted 17 lines · Hannes Reinecke
drivers/scsi/Kconfig config SCSI_ADVANSYS · line 505
Quoted 13 lines · Arnd Bergmann
drivers/scsi/Kconfig +1
-0@@ -499,6 +499,7 @@ config SCSI_ADVANSYS tristate "AdvanSys SCSI support" depends on SCSI depends on ISA || EISA || PCI + depends on ISA_DMA_API || !ISA help This is a driver for all SCSI host adapters manufactured by AdvanSys. It is documented in the kernel source inSorry to chime in again, but wouldn't this allow to build on platforms which have neither
ISA_DMA_APInor ISA, like oldish sparc systems with proprietary S-BUS?
No, the first dependency is still in place. It could also be written as
depends on (ISA && ISA_DMA_API) || EISA || PCI
which might be easier to understand. Do you want me to resubmit it like that?
Quoted 1 line
Quoted 1 line
Why not
ISA_DMA_API|| EISA || PCI ?
That would indeed make it possible to enable it on ancient systems that have none of ISA, EISA or PCI but still support ISA_DMA_API, e.g. for a floppy controller.
A theoretical downside is that a system with a PCI advansys adapter and ISA slots but no ISA_DMA_API would not be able to build this. As far as I know, such a system does not exist.
Quoted 3 lines
Gnaa. Ignore this.
Mailer got confused about which mails are more recent than others
Just to make sure we are on the same page: James thought my second patch was making things too ugly and wanted to get back to this one.
Arnd
Quoted 20 lines · Arnd Bergmann
Quoted 18 lines · On Thursday 15 October 2015 14:09:31 Hannes Reinecke wrote:
Quoted 17 lines · Hannes Reinecke
drivers/scsi/Kconfig config SCSI_ADVANSYS · line 505
Quoted 13 lines · Arnd Bergmann
drivers/scsi/Kconfig +1
-0@@ -499,6 +499,7 @@ config SCSI_ADVANSYS tristate "AdvanSys SCSI support" depends on SCSI depends on ISA || EISA || PCI + depends on ISA_DMA_API || !ISA help This is a driver for all SCSI host adapters manufactured by AdvanSys. It is documented in the kernel source inSorry to chime in again, but wouldn't this allow to build on platforms which have neither
ISA_DMA_APInor ISA, like oldish sparc systems with proprietary S-BUS?
Quoted 6 lines
No, the first dependency is still in place. It could also be written as
depends on (ISA &&
ISA_DMA_API) || EISA || PCIwhich might be easier to understand. Do you want me to resubmit it like that?
Yes, please do so.
Cheers,
Hannes
Signature · 4 lines
Dr. Hannes Reinecke zSeries & Storage hare at suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: J. Hawn, J. Guild, F. Imend?rffer, HRB 16746 (AG N?rnberg)
Quoted 21 lines · On Friday 16 October 2015 13:49:06 Hannes Reinecke wrote:
Quoted 20 lines · Arnd Bergmann
Quoted 18 lines · On Thursday 15 October 2015 14:09:31 Hannes Reinecke wrote:
Quoted 17 lines · Hannes Reinecke
drivers/scsi/Kconfig config SCSI_ADVANSYS · line 505
Quoted 13 lines · Arnd Bergmann
drivers/scsi/Kconfig +1
-0@@ -499,6 +499,7 @@ config SCSI_ADVANSYS tristate "AdvanSys SCSI support" depends on SCSI depends on ISA || EISA || PCI + depends on ISA_DMA_API || !ISA help This is a driver for all SCSI host adapters manufactured by AdvanSys. It is documented in the kernel source inSorry to chime in again, but wouldn't this allow to build on platforms which have neither
ISA_DMA_APInor ISA, like oldish sparc systems with proprietary S-BUS?
Quoted 8 lines
Quoted 6 lines
No, the first dependency is still in place. It could also be written as
depends on (ISA &&
ISA_DMA_API) || EISA || PCIwhich might be easier to understand. Do you want me to resubmit it like that?
Yes, please do so.
I now realized that they are not the same: the new version allows building on systems with PCI and ISA but no ISA_DMA_API, which the driver should be able to handle but doesn't (unless my second patch is applied).
However, I don't think that this combination exists, so we should still be good, and it does express what the hardware can do. I'll send it after my build regression tests are complete.
Arnd