aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ath/if_ath.c
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2013-05-08 07:30:33 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2013-05-08 07:30:33 +0000
commitd3731e4b21f49b8a1d54797b3fbf99625199b70f (patch)
tree844d6bbca9dec522f5e7925c10a76f89f620b52c /sys/dev/ath/if_ath.c
parent2c47932c88bd05b32dd8c7199df6f91d8c981100 (diff)
downloadsrc-d3731e4b21f49b8a1d54797b3fbf99625199b70f.tar.gz
src-d3731e4b21f49b8a1d54797b3fbf99625199b70f.zip
Revert a previous commit - this is causing hardware errors.
I'm not sure why this is failing. The holding descriptor should be being re-read when starting DMA of the next frame. Obviously something here isn't totally correct. I'll review the TX queue handling and see if I can figure out why this is failing. I'll then re-revert this patch out and use the holding descriptor again.
Notes
Notes: svn path=/head/; revision=250355
Diffstat (limited to 'sys/dev/ath/if_ath.c')
-rw-r--r--sys/dev/ath/if_ath.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index f0b5328c9820..a71b3f813556 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -4000,20 +4000,19 @@ ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq, int dosched)
break;
}
ATH_TXQ_REMOVE(txq, bf, bf_list);
-
- /*
- * Always mark the last buffer in this list as busy.
- *
- * The hardware may re-read the holding descriptor
- * even if we hit the end of the list and try writing
- * a new TxDP.
- *
- * If there's no holding descriptor then this is the
- * last buffer in the list of buffers after a fresh
- * reset; it'll soon become the holding buffer.
- */
- bf->bf_last->bf_flags |= ATH_BUF_BUSY;
-
+ if (txq->axq_depth > 0) {
+ /*
+ * More frames follow. Mark the buffer busy
+ * so it's not re-used while the hardware may
+ * still re-read the link field in the descriptor.
+ *
+ * Use the last buffer in an aggregate as that
+ * is where the hardware may be - intermediate
+ * descriptors won't be "busy".
+ */
+ bf->bf_last->bf_flags |= ATH_BUF_BUSY;
+ } else
+ txq->axq_link = NULL;
if (bf->bf_state.bfs_aggr)
txq->axq_aggr_depth--;