summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_nxreg.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/if_nxreg.h')
-rw-r--r--sys/dev/pci/if_nxreg.h35
1 files changed, 34 insertions, 1 deletions
diff --git a/sys/dev/pci/if_nxreg.h b/sys/dev/pci/if_nxreg.h
index 82cee19e4a0..e10b9dde8b6 100644
--- a/sys/dev/pci/if_nxreg.h
+++ b/sys/dev/pci/if_nxreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_nxreg.h,v 1.21 2007/05/03 20:50:56 reyk Exp $ */
+/* $OpenBSD: if_nxreg.h,v 1.22 2007/05/03 21:05:41 reyk Exp $ */
/*
* Copyright (c) 2007 Reyk Floeter <reyk@openbsd.org>
@@ -34,6 +34,8 @@
#define NX_MAX_MTU ETHER_MTU
#define NX_JUMBO_MTU 8000 /* less than 9k */
+#define NX_DMA_ALIGN 8 /* 64bit alignment */
+
#define NX_POLL_SENSOR 10 /* read temp sensor every 10s */
/* This driver supported the 3.4.31 (3.4.xx) NIC firmware */
@@ -137,6 +139,37 @@ struct nx_statusdesc {
#define NX_STSDESC_PROTO_M 0x003c
} __packed;
+struct nx_rxcontext {
+ u_int32_t rc_ringaddr_low;
+ u_int32_t rc_ringaddr_high;
+ u_int32_t rc_ringsize;
+ u_int32_t rc_reserved;
+} __packed;
+
+#define NX_NRXCONTEXT 3
+
+/* DMA-mapped ring context for the Rx, Tx, and Status rings */
+struct nx_ringcontext {
+ u_int64_t rc_txconsumer_off;
+ u_int32_t rc_txringaddr_low;
+ u_int32_t rc_txringaddr_high;
+
+ u_int32_t rc_txring_size;
+
+ struct nx_rxcontext rc_rxcontext[NX_NRXCONTEXT];
+
+ u_int32_t rc_statusringaddr_low;
+ u_int32_t rc_statusringaddr_high;
+ u_int32_t rc_statusring_size;
+
+ u_int32_t rc_id; /* context identifier */
+
+ /* d3 state register, dummy dma address */
+ u_int64_t rc_reserved[2];
+
+ u_int32_t rc_align; /* 64bit aligned */
+} __packed;
+
/*
* Memory layout
*/