提交 78a7685e 编写于 作者: L Luis R. Rodriguez 提交者: John W. Linville

ath9k: add a debug warning when we cannot stop RX

We have seen several DMA races when we race against
stopping and starting the PCU. I suspect that when
we cannot stop the PCU we may hit some of these same
races so warn against them for now but only when
debugging (CONFIG_ATH_DEBUG) is enabled.

If you run into this warning and are a developer,
please fix the cause of the warning. The potential
here, although I cannot prove yet, is that the DMA
engine can be confused and start writing to a buffer
that was already DMA'd before and at least the kernel
assumes is not being accessed by hardware anymore.

Cc: Ben Greear <greearb@candelatech.com>
Cc: Kyungwan Nam <kyungwan.nam@atheros.com>
Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 b87b0128
...@@ -528,6 +528,8 @@ bool ath_stoprecv(struct ath_softc *sc) ...@@ -528,6 +528,8 @@ bool ath_stoprecv(struct ath_softc *sc)
sc->rx.rxlink = NULL; sc->rx.rxlink = NULL;
spin_unlock_bh(&sc->rx.rxbuflock); spin_unlock_bh(&sc->rx.rxbuflock);
ATH_DBG_WARN(!stopped, "Could not stop RX, we could be "
"confusing the DMA engine when we start RX up\n");
return stopped; return stopped;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册