26#define IBMs_SIGNATURE ( ( 'I' << 24 ) + ( 'B' << 16 ) + ( 'M' << 8 ) + ' ' )
36#define sIBM_SIGNATURE ( ( ' ' << 24 ) + ( 'I' << 16 ) + ( 'B' << 8 ) + 'M' )
47#define BOFM_SUCCESS 0x00
50#define BOFM_ERR_INVALID_ACTION 0x01
53#define BOFM_ERR_UNSUPPORTED 0x02
56#define BOFM_ERR_DEVICE_ERROR 0x03
59#define BOFM_PCI_RESET 0x80
70#define BOFM_SKIP_INIT 0x80000000UL
103#define BOFM_IOAA_MAGIC ( 'I' + ( 'O' << 8 ) + ( 'A' << 16 ) + ( 'A' << 24 ) )
114#define BOFM_ACTION_UPDT ( 'U' + ( 'P' << 8 ) + ( 'D' << 16 ) + ( 'T' << 24 ) )
117#define BOFM_ACTION_DFLT ( 'D' + ( 'F' << 8 ) + ( 'L' << 16 ) + ( 'T' << 24 ) )
120#define BOFM_ACTION_HVST ( 'H' + ( 'V' << 8 ) + ( 'S' << 16 ) + ( 'T' << 24 ) )
123#define BOFM_ACTION_PARM ( 'P' + ( 'A' << 8 ) + ( 'R' << 16 ) + ( 'M' << 24 ) )
126#define BOFM_ACTION_NONE ( 'N' + ( 'O' << 8 ) + ( 'N' << 16 ) + ( 'E' << 24 ) )
151#define BOFM_EN_MAGIC ( ' ' + ( ' ' << 8 ) + ( 'E' << 16 ) + ( 'N' << 24 ) )
154#define BOFM_DONE_MAGIC ( 'D' + ( 'O' << 8 ) + ( 'N' << 16 ) + ( 'E' << 24 ) )
210#define BOFM_EN_MAP_MASK 0x0001
213#define BOFM_EN_MAP_PFA 0x0000
216#define BOFM_EN_MAP_SLOT_PORT 0x0001
219#define BOFM_EN_EN_B 0x0002
222#define BOFM_EN_VLAN_B 0x0004
225#define BOFM_EN_EN_A 0x0008
228#define BOFM_EN_VLAN_A 0x0010
231#define BOFM_EN_CSM_MASK 0x00c0
234#define BOFM_EN_CSM_UNUSED 0x0000
237#define BOFM_EN_CSM_SUCCESS 0x0040
240#define BOFM_EN_CSM_FAILED 0x0080
243#define BOFM_EN_CHG_MASK 0x0100
246#define BOFM_EN_CHG_UNCHANGED 0x0000
249#define BOFM_EN_CHG_CHANGED 0x0100
252#define BOFM_EN_USAGE_HARVEST 0x1000
255#define BOFM_EN_USAGE_ENTRY 0x0800
258#define BOFM_EN_USAGE_DEFAULT 0x0400
261#define BOFM_EN_HVST 0x2000
264#define BOFM_EN_RQ_HVST_MASK 0xc000
267#define BOFM_EN_RQ_HVST_NONE 0x0000
270#define BOFM_EN_RQ_HVST_DEFAULT 0x4000
273#define BOFM_EN_RQ_HVST_ACTIVE 0xc000
278#define BOFM_MAGIC_FMT "'%c%c%c%c'"
281#define BOFM_MAGIC_ARGS( magic ) \
282 ( ( (magic) >> 0 ) & 0xff ), ( ( (magic) >> 8 ) & 0xff ), \
283 ( ( (magic) >> 16 ) & 0xff ), ( ( (magic) >> 24 ) & 0xff )
318#define BOFM_DRIVERS __table ( struct pci_driver, "bofm_drivers" )
326#define __bofm_driver __table_entry ( BOFM_DRIVERS, 01 )
332#define __bofm_test_driver __table_entry ( BOFM_DRIVERS, 02 )
int bofm(void *bofmtab, struct pci_device *pci)
Process BOFM table.
void bofm_test(struct pci_device *pci)
Perform BOFM test.
static void bofm_init(struct bofm_device *bofm, struct pci_device *pci, struct bofm_operations *op)
Initialise BOFM device.
int bofm_find_driver(struct pci_device *pci)
Find BOFM driver for PCI device.
int bofm(void *bofmtab, struct pci_device *pci)
Process BOFM table.
int bofm_register(struct bofm_device *bofm)
Register BOFM device.
void bofm_unregister(struct bofm_device *bofm)
Unregister BOFM device.
uint8_t mac[ETH_ALEN]
MAC address.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
static uint16_t struct vmbus_xfer_pages_operations * op
Sideband access by platform firmware.
struct list_head list
List of BOFM devices.
struct pci_device * pci
Underlying PCI device.
struct bofm_operations * op
BOFM device operations.
BOFM Ethernet parameter entry.
uint8_t mac_b[6]
MAC address B.
uint8_t slot
Slot or mezzanine number.
uint16_t vlan_a
VLAN tag for MAC address A.
uint8_t mac_a[6]
MAC address A.
uint16_t vlan_b
VLAN tag for MAC address B.
uint16_t busdevfn
PCI bus:dev.fn.
uint8_t mport
Multi-port index.
int(* update)(struct bofm_device *bofm, unsigned int mport, const uint8_t *mac)
Update Ethernet MAC.
int(* harvest)(struct bofm_device *bofm, unsigned int mport, uint8_t *mac)
Harvest Ethernet MAC.
A doubly-linked list entry (or list head)