summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev/bereg.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/bereg.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/bereg.h')
-rw-r--r--sys/arch/sparc/dev/bereg.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/arch/sparc/dev/bereg.h b/sys/arch/sparc/dev/bereg.h
index 1cab775c1da..be8d9e5c1cc 100644
--- a/sys/arch/sparc/dev/bereg.h
+++ b/sys/arch/sparc/dev/bereg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bereg.h,v 1.8 1999/01/07 03:14:42 jason Exp $ */
+/* $OpenBSD: bereg.h,v 1.9 2001/01/30 07:17:07 jason Exp $ */
/*
* Copyright (c) 1998 Theo de Raadt and Jason L. Wright.
@@ -257,10 +257,15 @@ struct be_txd {
/* Buffer and Ring sizes: fixed ring size */
#define BE_TX_RING_MAXSIZE 256 /* maximum tx ring size */
#define BE_RX_RING_MAXSIZE 256 /* maximum rx ring size */
-#define BE_TX_RING_SIZE 32
-#define BE_RX_RING_SIZE 32
+#define BE_TX_RING_SIZE 32 /* power of 2, <= MAXSIZE */
+#define BE_RX_RING_SIZE 32 /* power of 2, <= MAXSIZE */
#define BE_PKT_BUF_SZ 2048
+#define BE_TX_RING_MAXMASK (BE_TX_RING_MAXSIZE-1)
+#define BE_RX_RING_MAXMASK (BE_RX_RING_MAXSIZE-1)
+#define BE_TX_RING_MASK (BE_TX_RING_SIZE-1)
+#define BE_RX_RING_MASK (BE_RX_RING_SIZE-1)
+
/*
* BE descriptor rings
*/