2015-06-26 12:08:28

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH] net: via: VIA_RHINE and VIA_VELOCITY should depend on HAS_DMA

If NO_DMA=y:

ERROR: "dma_sync_single_for_cpu" [drivers/net/ethernet/via/via-rhine.ko] undefined!
ERROR: "dma_set_mask" [drivers/net/ethernet/via/via-rhine.ko] undefined!
ERROR: "dma_mapping_error" [drivers/net/ethernet/via/via-rhine.ko] undefined!
ERROR: "dma_map_single" [drivers/net/ethernet/via/via-rhine.ko] undefined!
ERROR: "dma_alloc_coherent" [drivers/net/ethernet/via/via-rhine.ko] undefined!
ERROR: "dma_free_coherent" [drivers/net/ethernet/via/via-rhine.ko] undefined!
ERROR: "dma_unmap_single" [drivers/net/ethernet/via/via-rhine.ko] undefined!
ERROR: "dma_map_page" [drivers/net/ethernet/via/via-velocity.ko] undefined!
ERROR: "dma_sync_single_for_cpu" [drivers/net/ethernet/via/via-velocity.ko] undefined!
ERROR: "dma_free_coherent" [drivers/net/ethernet/via/via-velocity.ko] undefined!
ERROR: "dma_unmap_single" [drivers/net/ethernet/via/via-velocity.ko] undefined!
ERROR: "dma_map_single" [drivers/net/ethernet/via/via-velocity.ko] undefined!
ERROR: "dma_alloc_coherent" [drivers/net/ethernet/via/via-velocity.ko] undefined!

Before, the symbols depended implicitly on HAS_DMA through PCI or
USE_OF. Add explicit dependencies on HAS_DMA to fix this.

Fixes: commit b7d3282a245f4428 ("net: via/Kconfig: replace USE_OF with OF_???")
Signed-off-by: Geert Uytterhoeven <[email protected]>
---
drivers/net/ethernet/via/Kconfig | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/via/Kconfig b/drivers/net/ethernet/via/Kconfig
index 8b0b1d6aca72c4a3..2f1264b882b9555f 100644
--- a/drivers/net/ethernet/via/Kconfig
+++ b/drivers/net/ethernet/via/Kconfig
@@ -18,6 +18,7 @@ if NET_VENDOR_VIA
config VIA_RHINE
tristate "VIA Rhine support"
depends on (PCI || OF_IRQ)
+ depends on HAS_DMA
select CRC32
select MII
---help---
@@ -42,6 +43,7 @@ config VIA_RHINE_MMIO
config VIA_VELOCITY
tristate "VIA Velocity support"
depends on (PCI || (OF_ADDRESS && OF_IRQ))
+ depends on HAS_DMA
select CRC32
select CRC_CCITT
select MII
--
1.9.1


2015-06-26 13:21:37

by Sergei Shtylyov

[permalink] [raw]
Subject: Re: [PATCH] net: via: VIA_RHINE and VIA_VELOCITY should depend on HAS_DMA

Hello.

On 6/26/2015 3:08 PM, Geert Uytterhoeven wrote:

> If NO_DMA=y:

> ERROR: "dma_sync_single_for_cpu" [drivers/net/ethernet/via/via-rhine.ko] undefined!
> ERROR: "dma_set_mask" [drivers/net/ethernet/via/via-rhine.ko] undefined!
> ERROR: "dma_mapping_error" [drivers/net/ethernet/via/via-rhine.ko] undefined!
> ERROR: "dma_map_single" [drivers/net/ethernet/via/via-rhine.ko] undefined!
> ERROR: "dma_alloc_coherent" [drivers/net/ethernet/via/via-rhine.ko] undefined!
> ERROR: "dma_free_coherent" [drivers/net/ethernet/via/via-rhine.ko] undefined!
> ERROR: "dma_unmap_single" [drivers/net/ethernet/via/via-rhine.ko] undefined!
> ERROR: "dma_map_page" [drivers/net/ethernet/via/via-velocity.ko] undefined!
> ERROR: "dma_sync_single_for_cpu" [drivers/net/ethernet/via/via-velocity.ko] undefined!
> ERROR: "dma_free_coherent" [drivers/net/ethernet/via/via-velocity.ko] undefined!
> ERROR: "dma_unmap_single" [drivers/net/ethernet/via/via-velocity.ko] undefined!
> ERROR: "dma_map_single" [drivers/net/ethernet/via/via-velocity.ko] undefined!
> ERROR: "dma_alloc_coherent" [drivers/net/ethernet/via/via-velocity.ko] undefined!

