[hermon] Use PCI VPD for non-volatile option storage
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user