2011-02-16 10:26:56

by Nickolay Ledovskikh

[permalink] [raw]
Subject: Re: [PATCH] ath5k: Use mips generic dma-mapping functions to avoid seqfault on AHB chips

So, the problems are in openwrt platform patches that should be rewriten:
1. Changes needed to avoid using code like "mem=res->start" without ioremap.
2. Changes needed to avoid using NULL in first argument of
dma_alloc_coherent and others.

Without these changes ahb patch won't get into the kernel and we'll be
lack of wisoc devices support?
Is there any chance for the patch to get into the kernel and what
should be done for it?

(PS: Sorry for my english.)


2011-02-23 10:18:57

by Wojciech Dubowik

[permalink] [raw]
Subject: Re: [PATCH] ath5k: Use mips generic dma-mapping functions to avoid seqfault on AHB chips

> So, the problems are in openwrt platform patches that should be
> rewriten:
> 1. Changes needed to avoid using code like "mem=res->start" without
> ioremap.
> 2. Changes needed to avoid using NULL in first argument of
> dma_alloc_coherent and others.
>
> Without these changes ahb patch won't get into the kernel and we'll be
> lack of wisoc devices support?
> Is there any chance for the patch to get into the kernel and what
> should be done for it?
I can confirm that the problem is not in the driver but in openwrt
code. Dma mapping is assuming it has to shift address to pci bar
no matter whether PCI is enabled or not.
It seems to work on devices which don't have AHB arbitration
and PCI core. Somehow dma doesn't mind that destination address
with extra 0x2 at the beginning. Or at least it doesn't crash.

Also physical addresses need to be consistent in platform code which
is not the case at the moment. I am working now on the patch to fix it
in openwrt.

To get ar231x platform into the kernel is another story but if it
was done for ar71xx it just matter of some effort. Actually is
anyone working on it? It would allow to use platform code in the
wireless driver without extensive patching.

Cheers,
Wojtek

>
> (PS: Sorry for my english.)
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html