55 lines · c
1/* SPDX-License-Identifier: GPL-2.0-only */2/* Copyright 2014 Cisco Systems, Inc. All rights reserved. */3 4#ifndef _VNIC_RESOURCE_H_5#define _VNIC_RESOURCE_H_6 7#define VNIC_RES_MAGIC 0x766E6963L /* 'vnic' */8#define VNIC_RES_VERSION 0x00000000L9 10/* vNIC resource types */11enum vnic_res_type {12 RES_TYPE_EOL, /* End-of-list */13 RES_TYPE_WQ, /* Work queues */14 RES_TYPE_RQ, /* Receive queues */15 RES_TYPE_CQ, /* Completion queues */16 RES_TYPE_RSVD1,17 RES_TYPE_NIC_CFG, /* Enet NIC config registers */18 RES_TYPE_RSVD2,19 RES_TYPE_RSVD3,20 RES_TYPE_RSVD4,21 RES_TYPE_RSVD5,22 RES_TYPE_INTR_CTRL, /* Interrupt ctrl table */23 RES_TYPE_INTR_TABLE, /* MSI/MSI-X Interrupt table */24 RES_TYPE_INTR_PBA, /* MSI/MSI-X PBA table */25 RES_TYPE_INTR_PBA_LEGACY, /* Legacy intr status */26 RES_TYPE_RSVD6,27 RES_TYPE_RSVD7,28 RES_TYPE_DEVCMD, /* Device command region */29 RES_TYPE_PASS_THRU_PAGE, /* Pass-thru page */30 RES_TYPE_SUBVNIC, /* subvnic resource type */31 RES_TYPE_MQ_WQ, /* MQ Work queues */32 RES_TYPE_MQ_RQ, /* MQ Receive queues */33 RES_TYPE_MQ_CQ, /* MQ Completion queues */34 RES_TYPE_DEPRECATED1, /* Old version of devcmd 2 */35 RES_TYPE_DEPRECATED2, /* Old version of devcmd 2 */36 RES_TYPE_DEVCMD2, /* Device control region */37 38 RES_TYPE_MAX, /* Count of resource types */39};40 41struct vnic_resource_header {42 u32 magic;43 u32 version;44};45 46struct vnic_resource {47 u8 type;48 u8 bar;49 u8 pad[2];50 u32 bar_offset;51 u32 count;52};53 54#endif /* _VNIC_RESOURCE_H_ */55