[PATCH] Fix alignment issues with DMA TX on BCM4331
Rafał Miłecki
zajec5 at gmail.com
Sun Aug 14 03:35:50 EDT 2011
W dniu 14 sierpnia 2011 00:17 użytkownik David Woodhouse
<dwmw2 at infradead.org> napisał:
> On Sun, 2011-08-14 at 00:12 +0200, Rafał Miłecki wrote:
>> I've just checked wl and they don't do that anyway. The keep order
>> depending on the alignment bool.
>
> Ah, OK. So they still write TXCTL first, if the device can't support
> unaligned descriptors?
>
> The brcm80211 driver doesn't; it writes TXCTL last, unconditionally.
Uh, you mead me read that code... OK:
if (!di->aligndesc_4k)
_dma_ddtable_init(di, DMA_TX, di->txdpa);
if ((di->dma.dmactrlflags & DMA_CTRL_PEN) == 0)
control |= D64_XC_PD;
OR_REG(&di->d64txregs->control, control);
if (di->aligndesc_4k)
_dma_ddtable_init(di, DMA_TX, di->txdpa);
I stripped the comments, which are simply wrong (copy&paste gone too fast).
Following is RX part, with the sane comment this time:
/* DMA engine with out alignment requirement requires table to be inited
* before enabling the engine
*/
if (!di->aligndesc_4k)
_dma_ddtable_init(di, DMA_RX, di->rxdpa);
_dma_rxenable(di);
if (di->aligndesc_4k)
_dma_ddtable_init(di, DMA_RX, di->rxdpa);
--
Rafał
More information about the b43-dev
mailing list