Process BOFM table.
243 size_t en_region_offset;
255 goto err_bad_signature;
263 switch ( bofmhdr.action ) {
284 goto err_find_driver;
296 if ( ! en_region_offset ) {
297 DBG (
"BOFM: No EN section found\n" );
299 goto err_no_en_section;
303 for ( en_offset = ( en_region_offset +
sizeof ( bofmsec ) ) ;
304 en_offset < ( en_region_offset +
sizeof ( bofmsec ) +
305 bofmsec.length ) ; en_offset +=
sizeof (
en ) ) {
307 DBG2 (
"BOFM: EN entry found:\n" );
310 DBG (
"BOFM: slot %d port %d has no PCI mapping\n",
314 DBG (
"BOFM: slot %d port %d%s is " PCI_FMT " mport %d\n",
321 DBG (
"BOFM: " PCI_FMT " mport %d ignored\n", 0,
331 DBG2 (
"BOFM: EN entry after processing:\n" );
#define PCI_FUNC(busdevfn)
#define PCI_BUS(busdevfn)
struct arbelprm_rc_send_wqe rc
static void bofm_remove(struct pci_device *pci)
Remove PCI device.
uint8_t slot
Slot or mezzanine number.
#define BOFM_EN_CSM_FAILED
Entry has been used but failed.
static __always_inline void copy_from_user(void *dest, userptr_t src, off_t src_off, size_t len)
Copy data from user buffer.
#define BOFM_EN_MAGIC
EN start marker.
struct pci_device * pci
Underlying PCI device.
#define BOFM_SUCCESS
Successful.
#define BOFM_ACTION_UPDT
Update MAC/WWN.
uint8_t mport
Multi-port index.
#define BOFM_MAGIC_FMT
BOFM magic value debug message format.
#define BOFM_SKIP_INIT
Skip option ROM initialisation.
#define BOFM_EN_MAP_PFA
Port mapping is by PCI bus:dev.fn.
#define BOFM_ACTION_NONE
Just initialise the device.
uint16_t busdevfn
PCI bus:dev.fn.
#define BOFM_IOAA_MAGIC
BOFM table header signature.
static int bofm_probe(struct pci_device *pci)
Probe PCI device for BOFM driver.
#define BOFM_ERR_DEVICE_ERROR
Device error prohibited MAC/WWN update.
#define PCI_FMT
PCI device debug message format.
#define PCI_SLOT(busdevfn)
static __always_inline void copy_to_user(userptr_t dest, off_t dest_off, const void *src, size_t len)
Copy data to user buffer.
#define BOFM_MAGIC_ARGS(magic)
BOFM magic value debug message arguments.
static struct bofm_device * bofm_find_busdevfn(unsigned int busdevfn)
Find BOFM device matching PCI bus:dev.fn address.
#define BOFM_ACTION_PARM
Update MAC/WWN and initialise device.
static size_t bofm_locate_section(userptr_t bofmtab, size_t len, uint32_t magic, struct bofm_section_header *bofmsec)
Locate BOFM table section.
#define BOFM_EN_MAP_MASK
Port mapping mask.
int bofm(userptr_t bofmtab, struct pci_device *pci)
Process BOFM table.
BOFM Ethernet parameter entry.
#define PCI_ARGS(pci)
PCI device debug message arguments.
#define BOFM_ERR_INVALID_ACTION
Invalid action string.
int bofm_find_driver(struct pci_device *pci)
Find BOFM driver for PCI device.
#define BOFM_EN_CSM_SUCCESS
Entry has been used successfully.
#define DBG(...)
Print a debugging message.
#define BOFM_ACTION_HVST
Harvest MAC/WWN.
#define BOFM_ACTION_DFLT
Restore MAC/WWN to factory default.