cudbg_if.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. * Copyright (C) 2017 Chelsio Communications. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms and conditions of the GNU General Public License,
  6. * version 2, as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope it will be useful, but WITHOUT
  9. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  11. * more details.
  12. *
  13. * The full GNU General Public License is included in this distribution in
  14. * the file called "COPYING".
  15. *
  16. */
  17. #ifndef __CUDBG_IF_H__
  18. #define __CUDBG_IF_H__
  19. /* Error codes */
  20. #define CUDBG_STATUS_NO_MEM -19
  21. #define CUDBG_STATUS_ENTITY_NOT_FOUND -24
  22. #define CUDBG_STATUS_NOT_IMPLEMENTED -28
  23. #define CUDBG_SYSTEM_ERROR -29
  24. #define CUDBG_STATUS_CCLK_NOT_DEFINED -32
  25. #define CUDBG_STATUS_PARTIAL_DATA -41
  26. #define CUDBG_MAJOR_VERSION 1
  27. #define CUDBG_MINOR_VERSION 14
  28. enum cudbg_dbg_entity_type {
  29. CUDBG_REG_DUMP = 1,
  30. CUDBG_DEV_LOG = 2,
  31. CUDBG_CIM_LA = 3,
  32. CUDBG_CIM_MA_LA = 4,
  33. CUDBG_CIM_QCFG = 5,
  34. CUDBG_CIM_IBQ_TP0 = 6,
  35. CUDBG_CIM_IBQ_TP1 = 7,
  36. CUDBG_CIM_IBQ_ULP = 8,
  37. CUDBG_CIM_IBQ_SGE0 = 9,
  38. CUDBG_CIM_IBQ_SGE1 = 10,
  39. CUDBG_CIM_IBQ_NCSI = 11,
  40. CUDBG_CIM_OBQ_ULP0 = 12,
  41. CUDBG_CIM_OBQ_ULP1 = 13,
  42. CUDBG_CIM_OBQ_ULP2 = 14,
  43. CUDBG_CIM_OBQ_ULP3 = 15,
  44. CUDBG_CIM_OBQ_SGE = 16,
  45. CUDBG_CIM_OBQ_NCSI = 17,
  46. CUDBG_EDC0 = 18,
  47. CUDBG_EDC1 = 19,
  48. CUDBG_MC0 = 20,
  49. CUDBG_MC1 = 21,
  50. CUDBG_RSS = 22,
  51. CUDBG_RSS_VF_CONF = 25,
  52. CUDBG_PATH_MTU = 27,
  53. CUDBG_PM_STATS = 30,
  54. CUDBG_HW_SCHED = 31,
  55. CUDBG_TP_INDIRECT = 36,
  56. CUDBG_SGE_INDIRECT = 37,
  57. CUDBG_ULPRX_LA = 41,
  58. CUDBG_TP_LA = 43,
  59. CUDBG_MEMINFO = 44,
  60. CUDBG_CIM_PIF_LA = 45,
  61. CUDBG_CLK = 46,
  62. CUDBG_CIM_OBQ_RXQ0 = 47,
  63. CUDBG_CIM_OBQ_RXQ1 = 48,
  64. CUDBG_PCIE_INDIRECT = 50,
  65. CUDBG_PM_INDIRECT = 51,
  66. CUDBG_TID_INFO = 54,
  67. CUDBG_PCIE_CONFIG = 55,
  68. CUDBG_DUMP_CONTEXT = 56,
  69. CUDBG_MPS_TCAM = 57,
  70. CUDBG_VPD_DATA = 58,
  71. CUDBG_LE_TCAM = 59,
  72. CUDBG_CCTRL = 60,
  73. CUDBG_MA_INDIRECT = 61,
  74. CUDBG_ULPTX_LA = 62,
  75. CUDBG_UP_CIM_INDIRECT = 64,
  76. CUDBG_PBT_TABLE = 65,
  77. CUDBG_MBOX_LOG = 66,
  78. CUDBG_HMA_INDIRECT = 67,
  79. CUDBG_HMA = 68,
  80. CUDBG_MAX_ENTITY = 70,
  81. };
  82. struct cudbg_init {
  83. struct adapter *adap; /* Pointer to adapter structure */
  84. void *outbuf; /* Output buffer */
  85. u32 outbuf_size; /* Output buffer size */
  86. u8 compress_type; /* Type of compression to use */
  87. void *compress_buff; /* Compression buffer */
  88. u32 compress_buff_size; /* Compression buffer size */
  89. void *workspace; /* Workspace for zlib */
  90. };
  91. static inline unsigned int cudbg_mbytes_to_bytes(unsigned int size)
  92. {
  93. return size * 1024 * 1024;
  94. }
  95. #endif /* __CUDBG_IF_H__ */