Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Copyright 2008-2010 Cisco Systems, Inc.  All rights reserved.
0004  * Copyright 2007 Nuova Systems, Inc.  All rights reserved.
0005  */
0006 
0007 #ifndef _VNIC_RESOURCE_H_
0008 #define _VNIC_RESOURCE_H_
0009 
0010 #define VNIC_RES_MAGIC      0x766E6963L /* 'vnic' */
0011 #define VNIC_RES_VERSION    0x00000000L
0012 #define MGMTVNIC_MAGIC      0x544d474dL /* 'MGMT' */
0013 #define MGMTVNIC_VERSION    0x00000000L
0014 
0015 /* The MAC address assigned to the CFG vNIC is fixed. */
0016 #define MGMTVNIC_MAC        { 0x02, 0x00, 0x54, 0x4d, 0x47, 0x4d }
0017 
0018 /* vNIC resource types */
0019 enum vnic_res_type {
0020     RES_TYPE_EOL,           /* End-of-list */
0021     RES_TYPE_WQ,            /* Work queues */
0022     RES_TYPE_RQ,            /* Receive queues */
0023     RES_TYPE_CQ,            /* Completion queues */
0024     RES_TYPE_RSVD1,
0025     RES_TYPE_NIC_CFG,       /* Enet NIC config registers */
0026     RES_TYPE_RSVD2,
0027     RES_TYPE_RSVD3,
0028     RES_TYPE_RSVD4,
0029     RES_TYPE_RSVD5,
0030     RES_TYPE_INTR_CTRL,     /* Interrupt ctrl table */
0031     RES_TYPE_INTR_TABLE,        /* MSI/MSI-X Interrupt table */
0032     RES_TYPE_INTR_PBA,      /* MSI/MSI-X PBA table */
0033     RES_TYPE_INTR_PBA_LEGACY,   /* Legacy intr status */
0034     RES_TYPE_RSVD6,
0035     RES_TYPE_RSVD7,
0036     RES_TYPE_DEVCMD,        /* Device command region */
0037     RES_TYPE_PASS_THRU_PAGE,    /* Pass-thru page */
0038     RES_TYPE_SUBVNIC,       /* subvnic resource type */
0039     RES_TYPE_MQ_WQ,         /* MQ Work queues */
0040     RES_TYPE_MQ_RQ,         /* MQ Receive queues */
0041     RES_TYPE_MQ_CQ,         /* MQ Completion queues */
0042     RES_TYPE_DEPRECATED1,       /* Old version of devcmd 2 */
0043     RES_TYPE_DEPRECATED2,       /* Old version of devcmd 2 */
0044     RES_TYPE_DEVCMD2,       /* Device control region */
0045 
0046     RES_TYPE_MAX,           /* Count of resource types */
0047 };
0048 
0049 struct vnic_resource_header {
0050     u32 magic;
0051     u32 version;
0052 };
0053 
0054 struct mgmt_barmap_hdr {
0055     u32 magic;          /* magic number */
0056     u32 version;            /* header format version */
0057     u16 lif;            /* loopback lif for mgmt frames */
0058     u16 pci_slot;           /* installed pci slot */
0059     char serial[16];        /* card serial number */
0060 };
0061 
0062 struct vnic_resource {
0063     u8 type;
0064     u8 bar;
0065     u8 pad[2];
0066     u32 bar_offset;
0067     u32 count;
0068 };
0069 
0070 #endif /* _VNIC_RESOURCE_H_ */