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 18 #ifndef __CUDBG_LIB_H__ 19 #define __CUDBG_LIB_H__ 20 21 int cudbg_collect_reg_dump(struct cudbg_init *pdbg_init, 22 struct cudbg_buffer *dbg_buff, 23 struct cudbg_error *cudbg_err); 24 int cudbg_collect_fw_devlog(struct cudbg_init *pdbg_init, 25 struct cudbg_buffer *dbg_buff, 26 struct cudbg_error *cudbg_err); 27 int cudbg_collect_cim_la(struct cudbg_init *pdbg_init, 28 struct cudbg_buffer *dbg_buff, 29 struct cudbg_error *cudbg_err); 30 int cudbg_collect_cim_ma_la(struct cudbg_init *pdbg_init, 31 struct cudbg_buffer *dbg_buff, 32 struct cudbg_error *cudbg_err); 33 int cudbg_collect_cim_qcfg(struct cudbg_init *pdbg_init, 34 struct cudbg_buffer *dbg_buff, 35 struct cudbg_error *cudbg_err); 36 int cudbg_collect_cim_ibq_tp0(struct cudbg_init *pdbg_init, 37 struct cudbg_buffer *dbg_buff, 38 struct cudbg_error *cudbg_err); 39 int cudbg_collect_cim_ibq_tp1(struct cudbg_init *pdbg_init, 40 struct cudbg_buffer *dbg_buff, 41 struct cudbg_error *cudbg_err); 42 int cudbg_collect_cim_ibq_ulp(struct cudbg_init *pdbg_init, 43 struct cudbg_buffer *dbg_buff, 44 struct cudbg_error *cudbg_err); 45 int cudbg_collect_cim_ibq_sge0(struct cudbg_init *pdbg_init, 46 struct cudbg_buffer *dbg_buff, 47 struct cudbg_error *cudbg_err); 48 int cudbg_collect_cim_ibq_sge1(struct cudbg_init *pdbg_init, 49 struct cudbg_buffer *dbg_buff, 50 struct cudbg_error *cudbg_err); 51 int cudbg_collect_cim_ibq_ncsi(struct cudbg_init *pdbg_init, 52 struct cudbg_buffer *dbg_buff, 53 struct cudbg_error *cudbg_err); 54 int cudbg_collect_cim_obq_ulp0(struct cudbg_init *pdbg_init, 55 struct cudbg_buffer *dbg_buff, 56 struct cudbg_error *cudbg_err); 57 int cudbg_collect_cim_obq_ulp1(struct cudbg_init *pdbg_init, 58 struct cudbg_buffer *dbg_buff, 59 struct cudbg_error *cudbg_err); 60 int cudbg_collect_cim_obq_ulp2(struct cudbg_init *pdbg_init, 61 struct cudbg_buffer *dbg_buff, 62 struct cudbg_error *cudbg_err); 63 int cudbg_collect_cim_obq_ulp3(struct cudbg_init *pdbg_init, 64 struct cudbg_buffer *dbg_buff, 65 struct cudbg_error *cudbg_err); 66 int cudbg_collect_cim_obq_sge(struct cudbg_init *pdbg_init, 67 struct cudbg_buffer *dbg_buff, 68 struct cudbg_error *cudbg_err); 69 int cudbg_collect_cim_obq_ncsi(struct cudbg_init *pdbg_init, 70 struct cudbg_buffer *dbg_buff, 71 struct cudbg_error *cudbg_err); 72 int cudbg_collect_edc0_meminfo(struct cudbg_init *pdbg_init, 73 struct cudbg_buffer *dbg_buff, 74 struct cudbg_error *cudbg_err); 75 int cudbg_collect_edc1_meminfo(struct cudbg_init *pdbg_init, 76 struct cudbg_buffer *dbg_buff, 77 struct cudbg_error *cudbg_err); 78 int cudbg_collect_rss(struct cudbg_init *pdbg_init, 79 struct cudbg_buffer *dbg_buff, 80 struct cudbg_error *cudbg_err); 81 int cudbg_collect_rss_vf_config(struct cudbg_init *pdbg_init, 82 struct cudbg_buffer *dbg_buff, 83 struct cudbg_error *cudbg_err); 84 int cudbg_collect_tp_indirect(struct cudbg_init *pdbg_init, 85 struct cudbg_buffer *dbg_buff, 86 struct cudbg_error *cudbg_err); 87 int cudbg_collect_path_mtu(struct cudbg_init *pdbg_init, 88 struct cudbg_buffer *dbg_buff, 89 struct cudbg_error *cudbg_err); 90 int cudbg_collect_pm_stats(struct cudbg_init *pdbg_init, 91 struct cudbg_buffer *dbg_buff, 92 struct cudbg_error *cudbg_err); 93 int cudbg_collect_hw_sched(struct cudbg_init *pdbg_init, 94 struct cudbg_buffer *dbg_buff, 95 struct cudbg_error *cudbg_err); 96 int cudbg_collect_sge_indirect(struct cudbg_init *pdbg_init, 97 struct cudbg_buffer *dbg_buff, 98 struct cudbg_error *cudbg_err); 99 int cudbg_collect_ulprx_la(struct cudbg_init *pdbg_init, 100 struct cudbg_buffer *dbg_buff, 101 struct cudbg_error *cudbg_err); 102 int cudbg_collect_tp_la(struct cudbg_init *pdbg_init, 103 struct cudbg_buffer *dbg_buff, 104 struct cudbg_error *cudbg_err); 105 int cudbg_collect_cim_pif_la(struct cudbg_init *pdbg_init, 106 struct cudbg_buffer *dbg_buff, 107 struct cudbg_error *cudbg_err); 108 int cudbg_collect_clk_info(struct cudbg_init *pdbg_init, 109 struct cudbg_buffer *dbg_buff, 110 struct cudbg_error *cudbg_err); 111 int cudbg_collect_obq_sge_rx_q0(struct cudbg_init *pdbg_init, 112 struct cudbg_buffer *dbg_buff, 113 struct cudbg_error *cudbg_err); 114 int cudbg_collect_obq_sge_rx_q1(struct cudbg_init *pdbg_init, 115 struct cudbg_buffer *dbg_buff, 116 struct cudbg_error *cudbg_err); 117 int cudbg_collect_pcie_indirect(struct cudbg_init *pdbg_init, 118 struct cudbg_buffer *dbg_buff, 119 struct cudbg_error *cudbg_err); 120 int cudbg_collect_pm_indirect(struct cudbg_init *pdbg_init, 121 struct cudbg_buffer *dbg_buff, 122 struct cudbg_error *cudbg_err); 123 int cudbg_collect_tid(struct cudbg_init *pdbg_init, 124 struct cudbg_buffer *dbg_buff, 125 struct cudbg_error *cudbg_err); 126 int cudbg_collect_dump_context(struct cudbg_init *pdbg_init, 127 struct cudbg_buffer *dbg_buff, 128 struct cudbg_error *cudbg_err); 129 int cudbg_collect_mps_tcam(struct cudbg_init *pdbg_init, 130 struct cudbg_buffer *dbg_buff, 131 struct cudbg_error *cudbg_err); 132 int cudbg_collect_vpd_data(struct cudbg_init *pdbg_init, 133 struct cudbg_buffer *dbg_buff, 134 struct cudbg_error *cudbg_err); 135 int cudbg_collect_le_tcam(struct cudbg_init *pdbg_init, 136 struct cudbg_buffer *dbg_buff, 137 struct cudbg_error *cudbg_err); 138 int cudbg_collect_cctrl(struct cudbg_init *pdbg_init, 139 struct cudbg_buffer *dbg_buff, 140 struct cudbg_error *cudbg_err); 141 int cudbg_collect_ma_indirect(struct cudbg_init *pdbg_init, 142 struct cudbg_buffer *dbg_buff, 143 struct cudbg_error *cudbg_err); 144 int cudbg_collect_ulptx_la(struct cudbg_init *pdbg_init, 145 struct cudbg_buffer *dbg_buff, 146 struct cudbg_error *cudbg_err); 147 int cudbg_collect_up_cim_indirect(struct cudbg_init *pdbg_init, 148 struct cudbg_buffer *dbg_buff, 149 struct cudbg_error *cudbg_err); 150 int cudbg_collect_pbt_tables(struct cudbg_init *pdbg_init, 151 struct cudbg_buffer *dbg_buff, 152 struct cudbg_error *cudbg_err); 153 int cudbg_collect_mbox_log(struct cudbg_init *pdbg_init, 154 struct cudbg_buffer *dbg_buff, 155 struct cudbg_error *cudbg_err); 156 int cudbg_collect_hma_indirect(struct cudbg_init *pdbg_init, 157 struct cudbg_buffer *dbg_buff, 158 struct cudbg_error *cudbg_err); 159 160 struct cudbg_entity_hdr *cudbg_get_entity_hdr(void *outbuf, int i); 161 void cudbg_align_debug_buffer(struct cudbg_buffer *dbg_buff, 162 struct cudbg_entity_hdr *entity_hdr); 163 u32 cudbg_cim_obq_size(struct adapter *padap, int qid); 164 int cudbg_dump_context_size(struct adapter *padap); 165 166 struct cudbg_tcam; 167 void cudbg_fill_le_tcam_info(struct adapter *padap, 168 struct cudbg_tcam *tcam_region); 169 #endif /* __CUDBG_LIB_H__ */ 170