summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_ocereg.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/if_ocereg.h')
-rw-r--r--sys/dev/pci/if_ocereg.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/pci/if_ocereg.h b/sys/dev/pci/if_ocereg.h
index 775dd14295c..0b2e1f62b14 100644
--- a/sys/dev/pci/if_ocereg.h
+++ b/sys/dev/pci/if_ocereg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ocereg.h,v 1.2 2012/10/31 20:15:43 mikeb Exp $ */
+/* $OpenBSD: if_ocereg.h,v 1.3 2012/11/02 23:34:57 mikeb Exp $ */
/*-
* Copyright (C) 2012 Emulex
@@ -319,6 +319,9 @@ struct oce_mq_cqe {
} u0;
} __packed;
+#define MQ_CQE_VALID(_cqe) ((_cqe)->u0.dw[3])
+#define MQ_CQE_INVALIDATE(_cqe) ((_cqe)->u0.dw[3] = 0)
+
/* Mailbox Completion Status Codes */
enum MBX_COMPLETION_STATUS {
MBX_CQE_STATUS_SUCCESS = 0x00,
@@ -1844,8 +1847,8 @@ struct oce_nic_tx_cqe {
uint32_t dw[4];
} u0;
} __packed;
-#define WQ_CQE_VALID(_cqe) (_cqe->u0.dw[3])
-#define WQ_CQE_INVALIDATE(_cqe) (_cqe->u0.dw[3] = 0)
+#define WQ_CQE_VALID(_cqe) ((_cqe)->u0.dw[3])
+#define WQ_CQE_INVALIDATE(_cqe) ((_cqe)->u0.dw[3] = 0)
/* Receive Queue Entry (RQE) */
struct oce_nic_rqe {
@@ -2016,9 +2019,8 @@ struct oce_nic_rx_cqe_v1 {
} u0;
} __packed;
-#define RQ_CQE_VALID_MASK 0x80
-#define RQ_CQE_VALID(_cqe) (_cqe->u0.dw[2])
-#define RQ_CQE_INVALIDATE(_cqe) (_cqe->u0.dw[2] = 0)
+#define RQ_CQE_VALID(_cqe) ((_cqe)->u0.dw[2])
+#define RQ_CQE_INVALIDATE(_cqe) ((_cqe)->u0.dw[2] = 0)
struct mbx_config_nic_promiscuous {
struct mbx_hdr hdr;