Skip to contentSkip to conversation

ata: dwc: add DMADEVICES dependency

PATCH Applied Arnd Bergmann 3 participants 3 messages May 11, 2016 – May 12, 2016 libata

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ata: dwc: add DMADEVICES dependency

The dwc_460ex SATA driver has become available on non-powerpc architectures and may cause randconfig build errors when CONFIG_DMADEVICES is not set and SATA_DWC_OLD_DMA is enabled:

warning: (SATA_DWC_OLD_DMA) selects DW_DMAC_CORE which has unmet direct dependencies (DMADEVICES)
ERROR: "dw_dma_probe" [drivers/ata/sata_dwc_460ex.ko] undefined!
ERROR: "dw_dma_remove" [drivers/ata/sata_dwc_460ex.ko] undefined!

This adds an explcit Kconfig dependency to CONFIG_SATA_DWC so we cannot run into broken configurations. While it would also be possible to build the driver with both CONFIG_DMADEVICES and SATA_DWC_OLD_DMA disabled, that case is not useful because there is no fallback to PIO mode when the DMA engine is not usable.

Fixes 50b433753df6 ("ata: sata_dwc_460ex: use "dmas" DT property to find dma channel")
---
 drivers/ata/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/ata/Kconfig +1 -0
index 41b0725e58ad..e2dc4c045146 100644
@@ -313,6 +313,7 @@ config ATA_PIIX
 
 config SATA_DWC
 	tristate "DesignWare Cores SATA support"
+	depends on DMADEVICES
 	select GENERIC_PHY
 	help
 	  This option enables support for the on-chip SATA controller of the
Signature · 1 line
2.7.0
Reviewed-by on v2 1/1
#1 lore raw
Quoted 15 lines · Arnd Bergmann

The dwc_460ex SATA driver has become available on non-powerpc architectures and may cause randconfig build errors when CONFIG_DMADEVICES is not set and SATA_DWC_OLD_DMA is enabled:

warning: (SATA_DWC_OLD_DMA) selects DW_DMAC_CORE which has unmet direct dependencies (DMADEVICES)
ERROR: "dw_dma_probe" [drivers/ata/sata_dwc_460ex.ko] undefined!
ERROR: "dw_dma_remove" [drivers/ata/sata_dwc_460ex.ko] undefined!

This adds an explcit Kconfig dependency to CONFIG_SATA_DWC so we cannot run into broken configurations. While it would also be possible to build the driver with both CONFIG_DMADEVICES and SATA_DWC_OLD_DMA disabled, that case is not useful because there is no fallback to PIO mode when the DMA engine is not usable.

Quoted 2 lines
Fixes 50b433753df6 ("ata: sata_dwc_460ex: use "dmas" DT property to find dma channel")

Looks reasonable to me:

Quoted 19 lines
---
 drivers/ata/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/ata/Kconfig +1 -1
index 41b0725e58ad..e2dc4c045146 100644
@@ -313,6 +313,7 @@ config ATA_PIIX
 
 config SATA_DWC
        tristate "DesignWare Cores SATA support"
+       depends on DMADEVICES
        select GENERIC_PHY
        help
          This option enables support for the on-chip SATA controller of the
--

2.7.0

Signature · 2 lines
With Best Regards,
Andy Shevchenko
Applied
#2 lore raw
In reply to Arnd Bergmann
Quoted 15 lines · Arnd Bergmann

The dwc_460ex SATA driver has become available on non-powerpc architectures and may cause randconfig build errors when CONFIG_DMADEVICES is not set and SATA_DWC_OLD_DMA is enabled:

warning: (SATA_DWC_OLD_DMA) selects DW_DMAC_CORE which has unmet direct dependencies (DMADEVICES)
ERROR: "dw_dma_probe" [drivers/ata/sata_dwc_460ex.ko] undefined!
ERROR: "dw_dma_remove" [drivers/ata/sata_dwc_460ex.ko] undefined!

This adds an explcit Kconfig dependency to CONFIG_SATA_DWC so we cannot run into broken configurations. While it would also be possible to build the driver with both CONFIG_DMADEVICES and SATA_DWC_OLD_DMA disabled, that case is not useful because there is no fallback to PIO mode when the DMA engine is not usable.

Quoted 2 lines
Fixes 50b433753df6 ("ata: sata_dwc_460ex: use "dmas" DT property to find dma channel")

Applied to libata/for-4.7-dw.

Thanks.

Signature · 1 line
tejun