Module Name: src
Committed By: nonaka
Date: Tue Jan 24 10:18:33 UTC 2017
Modified Files:
src/sys/dev/pci: if_rtwn.c if_rtwnreg.h
Log Message:
rtwn(4): increase the number of tx queue required to clear the full mask.
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/pci/if_rtwn.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/if_rtwnreg.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/if_rtwn.c
diff -u src/sys/dev/pci/if_rtwn.c:1.9 src/sys/dev/pci/if_rtwn.c:1.10
--- src/sys/dev/pci/if_rtwn.c:1.9 Thu Dec 8 01:12:01 2016
+++ src/sys/dev/pci/if_rtwn.c Tue Jan 24 10:18:33 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: if_rtwn.c,v 1.9 2016/12/08 01:12:01 ozaki-r Exp $ */
+/* $NetBSD: if_rtwn.c,v 1.10 2017/01/24 10:18:33 nonaka Exp $ */
/* $OpenBSD: if_rtwn.c,v 1.5 2015/06/14 08:02:47 stsp Exp $ */
#define IEEE80211_NO_HT
/*-
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_rtwn.c,v 1.9 2016/12/08 01:12:01 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_rtwn.c,v 1.10 2017/01/24 10:18:33 nonaka Exp $");
#include <sys/param.h>
#include <sys/sockio.h>
@@ -1989,7 +1989,7 @@ rtwn_tx(struct rtwn_softc *sc, struct mb
tx_ring->cur = (tx_ring->cur + 1) % RTWN_TX_LIST_COUNT;
tx_ring->queued++;
- if (tx_ring->queued >= (RTWN_TX_LIST_COUNT - 1))
+ if (tx_ring->queued > RTWN_TX_LIST_HIMARK)
sc->qfullmsk |= (1 << qid);
/* Kick TX. */
@@ -2035,7 +2035,7 @@ rtwn_tx_done(struct rtwn_softc *sc, int
tx_ring->queued--;
}
- if (tx_ring->queued < (RTWN_TX_LIST_COUNT - 1))
+ if (tx_ring->queued < RTWN_TX_LIST_LOMARK)
sc->qfullmsk &= ~(1 << qid);
}
Index: src/sys/dev/pci/if_rtwnreg.h
diff -u src/sys/dev/pci/if_rtwnreg.h:1.2 src/sys/dev/pci/if_rtwnreg.h:1.3
--- src/sys/dev/pci/if_rtwnreg.h:1.2 Fri Nov 6 14:22:17 2015
+++ src/sys/dev/pci/if_rtwnreg.h Tue Jan 24 10:18:33 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: if_rtwnreg.h,v 1.2 2015/11/06 14:22:17 nonaka Exp $ */
+/* $NetBSD: if_rtwnreg.h,v 1.3 2017/01/24 10:18:33 nonaka Exp $ */
/* $OpenBSD: if_rtwnreg.h,v 1.3 2015/06/14 08:02:47 stsp Exp $ */
/*-
@@ -1168,6 +1168,8 @@ struct r92c_tx_desc {
#define RTWN_NTXQUEUES 9
#define RTWN_RX_LIST_COUNT 256
#define RTWN_TX_LIST_COUNT 256
+#define RTWN_TX_LIST_LOMARK 192
+#define RTWN_TX_LIST_HIMARK 255
#define RTWN_HOST_CMD_RING_COUNT 32
/* TX queue indices. */