summaryrefslogtreecommitdiffstats
path: root/sys/mips/atheros
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2015-10-30 22:55:41 +0000
committeradrian <adrian@FreeBSD.org>2015-10-30 22:55:41 +0000
commitea415f2530c9870200e69a1f93ebc3f69c3cf919 (patch)
tree3903c11f96e7e05744e855cf110ae76de19bade4 /sys/mips/atheros
parent22eed60ca37ae4c72b6237088bf88335e7839104 (diff)
downloadFreeBSD-src-ea415f2530c9870200e69a1f93ebc3f69c3cf919.zip
FreeBSD-src-ea415f2530c9870200e69a1f93ebc3f69c3cf919.tar.gz
arge: ensure there's enough space in the TX ring before attempting to
send frames. This matches the other check for space. "enough" is a misnomer, for "reasons". The biggest reason is that the TX ring is actually a circular linked list, with no head/tail pointers. This is just a bit more headroom between head/tail so we have time to schedule frames before we hit where the hardware is at. Ideally this would be tunable and a little larger.
Diffstat (limited to 'sys/mips/atheros')
-rw-r--r--sys/mips/atheros/if_arge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/mips/atheros/if_arge.c b/sys/mips/atheros/if_arge.c
index b300b70..63fbd9f 100644
--- a/sys/mips/atheros/if_arge.c
+++ b/sys/mips/atheros/if_arge.c
@@ -1501,7 +1501,7 @@ arge_encap(struct arge_softc *sc, struct mbuf **m_head)
}
/* Check number of available descriptors. */
- if (sc->arge_cdata.arge_tx_cnt + nsegs >= (ARGE_TX_RING_COUNT - 1)) {
+ if (sc->arge_cdata.arge_tx_cnt + nsegs >= (ARGE_TX_RING_COUNT - 2)) {
bus_dmamap_unload(sc->arge_cdata.arge_tx_tag, txd->tx_dmamap);
sc->stats.tx_pkts_nosegs++;
return (ENOBUFS);
OpenPOWER on IntegriCloud