Re: [PATCH] ath5k: Use mips generic dma-mapping functions to avoid seqfault on AHB chips
From: Jiri Slaby <hidden>
Date: 2011-02-15 20:42:25
Please don't prune CCs. On 02/15/2011 09:12 PM, Nikolay Ledovskikh wrote:
Dear Jiri, Should I resubmit the patch with another changelog?
Yes, definitely.
1. mem = res->start;
That is what madwifi driver does
dev->mem_start = KSEG1ADDR(res->start);
dev->mem_end = KSEG1ADDR(res->end);
sc->aps_sc.sc_iobase = (void __iomem *) dev->mem_start;That's something completely different to what you did. This assignment makes sense to me. But still prefer ioremap. Doesn't it work for you? I'm no mips guy, sorry.
2.
I set sc->dev to NULL and setup save pointer to real device
structure using SET_IEEE80211_DEV.
Now it's saved in wiphy structure and then used to get
platform_device pointer.
I set sc->dev to NULL according to madwifi sources which look following
sc->aps_sc.sc_bdev = NULL; (if_ath_ahb.c)
and use this value in dma mapping functions.Don't get inspired by madwifi sources, it's crap. The question is if you have to do that to avoid the oops.
Looks like addresses mapped already and we shouldn't do ioremap once more?!
Maybe the address you got from the platform side was already ored by KSEG1... regards, -- js