aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/infiniband/hermon.h
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2012-10-15 13:04:31 +0100
committerMichael Brown <mcb30@ipxe.org>2012-10-25 08:24:00 -0700
commitc4ee23e7c6421016400eb76d28a3e2d12617c8ea (patch)
tree9a73185b8b54464d02002f1eaba9122c13b86eff /src/drivers/infiniband/hermon.h
parent2c011d77ae0147b8cc68bc4f3c577ebf55b83f16 (diff)
downloadipxe-c4ee23e7c6421016400eb76d28a3e2d12617c8ea.tar.gz
[hermon] Use PCI VPD for non-volatile option storage
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/infiniband/hermon.h')
-rw-r--r--src/drivers/infiniband/hermon.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/drivers/infiniband/hermon.h b/src/drivers/infiniband/hermon.h
index 26940f6fa..e0b028f26 100644
--- a/src/drivers/infiniband/hermon.h
+++ b/src/drivers/infiniband/hermon.h
@@ -13,6 +13,8 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <ipxe/uaccess.h>
#include <ipxe/ib_packet.h>
#include <ipxe/bofm.h>
+#include <ipxe/nvsvpd.h>
+#include <ipxe/nvo.h>
#include "mlx_bitops.h"
#include "MT25408_PRM.h"
@@ -135,6 +137,9 @@ FILE_LICENCE ( GPL2_OR_LATER );
#define HERMON_MOD_STAT_CFG_SET 0x01
#define HERMON_MOD_STAT_CFG_QUERY 0x03
+#define HERMON_VPD_FIELD( port ) \
+ PCI_VPD_FIELD ( PCI_VPD_TAG_RW, 'V', ( '5' + (port) - 1 ) )
+
/*
* Datatypes that seem to be missing from the autogenerated documentation
*
@@ -825,6 +830,8 @@ struct hermon_port {
struct ib_queue_pair *eth_qp;
/** Port type */
struct hermon_port_type *type;
+ /** Non-volatile option storage */
+ struct nvo_block nvo;
};
/** A Hermon device */
@@ -891,6 +898,9 @@ struct hermon {
/** QPN base */
unsigned long qpn_base;
+ /** Non-volatile storage in PCI VPD */
+ struct nvs_vpd_device nvsvpd;
+
/** Ports */
struct hermon_port port[HERMON_MAX_PORTS];