54 .
profile =
"Harvest test profile",
83 .
profile =
"Update test profile",
93 .mac_a = { 0x02, 0x00, 0x69, 0x50, 0x58, 0x45 },
111 printf (
"BOFMTEST performing harvest\n" );
115 printf (
"BOFMTEST harvest result %08x\n", bofmrc );
117 printf (
"BOFMTEST harvested MAC address %s\n",
120 printf (
"BOFMTEST failed to harvest a MAC address\n" );
125 printf (
"BOFMTEST performing update\n" );
129 printf (
"BOFMTEST update result %08x\n", bofmrc );
131 printf (
"BOFMTEST updated MAC address to %s\n",
134 printf (
"BOFMTEST failed to update MAC address\n" );
159 memcpy (
mac, &dummy_mac,
sizeof ( dummy_mac ) );
160 printf (
"BOFMTEST mport %d constructed dummy MAC %s\n",
177 printf (
"BOFMTEST mport %d asked to update MAC to %s\n",
209 printf (
"BOFMTEST using dummy BOFM driver\n" );
262 memset ( &pci, 0,
sizeof ( pci ) );
265 printf (
"BOFMTEST could not create " PCI_FMT " device: %s\n",
#define cpu_to_be16(value)
struct arbelprm_rc_send_wqe rc
static void bofm_init(struct bofm_device *bofm, struct pci_device *pci, struct bofm_operations *op)
Initialise BOFM device.
int printf(const char *fmt,...)
Write a formatted string to the console.
void bofm_test(struct pci_device *pci)
Perform BOFM test.
struct pci_device_id * ids
PCI ID table.
static unsigned short vendor
#define BOFM_EN_EN_A
MAC address A is present.
#define BOFM_EN_USAGE_HARVEST
Ignore values - it's harvest time.
#define BOFM_EN_MAGIC
EN start marker.
static int bofm_dummy_harvest(struct bofm_device *bofm, unsigned int mport, uint8_t *mac)
Harvest dummy Ethernet MAC.
static void bofm_test_init(void)
Perform BOFM test at initialisation time.
struct pci_device * pci
Underlying PCI device.
uint8_t mac[ETH_ALEN]
MAC address.
uint16_t device
Device ID.
static int bofm_dummy_probe(struct pci_device *pci)
Probe dummy BOFM device.
#define BOFM_ACTION_UPDT
Update MAC/WWN.
uint16_t busdevfn
PCI bus:dev.fn address.
#define INIT_NORMAL
Normal initialisation.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
IBM BladeCenter Open Fabric Manager (BOFM)
An initialisation function.
uint16_t device
Device ID.
#define __unused
Declare a variable or data structure as unused.
static struct bofm_device bofm_dummy
Dummy BOFM device.
static struct @439 bofmtab_harvest
Harvest test table.
#define BOFM_EN_MAP_PFA
Port mapping is by PCI bus:dev.fn.
#define BOFM_IOAA_MAGIC
BOFM table header signature.
#define BOFM_DONE_MAGIC
End marker.
char * strerror(int errno)
Retrieve string representation of error number.
static struct @440 bofmtab_update
Update test table.
#define PCI_FMT
PCI device debug message format.
static struct pci_device_id bofm_dummy_ids[1]
Dummy BOFM driver PCI IDs.
const char * eth_ntoa(const void *ll_addr)
Transcribe Ethernet address.
#define BOFM_EN_HVST
Harvest complete.
int pci_read_config(struct pci_device *pci)
Read PCI device configuration.
struct bofm_global_header header
#define BOFM_EN_USAGE_ENTRY
Use entry values for assignment.
int bofm_register(struct bofm_device *bofm)
Register BOFM device.
A PCI device ID list entry.
static struct bofm_operations bofm_dummy_operations
Dummy BOFM operations.
static struct xen_remove_from_physmap * remove
uint16_t vendor
Vendor ID.
uint16_t vendor
PCI vendor ID.
uint32_t busdevfn
Segment, bus, device, and function (bus:dev.fn) number.
uint16_t device
PCI device ID.
int bofm(void *bofmtab, struct pci_device *pci)
Process BOFM table.
int(* harvest)(struct bofm_device *bofm, unsigned int mport, uint8_t *mac)
Harvest Ethernet MAC.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
struct init_fn bofm_test_init_fn __init_fn(INIT_NORMAL)
BOFM test initialisation function.
int(* probe)(struct pci_device *pci)
Probe device.
BOFM Ethernet parameter entry.
struct bofm_section_header en_header
#define PCI_ARGS(pci)
PCI device debug message arguments.
static int bofm_dummy_update(struct bofm_device *bofm __unused, unsigned int mport, const uint8_t *mac)
Update Ethernet MAC for BOFM.
#define BOFM_EN_RQ_HVST_ACTIVE
Harvest active values.
void bofm_unregister(struct bofm_device *bofm)
Unregister BOFM device.
static void bofm_dummy_remove(struct pci_device *pci)
Remove dummy BOFM device.
#define BOFM_EN_CSM_SUCCESS
Entry has been used successfully.
static void pci_init(struct pci_device *pci, unsigned int busdevfn)
Initialise PCI device.
#define BOFM_ACTION_HVST
Harvest MAC/WWN.
struct pci_driver bofm_dummy_driver __bofm_test_driver
Dummy BOFM driver.
struct bofm_section_header done
void * memset(void *dest, int character, size_t len) __nonnull