> Before, the symbols depended implicitly on HAS_DMA through PCI or
> USE_OF. Add explicit dependencies on HAS_DMA to fix this.

> Fixes: commit b7d3282a245f4428 ("net: via/Kconfig: replace USE_OF with OF_???")

Fixes: b7d3282a245f ("net: via/Kconfig: replace USE_OF with OF_???")

> Signed-off-by: Geert Uytterhoeven <[email protected]>

WBR, Sergei

2015-06-27 06:38:53

by Antonio Borneo

[permalink] [raw]
Subject: Re: [PATCH] net: via: VIA_RHINE and VIA_VELOCITY should depend on HAS_DMA

On Fri, Jun 26, 2015 at 9:21 PM, Sergei Shtylyov
<[email protected]> wrote:
> Hello.
>
> On 6/26/2015 3:08 PM, Geert Uytterhoeven wrote:
>
>> If NO_DMA=y:
>
>
>> ERROR: "dma_sync_single_for_cpu"
>> [drivers/net/ethernet/via/via-rhine.ko] undefined!
>> ERROR: "dma_set_mask" [drivers/net/ethernet/via/via-rhine.ko]
>> undefined!
>> ERROR: "dma_mapping_error" [drivers/net/ethernet/via/via-rhine.ko]
>> undefined!
>> ERROR: "dma_map_single" [drivers/net/ethernet/via/via-rhine.ko]
>> undefined!
>> ERROR: "dma_alloc_coherent" [drivers/net/ethernet/via/via-rhine.ko]
>> undefined!
>> ERROR: "dma_free_coherent" [drivers/net/ethernet/via/via-rhine.ko]
>> undefined!
>> ERROR: "dma_unmap_single" [drivers/net/ethernet/via/via-rhine.ko]
>> undefined!
>> ERROR: "dma_map_page" [drivers/net/ethernet/via/via-velocity.ko]
>> undefined!
>> ERROR: "dma_sync_single_for_cpu"
>> [drivers/net/ethernet/via/via-velocity.ko] undefined!
>> ERROR: "dma_free_coherent" [drivers/net/ethernet/via/via-velocity.ko]
>> undefined!
>> ERROR: "dma_unmap_single" [drivers/net/ethernet/via/via-velocity.ko]
>> undefined!
>> ERROR: "dma_map_single" [drivers/net/ethernet/via/via-velocity.ko]
>> undefined!
>> ERROR: "dma_alloc_coherent"
>> [drivers/net/ethernet/via/via-velocity.ko] undefined!
>
>
>> Before, the symbols depended implicitly on HAS_DMA through PCI or
>> USE_OF. Add explicit dependencies on HAS_DMA to fix this.
>
>
>> Fixes: commit b7d3282a245f4428 ("net: via/Kconfig: replace USE_OF with
>> OF_???")
>
>
> Fixes: b7d3282a245f ("net: via/Kconfig: replace USE_OF with OF_???")
>
>> Signed-off-by: Geert Uytterhoeven <[email protected]>
>
>
> WBR, Sergei
>

Yes, I can confirm it.
If HAS_DMA is not defined the build is broken.
Your patch fixes the issue.

Thanks,
Antonio

2015-06-29 03:21:36

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] net: via: VIA_RHINE and VIA_VELOCITY should depend on HAS_DMA

From: Geert Uytterhoeven <[email protected]>
Date: Fri, 26 Jun 2015 14:08:22 +0200

> If NO_DMA=y:
...
> Before, the symbols depended implicitly on HAS_DMA through PCI or
> USE_OF. Add explicit dependencies on HAS_DMA to fix this.
>
> Fixes: commit b7d3282a245f4428 ("net: via/Kconfig: replace USE_OF with OF_???")
> Signed-off-by: Geert Uytterhoeven <[email protected]>

Applied, thanks Geert.