From 744edf64675d7fefac6ff9444fcf8516b8bcf862 Mon Sep 17 00:00:00 2001 From: Bob Copeland Date: Wed, 7 Apr 2010 23:55:58 -0400 Subject: [PATCH] --- yaml --- r: 194233 b: refs/heads/master c: a05988bbbef5ac2391fe696646f0b80708f33f2e h: refs/heads/master i: 194231: cc6290a93e25eef2876e6587713b864c2ff64967 v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/ath/ath5k/base.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 93deff36121a..02497a29d1c5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6b5d117eddc09cd976ad8030d715f4350f598a22 +refs/heads/master: a05988bbbef5ac2391fe696646f0b80708f33f2e diff --git a/trunk/drivers/net/wireless/ath/ath5k/base.c b/trunk/drivers/net/wireless/ath/ath5k/base.c index 38c41e3c7988..f7f57c1cca7d 100644 --- a/trunk/drivers/net/wireless/ath/ath5k/base.c +++ b/trunk/drivers/net/wireless/ath/ath5k/base.c @@ -2083,6 +2083,17 @@ ath5k_tx_processq(struct ath5k_softc *sc, struct ath5k_txq *txq) list_for_each_entry_safe(bf, bf0, &txq->q, list) { ds = bf->desc; + /* + * It's possible that the hardware can say the buffer is + * completed when it hasn't yet loaded the ds_link from + * host memory and moved on. If there are more TX + * descriptors in the queue, wait for TXDP to change + * before processing this one. + */ + if (ath5k_hw_get_txdp(sc->ah, txq->qnum) == bf->daddr && + !list_is_last(&bf->list, &txq->q)) + break; + ret = sc->ah->ah_proc_tx_desc(sc->ah, ds, &ts); if (unlikely(ret == -EINPROGRESS)) break;