65 DBGC ( pci,
PCI_FMT " NVS VPD could not locate field " 72 if (
len > max_len ) {
73 DBGC ( pci,
PCI_FMT " NVS VPD cannot read %#02zx bytes " 82 DBGC ( pci,
PCI_FMT " NVS VPD could not read field " 102 const void *
data,
size_t len ) {
112 &max_len ) ) != 0 ) {
113 DBGC ( pci,
PCI_FMT " NVS VPD could not locate field " 120 if (
len > max_len ) {
121 DBGC ( pci,
PCI_FMT " NVS VPD cannot write %#02zx bytes " 131 DBGC ( pci,
PCI_FMT " NVS VPD could not write field " 161 DBGC ( pci,
PCI_FMT " NVS VPD could not resize field " 231 " not present; assuming empty\n",
int pci_vpd_find(struct pci_vpd *vpd, unsigned int field, unsigned int *address, size_t *len)
Locate PCI VPD field.
int(* write)(struct nvs_device *nvs, unsigned int address, const void *data, size_t len)
Write data to device.
struct arbelprm_rc_send_wqe rc
void nvs_vpd_nvo_init(struct nvs_vpd_device *nvsvpd, unsigned int field, struct nvo_block *nvo, struct refcnt *refcnt)
Initialise non-volatile option storage within NVS VPD device.
int nvs_vpd_init(struct nvs_vpd_device *nvsvpd, struct pci_device *pci)
Initialise NVS VPD device.
int pci_vpd_read(struct pci_vpd *vpd, unsigned int address, void *buf, size_t len)
Read PCI VPD.
static int nvs_vpd_resize(struct nvs_device *nvs, unsigned int field, size_t len)
Resize VPD field.
A non-volatile storage device.
uint64_t address
Base address.
Non-Volatile Storage using Vital Product Data.
int pci_vpd_resize(struct pci_vpd *vpd, unsigned int field, size_t len, unsigned int *address)
Resize VPD field.
#define container_of(ptr, type, field)
Get containing structure.
struct nvs_device nvs
NVS device.
#define PCI_VPD_FIELD_FMT
PCI VPD field debug message format.
struct pci_vpd vpd
PCI VPD device.
int(* read)(struct nvs_device *nvs, unsigned int address, void *data, size_t len)
Read data from device.
static int nvs_vpd_read(struct nvs_device *nvs, unsigned int field, void *data, size_t len)
Read from VPD field.
Non-volatile stored options.
struct nvs_device * nvs
Underlying non-volatile storage device.
char * strerror(int errno)
Retrieve string representation of error number.
A block of non-volatile stored options.
void nvo_init(struct nvo_block *nvo, struct nvs_device *nvs, size_t address, size_t len, int(*resize)(struct nvo_block *nvo, size_t len), struct refcnt *refcnt)
Initialise non-volatile stored options.
#define PCI_FMT
PCI device debug message format.
int pci_vpd_write(struct pci_vpd *vpd, unsigned int address, const void *buf, size_t len)
Write PCI VPD.
#define PCI_VPD_FIELD_ARGS(field)
PCI VPD field debug message arguments.
unsigned int address
Address within NVS device.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
static int nvs_vpd_nvo_resize(struct nvo_block *nvo, size_t len)
Resize non-volatile option storage within NVS VPD device.
static int nvs_vpd_write(struct nvs_device *nvs, unsigned int field, const void *data, size_t len)
Write to VPD field.
#define ENXIO
No such device or address.
struct pci_device * pci
PCI device.
#define PCI_ARGS(pci)
PCI device debug message arguments.
uint8_t data[48]
Additional event data.
int pci_vpd_init(struct pci_vpd *vpd, struct pci_device *pci)
Initialise PCI Vital Product Data.