summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev/qereg.h
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2001-01-30 07:17:08 +0000
committerJason Wright <jason@cvs.openbsd.org>2001-01-30 07:17:08 +0000
commit394d9603b5aec314d2073fd8cdb746edc4753246 (patch)
tree13569401a84505774b60347c3e9e9bd5196991bf /sys/arch/sparc/dev/qereg.h
parent2d1565ea86417a77cedfd20e537a46de5a418f5c (diff)
- take advantage of the fact that qe's and be's require qec's and move
some common functionality into qec's driver (rx and tx frame fetching) - avoid modulus operations - some style
Diffstat (limited to 'sys/arch/sparc/dev/qereg.h')
-rw-r--r--sys/arch/sparc/dev/qereg.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/arch/sparc/dev/qereg.h b/sys/arch/sparc/dev/qereg.h
index d43c594e58d..f1f152e17b6 100644
--- a/sys/arch/sparc/dev/qereg.h
+++ b/sys/arch/sparc/dev/qereg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: qereg.h,v 1.5 2000/11/16 15:47:57 jason Exp $ */
+/* $OpenBSD: qereg.h,v 1.6 2001/01/30 07:17:07 jason Exp $ */
/*
* Copyright (c) 1998, 2000 Jason L. Wright.
@@ -317,10 +317,15 @@ struct qe_txd {
/* Buffer and Ring sizes: fixed ring size */
#define QE_TX_RING_MAXSIZE 256 /* maximum tx ring size */
#define QE_RX_RING_MAXSIZE 256 /* maximum rx ring size */
-#define QE_TX_RING_SIZE 16
-#define QE_RX_RING_SIZE 16
+#define QE_TX_RING_SIZE 16 /* power of 2, <= MAXSIZE */
+#define QE_RX_RING_SIZE 16 /* power of 2, <= MAXSIZE */
#define QE_PKT_BUF_SZ 2048
+#define QE_TX_RING_MAXMASK (QE_TX_RING_MAXSIZE-1)
+#define QE_RX_RING_MAXMASK (QE_RX_RING_MAXSIZE-1)
+#define QE_TX_RING_MASK (QE_TX_RING_SIZE-1)
+#define QE_RX_RING_MASK (QE_RX_RING_SIZE-1)
+
/*
* QE descriptor rings
*/