1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright 2008-2010 Cisco Systems, Inc. All rights reserved.
4 * Copyright 2007 Nuova Systems, Inc. All rights reserved.
7 #ifndef _VNIC_RESOURCE_H_
8 #define _VNIC_RESOURCE_H_
10 #define VNIC_RES_MAGIC 0x766E6963L /* 'vnic' */
11 #define VNIC_RES_VERSION 0x00000000L
12 #define MGMTVNIC_MAGIC 0x544d474dL /* 'MGMT' */
13 #define MGMTVNIC_VERSION 0x00000000L
15 /* The MAC address assigned to the CFG vNIC is fixed. */
16 #define MGMTVNIC_MAC { 0x02, 0x00, 0x54, 0x4d, 0x47, 0x4d }
18 /* vNIC resource types */
20 RES_TYPE_EOL, /* End-of-list */
21 RES_TYPE_WQ, /* Work queues */
22 RES_TYPE_RQ, /* Receive queues */
23 RES_TYPE_CQ, /* Completion queues */
25 RES_TYPE_NIC_CFG, /* Enet NIC config registers */
30 RES_TYPE_INTR_CTRL, /* Interrupt ctrl table */
31 RES_TYPE_INTR_TABLE, /* MSI/MSI-X Interrupt table */
32 RES_TYPE_INTR_PBA, /* MSI/MSI-X PBA table */
33 RES_TYPE_INTR_PBA_LEGACY, /* Legacy intr status */
36 RES_TYPE_DEVCMD, /* Device command region */
37 RES_TYPE_PASS_THRU_PAGE, /* Pass-thru page */
38 RES_TYPE_SUBVNIC, /* subvnic resource type */
39 RES_TYPE_MQ_WQ, /* MQ Work queues */
40 RES_TYPE_MQ_RQ, /* MQ Receive queues */
41 RES_TYPE_MQ_CQ, /* MQ Completion queues */
42 RES_TYPE_DEPRECATED1, /* Old version of devcmd 2 */
43 RES_TYPE_DEPRECATED2, /* Old version of devcmd 2 */
44 RES_TYPE_DEVCMD2, /* Device control region */
46 RES_TYPE_MAX, /* Count of resource types */
49 struct vnic_resource_header {
54 struct mgmt_barmap_hdr {
55 u32 magic; /* magic number */
56 u32 version; /* header format version */
57 u16 lif; /* loopback lif for mgmt frames */
58 u16 pci_slot; /* installed pci slot */
59 char serial[16]; /* card serial number */
62 struct vnic_resource {
70 #endif /* _VNIC_RESOURCE_H_ */