vnic_resource.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Copyright 2008 Cisco Systems, Inc. All rights reserved.
  3. * Copyright 2007 Nuova Systems, Inc. All rights reserved.
  4. *
  5. * This program is free software; you may redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; version 2 of the License.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  10. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  11. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  12. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  13. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  14. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  15. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  16. * SOFTWARE.
  17. */
  18. #ifndef _VNIC_RESOURCE_H_
  19. #define _VNIC_RESOURCE_H_
  20. #define VNIC_RES_MAGIC 0x766E6963L /* 'vnic' */
  21. #define VNIC_RES_VERSION 0x00000000L
  22. /* vNIC resource types */
  23. enum vnic_res_type {
  24. RES_TYPE_EOL, /* End-of-list */
  25. RES_TYPE_WQ, /* Work queues */
  26. RES_TYPE_RQ, /* Receive queues */
  27. RES_TYPE_CQ, /* Completion queues */
  28. RES_TYPE_RSVD1,
  29. RES_TYPE_NIC_CFG, /* Enet NIC config registers */
  30. RES_TYPE_RSVD2,
  31. RES_TYPE_RSVD3,
  32. RES_TYPE_RSVD4,
  33. RES_TYPE_RSVD5,
  34. RES_TYPE_INTR_CTRL, /* Interrupt ctrl table */
  35. RES_TYPE_INTR_TABLE, /* MSI/MSI-X Interrupt table */
  36. RES_TYPE_INTR_PBA, /* MSI/MSI-X PBA table */
  37. RES_TYPE_INTR_PBA_LEGACY, /* Legacy intr status */
  38. RES_TYPE_RSVD6,
  39. RES_TYPE_RSVD7,
  40. RES_TYPE_DEVCMD, /* Device command region */
  41. RES_TYPE_PASS_THRU_PAGE, /* Pass-thru page */
  42. RES_TYPE_MAX, /* Count of resource types */
  43. };
  44. struct vnic_resource_header {
  45. u32 magic;
  46. u32 version;
  47. };
  48. struct vnic_resource {
  49. u8 type;
  50. u8 bar;
  51. u8 pad[2];
  52. u32 bar_offset;
  53. u32 count;
  54. };
  55. #endif /* _VNIC_RESOURCE_H_ */