Lines Matching refs:rc

156 	int rc = -1;  in read_sge_ctxt()  local
159 rc =begin_synchronized_op(padap->port[0], 1, 1); in read_sge_ctxt()
160 if (rc != 0) in read_sge_ctxt()
162 rc = t4_sge_ctxt_rd(padap, padap->mbox, cid, ctype, in read_sge_ctxt()
168 if (rc) in read_sge_ctxt()
178 int rc = 0; in get_next_ext_entity_hdr() local
184 rc = CUDBG_STATUS_BUFFER_SHORT; in get_next_ext_entity_hdr()
202 rc = CUDBG_STATUS_BUFFER_SHORT; in get_next_ext_entity_hdr()
222 return rc; in get_next_ext_entity_hdr()
240 int rc = -1; in wr_entity_to_flash() local
255 return rc; in wr_entity_to_flash()
272 rc = cudbg_write_flash(handle, timestamp, dbg_buff, in wr_entity_to_flash()
277 if (rc == CUDBG_STATUS_FLASH_FULL && cudbg_init->verbose) in wr_entity_to_flash()
283 return rc; in wr_entity_to_flash()
302 int index, bit, i, rc = -1; in cudbg_collect() local
325 rc = CUDBG_STATUS_SMALL_BUFF; in cudbg_collect()
361 rc = get_entity_hdr(outbuf, i, dbg_buff.size, in cudbg_collect()
363 if (rc) in cudbg_collect()
364 cudbg_hdr->hdr_flags = rc; in cudbg_collect()
366 rc = get_next_ext_entity_hdr(outbuf, &ext_size, in cudbg_collect()
369 if (rc) in cudbg_collect()
414 rc = process_entity[i-1](cudbg_init, &dbg_buff, in cudbg_collect()
418 if (rc) { in cudbg_collect()
425 rc = CUDBG_SYSTEM_ERROR; in cudbg_collect()
427 entity_hdr->hdr_flags = rc; in cudbg_collect()
479 rc = get_entity_hdr(outbuf, large_entity_code, in cudbg_collect()
481 if (rc) in cudbg_collect()
482 cudbg_hdr->hdr_flags = rc; in cudbg_collect()
484 rc = get_next_ext_entity_hdr(outbuf, &ext_size, in cudbg_collect()
487 if (rc) in cudbg_collect()
518 rc = process_entity[large_entity_code - 1](cudbg_init, in cudbg_collect()
521 if (rc) { in cudbg_collect()
528 rc = CUDBG_SYSTEM_ERROR; in cudbg_collect()
530 entity_hdr->hdr_flags = rc; in cudbg_collect()
586 return rc; in cudbg_collect()
626 int rc = 0; in get_entity_hdr() local
635 return rc; in get_entity_hdr()
646 int rc = 0; in collect_rss() local
649 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_rss()
650 if (rc) in collect_rss()
653 rc = t4_read_rss(padap, (u16 *)scratch_buff.data); in collect_rss()
654 if (rc) { in collect_rss()
658 __func__, rc); in collect_rss()
659 cudbg_err->sys_err = rc; in collect_rss()
663 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_rss()
664 if (rc) in collect_rss()
667 rc = compress_buff(&scratch_buff, dbg_buff); in collect_rss()
672 return rc; in collect_rss()
684 int rc = 0; in collect_sw_state() local
688 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_sw_state()
689 if (rc) in collect_sw_state()
699 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_sw_state()
700 if (rc) in collect_sw_state()
703 rc = compress_buff(&scratch_buff, dbg_buff); in collect_sw_state()
708 return rc; in collect_sw_state()
720 int rc = 0; in collect_ddp_stats() local
724 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_ddp_stats()
725 if (rc) in collect_ddp_stats()
734 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_ddp_stats()
735 if (rc) in collect_ddp_stats()
738 rc = compress_buff(&scratch_buff, dbg_buff); in collect_ddp_stats()
743 return rc; in collect_ddp_stats()
755 int rc = 0; in collect_ulptx_la() local
759 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_ulptx_la()
760 if (rc) in collect_ulptx_la()
782 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_ulptx_la()
783 if (rc) in collect_ulptx_la()
786 rc = compress_buff(&scratch_buff, dbg_buff); in collect_ulptx_la()
791 return rc; in collect_ulptx_la()
804 int rc = 0; in collect_ulprx_la() local
808 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_ulprx_la()
809 if (rc) in collect_ulprx_la()
816 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_ulprx_la()
817 if (rc) in collect_ulprx_la()
820 rc = compress_buff(&scratch_buff, dbg_buff); in collect_ulprx_la()
825 return rc; in collect_ulprx_la()
837 int rc = 0; in collect_cpl_stats() local
841 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_cpl_stats()
842 if (rc) in collect_cpl_stats()
850 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_cpl_stats()
851 if (rc) in collect_cpl_stats()
854 rc = compress_buff(&scratch_buff, dbg_buff); in collect_cpl_stats()
859 return rc; in collect_cpl_stats()
874 int rc = 0; in collect_wc_stats() local
878 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_wc_stats()
879 if (rc) in collect_wc_stats()
894 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_wc_stats()
895 if (rc) in collect_wc_stats()
898 rc = compress_buff(&scratch_buff, dbg_buff); in collect_wc_stats()
902 return rc; in collect_wc_stats()
919 int n, i, rc = 0; in fill_meminfo() local
990 rc = CUDBG_STATUS_ENTITY_NOT_FOUND; in fill_meminfo()
1164 return rc; in fill_meminfo()
1175 int rc = 0; in collect_meminfo() local
1180 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_meminfo()
1181 if (rc) in collect_meminfo()
1186 rc = fill_meminfo(padap, meminfo_buff); in collect_meminfo()
1187 if (rc) in collect_meminfo()
1190 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_meminfo()
1191 if (rc) in collect_meminfo()
1194 rc = compress_buff(&scratch_buff, dbg_buff); in collect_meminfo()
1198 return rc; in collect_meminfo()
1211 int rc = 0; in collect_lb_stats() local
1213 rc = padap->params.nports; in collect_lb_stats()
1214 if (rc < 0) in collect_lb_stats()
1217 n = rc; in collect_lb_stats()
1221 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_lb_stats()
1222 if (rc) in collect_lb_stats()
1235 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_lb_stats()
1236 if (rc) in collect_lb_stats()
1239 rc = compress_buff(&scratch_buff, dbg_buff); in collect_lb_stats()
1243 return rc; in collect_lb_stats()
1255 int rc = 0; in collect_rdma_stats() local
1259 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_rdma_stats()
1260 if (rc) in collect_rdma_stats()
1269 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_rdma_stats()
1270 if (rc) in collect_rdma_stats()
1273 rc = compress_buff(&scratch_buff, dbg_buff); in collect_rdma_stats()
1277 return rc; in collect_rdma_stats()
1290 int rc = 0; in collect_clk_info() local
1293 rc = CUDBG_STATUS_CCLK_NOT_DEFINED; in collect_clk_info()
1298 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_clk_info()
1299 if (rc) in collect_clk_info()
1335 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_clk_info()
1337 if (rc) in collect_clk_info()
1340 rc = compress_buff(&scratch_buff, dbg_buff); in collect_clk_info()
1344 return rc; in collect_clk_info()
1357 int rc = 0; in collect_macstats() local
1359 rc = padap->params.nports; in collect_macstats()
1360 if (rc < 0) in collect_macstats()
1363 n = rc; in collect_macstats()
1366 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_macstats()
1367 if (rc) in collect_macstats()
1381 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_macstats()
1382 if (rc) in collect_macstats()
1385 rc = compress_buff(&scratch_buff, dbg_buff); in collect_macstats()
1389 return rc; in collect_macstats()
1401 int rc = 0; in collect_cim_pif_la() local
1406 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_cim_pif_la()
1407 if (rc) in collect_cim_pif_la()
1417 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_cim_pif_la()
1418 if (rc) in collect_cim_pif_la()
1421 rc = compress_buff(&scratch_buff, dbg_buff); in collect_cim_pif_la()
1425 return rc; in collect_cim_pif_la()
1437 int rc = 0; in collect_tp_la() local
1441 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_tp_la()
1442 if (rc) in collect_tp_la()
1450 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_tp_la()
1451 if (rc) in collect_tp_la()
1454 rc = compress_buff(&scratch_buff, dbg_buff); in collect_tp_la()
1458 return rc; in collect_tp_la()
1470 int rc = 0; in collect_fcoe_stats() local
1474 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_fcoe_stats()
1475 if (rc) in collect_fcoe_stats()
1488 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_fcoe_stats()
1489 if (rc) in collect_fcoe_stats()
1492 rc = compress_buff(&scratch_buff, dbg_buff); in collect_fcoe_stats()
1496 return rc; in collect_fcoe_stats()
1508 int rc = 0; in collect_tp_err_stats() local
1512 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_tp_err_stats()
1513 if (rc) in collect_tp_err_stats()
1521 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_tp_err_stats()
1522 if (rc) in collect_tp_err_stats()
1525 rc = compress_buff(&scratch_buff, dbg_buff); in collect_tp_err_stats()
1529 return rc; in collect_tp_err_stats()
1541 int rc = 0; in collect_tcp_stats() local
1545 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_tcp_stats()
1546 if (rc) in collect_tcp_stats()
1555 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_tcp_stats()
1556 if (rc) in collect_tcp_stats()
1559 rc = compress_buff(&scratch_buff, dbg_buff); in collect_tcp_stats()
1563 return rc; in collect_tcp_stats()
1575 int i, rc = 0; in collect_hw_sched() local
1578 rc = CUDBG_STATUS_CCLK_NOT_DEFINED; in collect_hw_sched()
1583 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_hw_sched()
1584 if (rc) in collect_hw_sched()
1598 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_hw_sched()
1599 if (rc) in collect_hw_sched()
1602 rc = compress_buff(&scratch_buff, dbg_buff); in collect_hw_sched()
1606 return rc; in collect_hw_sched()
1618 int rc = 0; in collect_pm_stats() local
1622 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_pm_stats()
1623 if (rc) in collect_pm_stats()
1631 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_pm_stats()
1632 if (rc) in collect_pm_stats()
1635 rc = compress_buff(&scratch_buff, dbg_buff); in collect_pm_stats()
1639 return rc; in collect_pm_stats()
1650 int rc = 0; in collect_path_mtu() local
1654 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_path_mtu()
1655 if (rc) in collect_path_mtu()
1660 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_path_mtu()
1661 if (rc) in collect_path_mtu()
1664 rc = compress_buff(&scratch_buff, dbg_buff); in collect_path_mtu()
1668 return rc; in collect_path_mtu()
1680 int rc = 0; in collect_rss_key() local
1683 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_rss_key()
1684 if (rc) in collect_rss_key()
1689 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_rss_key()
1690 if (rc) in collect_rss_key()
1693 rc = compress_buff(&scratch_buff, dbg_buff); in collect_rss_key()
1697 return rc; in collect_rss_key()
1708 int rc; in collect_rss_config() local
1713 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_rss_config()
1714 if (rc) in collect_rss_config()
1727 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_rss_config()
1728 if (rc) in collect_rss_config()
1731 rc = compress_buff(&scratch_buff, dbg_buff); in collect_rss_config()
1736 return rc; in collect_rss_config()
1747 int vf, rc, vf_count = 0; in collect_rss_vf_config() local
1753 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_rss_vf_config()
1754 if (rc) in collect_rss_vf_config()
1764 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_rss_vf_config()
1765 if (rc) in collect_rss_vf_config()
1768 rc = compress_buff(&scratch_buff, dbg_buff); in collect_rss_vf_config()
1773 return rc; in collect_rss_vf_config()
1785 int pf, rc; in collect_rss_pf_config() local
1789 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_rss_pf_config()
1790 if (rc) in collect_rss_pf_config()
1805 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_rss_pf_config()
1806 if (rc) in collect_rss_pf_config()
1809 rc = compress_buff(&scratch_buff, dbg_buff); in collect_rss_pf_config()
1813 return rc; in collect_rss_pf_config()
1952 int rc = 0; in collect_dump_context() local
1958 rc = fill_meminfo(padap, &meminfo); in collect_dump_context()
1959 if (rc) in collect_dump_context()
1963 rc = get_max_ctxt_qid(padap, &meminfo, max_ctx_qid, CTXT_CNM + 1); in collect_dump_context()
1964 if (rc) in collect_dump_context()
1973 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_dump_context()
1974 if (rc == CUDBG_STATUS_NO_SCRATCH_MEM) { in collect_dump_context()
1985 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_dump_context()
1986 if (rc) in collect_dump_context()
1998 rc = check_valid(buff->data, i); in collect_dump_context()
1999 if (rc) { in collect_dump_context()
2027 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_dump_context()
2028 if (rc) in collect_dump_context()
2039 rc = compress_buff(&temp_buff, dbg_buff); in collect_dump_context()
2040 if (rc) in collect_dump_context()
2051 return rc; in collect_dump_context()
2063 int rc = 0; in collect_fw_devlog() local
2065 rc = t4_init_devlog_params(padap, 1); in collect_fw_devlog()
2067 if (rc < 0) { in collect_fw_devlog()
2070 "%d\n", __func__, rc); in collect_fw_devlog()
2071 rc = CUDBG_SYSTEM_ERROR; in collect_fw_devlog()
2075 rc = get_scratch_buff(dbg_buff, dparams->size, &scratch_buff); in collect_fw_devlog()
2077 if (rc) in collect_fw_devlog()
2083 rc = t4_memory_rw(padap, padap->params.drv_memwin, in collect_fw_devlog()
2089 if (rc) { in collect_fw_devlog()
2092 "%d\n", __func__, rc); in collect_fw_devlog()
2093 cudbg_err->sys_err = rc; in collect_fw_devlog()
2098 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_fw_devlog()
2100 if (rc) in collect_fw_devlog()
2103 rc = compress_buff(&scratch_buff, dbg_buff); in collect_fw_devlog()
2108 return rc; in collect_fw_devlog()
2117 int rc = 0, qid = 0; in collect_cim_obq_ulp0() local
2119 rc = read_cim_obq(pdbg_init, dbg_buff, cudbg_err, qid); in collect_cim_obq_ulp0()
2121 return rc; in collect_cim_obq_ulp0()
2129 int rc = 0, qid = 1; in collect_cim_obq_ulp1() local
2131 rc = read_cim_obq(pdbg_init, dbg_buff, cudbg_err, qid); in collect_cim_obq_ulp1()
2133 return rc; in collect_cim_obq_ulp1()
2141 int rc = 0, qid = 2; in collect_cim_obq_ulp2() local
2143 rc = read_cim_obq(pdbg_init, dbg_buff, cudbg_err, qid); in collect_cim_obq_ulp2()
2145 return rc; in collect_cim_obq_ulp2()
2153 int rc = 0, qid = 3; in collect_cim_obq_ulp3() local
2155 rc = read_cim_obq(pdbg_init, dbg_buff, cudbg_err, qid); in collect_cim_obq_ulp3()
2157 return rc; in collect_cim_obq_ulp3()
2165 int rc = 0, qid = 4; in collect_cim_obq_sge() local
2167 rc = read_cim_obq(pdbg_init, dbg_buff, cudbg_err, qid); in collect_cim_obq_sge()
2169 return rc; in collect_cim_obq_sge()
2177 int rc = 0, qid = 5; in collect_cim_obq_ncsi() local
2179 rc = read_cim_obq(pdbg_init, dbg_buff, cudbg_err, qid); in collect_cim_obq_ncsi()
2181 return rc; in collect_cim_obq_ncsi()
2189 int rc = 0, qid = 6; in collect_obq_sge_rx_q0() local
2191 rc = read_cim_obq(pdbg_init, dbg_buff, cudbg_err, qid); in collect_obq_sge_rx_q0()
2193 return rc; in collect_obq_sge_rx_q0()
2201 int rc = 0, qid = 7; in collect_obq_sge_rx_q1() local
2203 rc = read_cim_obq(pdbg_init, dbg_buff, cudbg_err, qid); in collect_obq_sge_rx_q1()
2205 return rc; in collect_obq_sge_rx_q1()
2216 int rc; in read_cim_obq() local
2221 rc = get_scratch_buff(dbg_buff, qsize, &scratch_buff); in read_cim_obq()
2222 if (rc) in read_cim_obq()
2233 rc = CUDBG_SYSTEM_ERROR; in read_cim_obq()
2235 rc = no_of_read_words; in read_cim_obq()
2239 __func__, rc); in read_cim_obq()
2240 cudbg_err->sys_err = rc; in read_cim_obq()
2246 rc = write_compression_hdr(&scratch_buff, dbg_buff); in read_cim_obq()
2248 if (rc) in read_cim_obq()
2251 rc = compress_buff(&scratch_buff, dbg_buff); in read_cim_obq()
2253 if (rc) in read_cim_obq()
2259 return rc; in read_cim_obq()
2269 int rc = 0, qid = 0; in collect_cim_ibq_tp0() local
2271 rc = read_cim_ibq(pdbg_init, dbg_buff, cudbg_err, qid); in collect_cim_ibq_tp0()
2272 return rc; in collect_cim_ibq_tp0()
2280 int rc = 0, qid = 1; in collect_cim_ibq_tp1() local
2282 rc = read_cim_ibq(pdbg_init, dbg_buff, cudbg_err, qid); in collect_cim_ibq_tp1()
2283 return rc; in collect_cim_ibq_tp1()
2291 int rc = 0, qid = 2; in collect_cim_ibq_ulp() local
2293 rc = read_cim_ibq(pdbg_init, dbg_buff, cudbg_err, qid); in collect_cim_ibq_ulp()
2294 return rc; in collect_cim_ibq_ulp()
2302 int rc = 0, qid = 3; in collect_cim_ibq_sge0() local
2304 rc = read_cim_ibq(pdbg_init, dbg_buff, cudbg_err, qid); in collect_cim_ibq_sge0()
2305 return rc; in collect_cim_ibq_sge0()
2313 int rc = 0, qid = 4; in collect_cim_ibq_sge1() local
2315 rc = read_cim_ibq(pdbg_init, dbg_buff, cudbg_err, qid); in collect_cim_ibq_sge1()
2316 return rc; in collect_cim_ibq_sge1()
2324 int rc, qid = 5; in collect_cim_ibq_ncsi() local
2326 rc = read_cim_ibq(pdbg_init, dbg_buff, cudbg_err, qid); in collect_cim_ibq_ncsi()
2327 return rc; in collect_cim_ibq_ncsi()
2338 int rc; in read_cim_ibq() local
2343 rc = get_scratch_buff(dbg_buff, qsize, &scratch_buff); in read_cim_ibq()
2345 if (rc) in read_cim_ibq()
2355 rc = CUDBG_SYSTEM_ERROR; in read_cim_ibq()
2357 rc = no_of_read_words; in read_cim_ibq()
2361 __func__, rc); in read_cim_ibq()
2362 cudbg_err->sys_err = rc; in read_cim_ibq()
2366 rc = write_compression_hdr(&scratch_buff, dbg_buff); in read_cim_ibq()
2367 if (rc) in read_cim_ibq()
2370 rc = compress_buff(&scratch_buff, dbg_buff); in read_cim_ibq()
2371 if (rc) in read_cim_ibq()
2378 return rc; in read_cim_ibq()
2388 u32 rc = 0; in collect_cim_ma_la() local
2392 rc = get_scratch_buff(dbg_buff, scratch_buff.size, &scratch_buff); in collect_cim_ma_la()
2393 if (rc) in collect_cim_ma_la()
2403 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_cim_ma_la()
2404 if (rc) in collect_cim_ma_la()
2407 rc = compress_buff(&scratch_buff, dbg_buff); in collect_cim_ma_la()
2412 return rc; in collect_cim_ma_la()
2423 int rc; in collect_cim_la() local
2438 rc = get_scratch_buff(dbg_buff, size, &scratch_buff); in collect_cim_la()
2439 if (rc) in collect_cim_la()
2442 rc = t4_cim_read(padap, A_UP_UP_DBG_LA_CFG, 1, &cfg); in collect_cim_la()
2444 if (rc) { in collect_cim_la()
2448 __func__, rc); in collect_cim_la()
2449 cudbg_err->sys_err = rc; in collect_cim_la()
2456 rc = t4_cim_read_la(padap, in collect_cim_la()
2459 if (rc < 0) { in collect_cim_la()
2463 __func__, rc); in collect_cim_la()
2464 cudbg_err->sys_err = rc; in collect_cim_la()
2468 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_cim_la()
2469 if (rc) in collect_cim_la()
2472 rc = compress_buff(&scratch_buff, dbg_buff); in collect_cim_la()
2473 if (rc) in collect_cim_la()
2479 return rc; in collect_cim_la()
2490 int rc = 0; in collect_cim_qcfg() local
2494 rc = get_scratch_buff(dbg_buff, sizeof(struct struct_cim_qcfg), in collect_cim_qcfg()
2497 if (rc) in collect_cim_qcfg()
2506 rc = t4_cim_read(padap, A_UP_IBQ_0_RDADDR, in collect_cim_qcfg()
2509 if (rc) { in collect_cim_qcfg()
2513 __func__, rc); in collect_cim_qcfg()
2514 cudbg_err->sys_err = rc; in collect_cim_qcfg()
2518 rc = t4_cim_read(padap, A_UP_OBQ_0_REALADDR, in collect_cim_qcfg()
2522 if (rc) { in collect_cim_qcfg()
2526 __func__, rc); in collect_cim_qcfg()
2527 cudbg_err->sys_err = rc; in collect_cim_qcfg()
2537 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_cim_qcfg()
2538 if (rc) in collect_cim_qcfg()
2541 rc = compress_buff(&scratch_buff, dbg_buff); in collect_cim_qcfg()
2542 if (rc) in collect_cim_qcfg()
2548 return rc; in collect_cim_qcfg()
2561 int rc; in read_fw_mem() local
2565 rc = write_compression_hdr(&scratch_buff, dbg_buff); in read_fw_mem()
2566 if (rc) in read_fw_mem()
2571 rc = get_scratch_buff(dbg_buff, bytes, &scratch_buff); in read_fw_mem()
2573 if (rc) { in read_fw_mem()
2574 rc = CUDBG_STATUS_NO_SCRATCH_MEM; in read_fw_mem()
2580 rc = t4_memory_rw(padap, MEMWIN_NIC, mem_type, bytes_read, in read_fw_mem()
2583 if (rc) { in read_fw_mem()
2587 __func__, rc); in read_fw_mem()
2588 cudbg_err->sys_err = rc; in read_fw_mem()
2592 rc = compress_buff(&scratch_buff, dbg_buff); in read_fw_mem()
2593 if (rc) in read_fw_mem()
2602 if (rc) in read_fw_mem()
2606 return rc; in read_fw_mem()
2666 int rc; in cudbg_t4_fwcache() local
2671 rc = begin_synchronized_op(padap->port[0], 1, 1); in cudbg_t4_fwcache()
2672 if (rc == 0) { in cudbg_t4_fwcache()
2673 rc = t4_fwcache(padap, FW_PARAM_DEV_FWCACHE_FLUSH); in cudbg_t4_fwcache()
2677 if (rc) { in cudbg_t4_fwcache()
2681 __func__, rc); in cudbg_t4_fwcache()
2682 cudbg_err->sys_warn = rc; in cudbg_t4_fwcache()
2694 int rc; in collect_edc0_meminfo() local
2702 rc = read_fw_mem(pdbg_init, dbg_buff, MEM_EDC0, in collect_edc0_meminfo()
2704 if (rc) in collect_edc0_meminfo()
2708 rc = CUDBG_STATUS_ENTITY_NOT_FOUND; in collect_edc0_meminfo()
2712 __func__, err_msg[-rc]); in collect_edc0_meminfo()
2717 return rc; in collect_edc0_meminfo()
2727 int rc; in collect_edc1_meminfo() local
2735 rc = read_fw_mem(pdbg_init, dbg_buff, MEM_EDC1, in collect_edc1_meminfo()
2737 if (rc) in collect_edc1_meminfo()
2740 rc = CUDBG_STATUS_ENTITY_NOT_FOUND; in collect_edc1_meminfo()
2744 __func__, err_msg[-rc]); in collect_edc1_meminfo()
2750 return rc; in collect_edc1_meminfo()
2760 int rc; in collect_mc0_meminfo() local
2768 rc = read_fw_mem(pdbg_init, dbg_buff, MEM_MC0, in collect_mc0_meminfo()
2770 if (rc) in collect_mc0_meminfo()
2773 rc = CUDBG_STATUS_ENTITY_NOT_FOUND; in collect_mc0_meminfo()
2777 __func__, err_msg[-rc]); in collect_mc0_meminfo()
2782 return rc; in collect_mc0_meminfo()
2792 int rc; in collect_mc1_meminfo() local
2800 rc = read_fw_mem(pdbg_init, dbg_buff, MEM_MC1, in collect_mc1_meminfo()
2802 if (rc) in collect_mc1_meminfo()
2805 rc = CUDBG_STATUS_ENTITY_NOT_FOUND; in collect_mc1_meminfo()
2810 __func__, err_msg[-rc]); in collect_mc1_meminfo()
2814 return rc; in collect_mc1_meminfo()
2828 int rc = 0; in collect_reg_dump() local
2839 rc = get_scratch_buff(dbg_buff, scratch_buff.size, &scratch_buff); in collect_reg_dump()
2840 if (rc) in collect_reg_dump()
2847 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_reg_dump()
2848 if (rc) in collect_reg_dump()
2864 return rc; in collect_reg_dump()
2875 int rc; in collect_cctrl() local
2880 rc = get_scratch_buff(dbg_buff, scratch_buff.size, &scratch_buff); in collect_cctrl()
2881 if (rc) in collect_cctrl()
2886 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_cctrl()
2887 if (rc) in collect_cctrl()
2890 rc = compress_buff(&scratch_buff, dbg_buff); in collect_cctrl()
2895 return rc; in collect_cctrl()
2922 int rc = 0; in cim_ha_rreg() local
2928 rc = check_busy_bit(padap); in cim_ha_rreg()
2929 if (rc) in cim_ha_rreg()
2936 return rc; in cim_ha_rreg()
2944 int rc = 0; in dump_up_cim() local
2947 rc = cim_ha_rreg(padap, in dump_up_cim()
2950 if (rc) { in dump_up_cim()
2962 return rc; in dump_up_cim()
2974 int i, rc, n; in collect_up_cim_indirect() local
2980 rc = get_scratch_buff(dbg_buff, scratch_buff.size, &scratch_buff); in collect_up_cim_indirect()
2981 if (rc) in collect_up_cim_indirect()
3006 rc = dump_up_cim(padap, pdbg_init, up_cim_reg, buff); in collect_up_cim_indirect()
3011 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_up_cim_indirect()
3012 if (rc) in collect_up_cim_indirect()
3015 rc = compress_buff(&scratch_buff, dbg_buff); in collect_up_cim_indirect()
3020 return rc; in collect_up_cim_indirect()
3036 int i, k, rc; in collect_mbox_log() local
3053 rc = get_scratch_buff(dbg_buff, scratch_buff.size, &scratch_buff); in collect_mbox_log()
3054 if (rc) in collect_mbox_log()
3080 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_mbox_log()
3081 if (rc) in collect_mbox_log()
3084 rc = compress_buff(&scratch_buff, dbg_buff); in collect_mbox_log()
3089 return rc; in collect_mbox_log()
3104 int i, rc; in collect_pbt_tables() local
3109 rc = get_scratch_buff(dbg_buff, scratch_buff.size, &scratch_buff); in collect_pbt_tables()
3110 if (rc) in collect_pbt_tables()
3118 rc = cim_ha_rreg(padap, addr + (i * 4), &pbt->pbt_dynamic[i]); in collect_pbt_tables()
3119 if (rc) { in collect_pbt_tables()
3133 rc = cim_ha_rreg(padap, addr + (i * 4), &pbt->pbt_static[i]); in collect_pbt_tables()
3134 if (rc) { in collect_pbt_tables()
3146 rc = cim_ha_rreg(padap, addr + (i * 4), &pbt->lrf_table[i]); in collect_pbt_tables()
3147 if (rc) { in collect_pbt_tables()
3159 rc = cim_ha_rreg(padap, addr + (i * 4), &pbt->pbt_data[i]); in collect_pbt_tables()
3160 if (rc) { in collect_pbt_tables()
3169 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_pbt_tables()
3170 if (rc) in collect_pbt_tables()
3173 rc = compress_buff(&scratch_buff, dbg_buff); in collect_pbt_tables()
3178 return rc; in collect_pbt_tables()
3190 int i, rc, n; in collect_pm_indirect() local
3196 rc = get_scratch_buff(dbg_buff, scratch_buff.size, &scratch_buff); in collect_pm_indirect()
3197 if (rc) in collect_pm_indirect()
3243 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_pm_indirect()
3244 if (rc) in collect_pm_indirect()
3247 rc = compress_buff(&scratch_buff, dbg_buff); in collect_pm_indirect()
3252 return rc; in collect_pm_indirect()
3268 int rc; in collect_tid() local
3272 rc = get_scratch_buff(dbg_buff, scratch_buff.size, &scratch_buff); in collect_tid()
3273 if (rc) in collect_tid()
3311 rc = begin_synchronized_op(padap->port[0], 1, 1); in collect_tid()
3312 if (rc) in collect_tid()
3316 rc = t4_query_params(padap, mbox, pf, 0, 7, para, val); in collect_tid()
3317 if (rc < 0) { in collect_tid()
3318 if (rc == -FW_EPERM) { in collect_tid()
3328 rc = t4_query_params(padap, mbox, pf, 0, 7, para, val); in collect_tid()
3329 if (rc < 0) { in collect_tid()
3330 cudbg_err->sys_err = rc; in collect_tid()
3334 cudbg_err->sys_err = rc; in collect_tid()
3357 rc = t4_query_params(padap, mbox, pf, 0, 2, para, val); in collect_tid()
3358 if (rc < 0) { in collect_tid()
3359 cudbg_err->sys_err = rc; in collect_tid()
3377 rc = t4_query_params(padap, mbox, pf, 0, 2, para, val); in collect_tid()
3378 if (rc < 0) { in collect_tid()
3379 cudbg_err->sys_err = rc; in collect_tid()
3394 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_tid()
3395 if (rc) in collect_tid()
3397 rc = compress_buff(&scratch_buff, dbg_buff); in collect_tid()
3403 return rc; in collect_tid()
3415 int rc; in collect_tx_rate() local
3420 rc = get_scratch_buff(dbg_buff, scratch_buff.size, &scratch_buff); in collect_tx_rate()
3421 if (rc) in collect_tx_rate()
3428 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_tx_rate()
3429 if (rc) in collect_tx_rate()
3432 rc = compress_buff(&scratch_buff, dbg_buff); in collect_tx_rate()
3437 return rc; in collect_tx_rate()
3487 int rc; in collect_mps_tcam() local
3494 rc = get_scratch_buff(dbg_buff, scratch_buff.size, &scratch_buff); in collect_mps_tcam()
3495 if (rc) in collect_mps_tcam()
3591 rc = begin_synchronized_op(padap->port[0], 1, 1); in collect_mps_tcam()
3592 if (rc == 0) { in collect_mps_tcam()
3593 rc = t4_wr_mbox(padap, padap->mbox, &ldst_cmd, in collect_mps_tcam()
3598 if (rc) in collect_mps_tcam()
3626 rc = CUDBG_SYSTEM_ERROR; in collect_mps_tcam()
3631 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_mps_tcam()
3632 if (rc) in collect_mps_tcam()
3635 rc = compress_buff(&scratch_buff, dbg_buff); in collect_mps_tcam()
3641 return rc; in collect_mps_tcam()
3652 int i, rc, n; in collect_pcie_config() local
3658 rc = get_scratch_buff(dbg_buff, scratch_buff.size, &scratch_buff); in collect_pcie_config()
3659 if (rc) in collect_pcie_config()
3670 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_pcie_config()
3671 if (rc) in collect_pcie_config()
3674 rc = compress_buff(&scratch_buff, dbg_buff); in collect_pcie_config()
3679 return rc; in collect_pcie_config()
3753 int rc, size; in collect_le_tcam() local
3796 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_le_tcam()
3797 if (rc) in collect_le_tcam()
3800 rc = get_scratch_buff(dbg_buff, CUDBG_CHUNK_SIZE, &scratch_buff); in collect_le_tcam()
3801 if (rc) in collect_le_tcam()
3815 rc = compress_buff(&scratch_buff, dbg_buff); in collect_le_tcam()
3816 if (rc) in collect_le_tcam()
3822 rc = get_scratch_buff(dbg_buff, CUDBG_CHUNK_SIZE, in collect_le_tcam()
3824 if (rc) in collect_le_tcam()
3832 rc = cudbg_read_tid(pdbg_init, i, tid_data); in collect_le_tcam()
3834 if (rc) { in collect_le_tcam()
3835 cudbg_err->sys_err = rc; in collect_le_tcam()
3846 rc = compress_buff(&scratch_buff, dbg_buff); in collect_le_tcam()
3853 return rc; in collect_le_tcam()
3865 int i, rc, n; in collect_ma_indirect() local
3871 rc = CUDBG_STATUS_ENTITY_NOT_FOUND; in collect_ma_indirect()
3879 rc = get_scratch_buff(dbg_buff, scratch_buff.size, &scratch_buff); in collect_ma_indirect()
3880 if (rc) in collect_ma_indirect()
3922 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_ma_indirect()
3923 if (rc) in collect_ma_indirect()
3926 rc = compress_buff(&scratch_buff, dbg_buff); in collect_ma_indirect()
3931 return rc; in collect_ma_indirect()
3943 int i, rc, n; in collect_hma_indirect() local
3949 rc = CUDBG_STATUS_ENTITY_NOT_FOUND; in collect_hma_indirect()
3957 rc = get_scratch_buff(dbg_buff, scratch_buff.size, &scratch_buff); in collect_hma_indirect()
3958 if (rc) in collect_hma_indirect()
3980 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_hma_indirect()
3981 if (rc) in collect_hma_indirect()
3984 rc = compress_buff(&scratch_buff, dbg_buff); in collect_hma_indirect()
3989 return rc; in collect_hma_indirect()
4001 int i, rc, n; in collect_pcie_indirect() local
4007 rc = get_scratch_buff(dbg_buff, scratch_buff.size, &scratch_buff); in collect_pcie_indirect()
4008 if (rc) in collect_pcie_indirect()
4054 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_pcie_indirect()
4055 if (rc) in collect_pcie_indirect()
4058 rc = compress_buff(&scratch_buff, dbg_buff); in collect_pcie_indirect()
4063 return rc; in collect_pcie_indirect()
4076 int i, rc, n = 0; in collect_tp_indirect() local
4086 rc = get_scratch_buff(dbg_buff, scratch_buff.size, &scratch_buff); in collect_tp_indirect()
4087 if (rc) in collect_tp_indirect()
4175 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_tp_indirect()
4176 if (rc) in collect_tp_indirect()
4179 rc = compress_buff(&scratch_buff, dbg_buff); in collect_tp_indirect()
4184 return rc; in collect_tp_indirect()
4196 int i, rc; in collect_sge_indirect() local
4201 rc = get_scratch_buff(dbg_buff, scratch_buff.size, &scratch_buff); in collect_sge_indirect()
4202 if (rc) in collect_sge_indirect()
4226 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_sge_indirect()
4227 if (rc) in collect_sge_indirect()
4230 rc = compress_buff(&scratch_buff, dbg_buff); in collect_sge_indirect()
4235 return rc; in collect_sge_indirect()
4247 int rc; in collect_full() local
4267 rc = get_scratch_buff(dbg_buff, scratch_buff.size, &scratch_buff); in collect_full()
4268 if (rc) in collect_full()
4332 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_full()
4333 if (rc) in collect_full()
4336 rc = compress_buff(&scratch_buff, dbg_buff); in collect_full()
4341 return rc; in collect_full()
4356 int rc; in collect_vpd_data() local
4361 rc = get_scratch_buff(dbg_buff, scratch_buff.size, &scratch_buff); in collect_vpd_data()
4362 if (rc) in collect_vpd_data()
4380 rc = t4_get_scfg_version(padap, &vpd_data->scfg_vers); in collect_vpd_data()
4382 rc = 1; in collect_vpd_data()
4385 if (rc) { in collect_vpd_data()
4387 rc = read_vpd_reg(padap, SCFG_VER_ADDR, SCFG_VER_LEN, in collect_vpd_data()
4389 if (rc) in collect_vpd_data()
4394 rc = t4_get_vpd_version(padap, &vpd_data->vpd_vers); in collect_vpd_data()
4396 rc = 1; in collect_vpd_data()
4399 if (rc) { in collect_vpd_data()
4401 rc = read_vpd_reg(padap, VPD_VER_ADDR, VPD_VER_LEN, in collect_vpd_data()
4403 if (rc) in collect_vpd_data()
4415 rc = t4_get_fw_version(padap, &fw_vers); in collect_vpd_data()
4416 if (rc) in collect_vpd_data()
4425 rc = write_compression_hdr(&scratch_buff, dbg_buff); in collect_vpd_data()
4426 if (rc) in collect_vpd_data()
4429 rc = compress_buff(&scratch_buff, dbg_buff); in collect_vpd_data()
4434 return rc; in collect_vpd_data()