summaryrefslogtreecommitdiff
path: root/sys/arch/sgi
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-11-03 21:41:43 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-11-03 21:41:43 +0000
commit04c52c244ea83b18ff8cb921ff5ea3105f81cf6f (patch)
tree3b8f26c1bba535ec52b1b3392cdef46a1d2aae4f /sys/arch/sgi
parent7be953ee520d59e3cc2ead7d9d8532dff0f69fe8 (diff)
Align each RX descriptor to a 4KB boundary; fixes poor RX performance (chip
would stop RX operation if it had to cross a 4KB boundary during receive).
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r--sys/arch/sgi/dev/if_iec.c8
-rw-r--r--sys/arch/sgi/dev/if_iecreg.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/sgi/dev/if_iec.c b/sys/arch/sgi/dev/if_iec.c
index 9fad9e35e36..3cc4c4b0015 100644
--- a/sys/arch/sgi/dev/if_iec.c
+++ b/sys/arch/sgi/dev/if_iec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iec.c,v 1.4 2009/11/03 18:48:38 miod Exp $ */
+/* $OpenBSD: if_iec.c,v 1.5 2009/11/03 21:41:42 miod Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
@@ -194,9 +194,9 @@ struct iec_control_data {
* 16KB boundaries (note layout of struct iec_control_data makes sure
* the rx desc array starts 16KB after the tx desc array).
* - each txdesc should be 128 byte aligned (this is also enforced by
- * struct iec_control_data layout)
- * - each rxdesc should be 128 byte aligned (this is enforced by
- * struct iec_rxdesc layout).
+ * struct iec_control_data layout).
+ * - each rxdesc should be aligned on a 4KB boundary (this is enforced by
+ * struct iec_control_data and struct icd_rxdesc layouts).
*/
#define IEC_DMA_BOUNDARY 0x4000
diff --git a/sys/arch/sgi/dev/if_iecreg.h b/sys/arch/sgi/dev/if_iecreg.h
index 4e4b8efbce2..c9d2326eb0d 100644
--- a/sys/arch/sgi/dev/if_iecreg.h
+++ b/sys/arch/sgi/dev/if_iecreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iecreg.h,v 1.2 2009/11/03 18:46:00 miod Exp $ */
+/* $OpenBSD: if_iecreg.h,v 1.3 2009/11/03 21:41:42 miod Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
@@ -26,7 +26,7 @@
#define IEC_NRXDESC_MAX 512
-#define IEC_RXDESCSIZE (13 * 128) /* should be 128byte aligned. */
+#define IEC_RXDESCSIZE (4096)
#define IEC_RXD_BUFOFFSET (64 + 2) /* to align Ethernet header */
#define IEC_RXD_NRXPAD (IEC_RXD_BUFOFFSET - 2 * sizeof(uint32_t))
#define IEC_RXD_BUFSIZE (IEC_RXDESCSIZE - IEC_RXD_BUFOFFSET)