Lines Matching refs:desc

139 	struct hclge_desc desc[HCLGE_GET_DFX_REG_TYPE_CNT];  in hclge_dbg_get_dfx_bd_num()  local
144 ret = hclge_query_bd_num_cmd_send(hdev, desc); in hclge_dbg_get_dfx_bd_num()
152 entries_per_desc = ARRAY_SIZE(desc[0].data); in hclge_dbg_get_dfx_bd_num()
155 *bd_num = le32_to_cpu(desc[offset / entries_per_desc].data[index]); in hclge_dbg_get_dfx_bd_num()
169 struct hclge_desc *desc = desc_src; in hclge_dbg_cmd_send() local
172 hclge_cmd_setup_basic_desc(desc, cmd, true); in hclge_dbg_cmd_send()
173 desc->data[0] = cpu_to_le32(index); in hclge_dbg_cmd_send()
176 desc->flag |= cpu_to_le16(HCLGE_COMM_CMD_FLAG_NEXT); in hclge_dbg_cmd_send()
177 desc++; in hclge_dbg_cmd_send()
178 hclge_cmd_setup_basic_desc(desc, cmd, true); in hclge_dbg_cmd_send()
198 struct hclge_desc *desc; in hclge_dbg_dump_reg_tqp() local
221 desc = desc_src; in hclge_dbg_dump_reg_tqp()
222 ret = hclge_dbg_cmd_send(hdev, desc, index, bd_num, in hclge_dbg_dump_reg_tqp()
230 desc++; in hclge_dbg_dump_reg_tqp()
233 le32_to_cpu(desc->data[entry])); in hclge_dbg_dump_reg_tqp()
251 struct hclge_desc *desc; in hclge_dbg_dump_reg_common() local
262 desc = desc_src; in hclge_dbg_dump_reg_common()
264 ret = hclge_dbg_cmd_send(hdev, desc, 0, bd_num, reg_msg->cmd); in hclge_dbg_dump_reg_common()
266 kfree(desc); in hclge_dbg_dump_reg_common()
275 desc++; in hclge_dbg_dump_reg_common()
281 le32_to_cpu(desc->data[entry])); in hclge_dbg_dump_reg_common()
309 struct hclge_desc desc; in hclge_dbg_dump_mac_enable_status() local
313 hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_CONFIG_MAC_MODE, true); in hclge_dbg_dump_mac_enable_status()
315 ret = hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_dbg_dump_mac_enable_status()
322 req = (struct hclge_config_mac_mode_cmd *)desc.data; in hclge_dbg_dump_mac_enable_status()
339 struct hclge_desc desc; in hclge_dbg_dump_mac_frame_size() local
342 hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_CONFIG_MAX_FRM_SIZE, true); in hclge_dbg_dump_mac_frame_size()
344 ret = hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_dbg_dump_mac_frame_size()
351 req = (struct hclge_config_max_frm_size_cmd *)desc.data; in hclge_dbg_dump_mac_frame_size()
369 struct hclge_desc desc; in hclge_dbg_dump_mac_speed_duplex() local
372 hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_CONFIG_SPEED_DUP, true); in hclge_dbg_dump_mac_speed_duplex()
374 ret = hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_dbg_dump_mac_speed_duplex()
381 req = (struct hclge_config_mac_speed_dup_cmd *)desc.data; in hclge_dbg_dump_mac_speed_duplex()
412 struct hclge_desc desc; in hclge_dbg_dump_dcb_qset() local
423 ret = hclge_dbg_cmd_send(hdev, &desc, qset_id, 1, in hclge_dbg_dump_dcb_qset()
428 req.bitmap = (u8)le32_to_cpu(desc.data[1]); in hclge_dbg_dump_dcb_qset()
443 struct hclge_desc desc; in hclge_dbg_dump_dcb_pri() local
454 ret = hclge_dbg_cmd_send(hdev, &desc, pri_id, 1, in hclge_dbg_dump_dcb_pri()
459 req.bitmap = (u8)le32_to_cpu(desc.data[1]); in hclge_dbg_dump_dcb_pri()
473 struct hclge_desc desc; in hclge_dbg_dump_dcb_pg() local
480 ret = hclge_dbg_cmd_send(hdev, &desc, pg_id, 1, in hclge_dbg_dump_dcb_pg()
485 req.bitmap = (u8)le32_to_cpu(desc.data[1]); in hclge_dbg_dump_dcb_pg()
498 struct hclge_desc desc; in hclge_dbg_dump_dcb_queue() local
505 ret = hclge_dbg_cmd_send(hdev, &desc, nq_id, 1, in hclge_dbg_dump_dcb_queue()
511 nq_id, le32_to_cpu(desc.data[1])); in hclge_dbg_dump_dcb_queue()
513 ret = hclge_dbg_cmd_send(hdev, &desc, nq_id, 1, in hclge_dbg_dump_dcb_queue()
520 le32_to_cpu(desc.data[1])); in hclge_dbg_dump_dcb_queue()
530 struct hclge_desc desc; in hclge_dbg_dump_dcb_port() local
534 ret = hclge_dbg_cmd_send(hdev, &desc, port_id, 1, in hclge_dbg_dump_dcb_port()
539 req.bitmap = (u8)le32_to_cpu(desc.data[1]); in hclge_dbg_dump_dcb_port()
552 struct hclge_desc desc[2]; in hclge_dbg_dump_dcb_tm() local
556 ret = hclge_dbg_cmd_send(hdev, desc, port_id, 1, in hclge_dbg_dump_dcb_tm()
562 le32_to_cpu(desc[0].data[1])); in hclge_dbg_dump_dcb_tm()
564 le32_to_cpu(desc[0].data[2])); in hclge_dbg_dump_dcb_tm()
566 ret = hclge_dbg_cmd_send(hdev, desc, port_id, 2, in hclge_dbg_dump_dcb_tm()
572 le32_to_cpu(desc[0].data[1])); in hclge_dbg_dump_dcb_tm()
574 le32_to_cpu(desc[0].data[2])); in hclge_dbg_dump_dcb_tm()
577 le32_to_cpu(desc[0].data[3])); in hclge_dbg_dump_dcb_tm()
580 le32_to_cpu(desc[0].data[4])); in hclge_dbg_dump_dcb_tm()
582 le32_to_cpu(desc[0].data[5])); in hclge_dbg_dump_dcb_tm()
584 le32_to_cpu(desc[1].data[0])); in hclge_dbg_dump_dcb_tm()
586 le32_to_cpu(desc[1].data[1])); in hclge_dbg_dump_dcb_tm()
591 ret = hclge_dbg_cmd_send(hdev, desc, port_id, 1, in hclge_dbg_dump_dcb_tm()
597 le32_to_cpu(desc[0].data[1])); in hclge_dbg_dump_dcb_tm()
599 le32_to_cpu(desc[0].data[2])); in hclge_dbg_dump_dcb_tm()
601 le32_to_cpu(desc[0].data[3])); in hclge_dbg_dump_dcb_tm()
603 le32_to_cpu(desc[0].data[4])); in hclge_dbg_dump_dcb_tm()
606 le32_to_cpu(desc[0].data[5])); in hclge_dbg_dump_dcb_tm()
666 struct hclge_desc desc; in hclge_dbg_dump_tc() local
678 hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_ETS_TC_WEIGHT, true); in hclge_dbg_dump_tc()
679 ret = hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_dbg_dump_tc()
686 ets_weight = (struct hclge_ets_tc_weight_cmd *)desc.data; in hclge_dbg_dump_tc()
843 struct hclge_desc desc; in hclge_dbg_dump_tm_bp_qset_map() local
852 map = (struct hclge_bp_to_qs_map_cmd *)desc.data; in hclge_dbg_dump_tm_bp_qset_map()
854 hclge_cmd_setup_basic_desc(&desc, in hclge_dbg_dump_tm_bp_qset_map()
859 ret = hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_dbg_dump_tm_bp_qset_map()
933 struct hclge_desc desc; in hclge_dbg_dump_tm_nodes() local
937 hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_TM_NODES, true); in hclge_dbg_dump_tm_nodes()
938 ret = hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_dbg_dump_tm_nodes()
945 nodes = (struct hclge_tm_nodes_cmd *)desc.data; in hclge_dbg_dump_tm_nodes()
1119 struct hclge_desc desc; in hclge_dbg_dump_qos_pause_cfg() local
1123 hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_CFG_MAC_PARA, true); in hclge_dbg_dump_qos_pause_cfg()
1124 ret = hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_dbg_dump_qos_pause_cfg()
1131 pause_param = (struct hclge_cfg_pause_param_cmd *)desc.data; in hclge_dbg_dump_qos_pause_cfg()
1148 struct hclge_desc desc; in hclge_dbg_dump_qos_pri_map() local
1154 hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_PRI_TO_TC_MAPPING, true); in hclge_dbg_dump_qos_pri_map()
1155 ret = hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_dbg_dump_qos_pri_map()
1162 pri_map = (struct hclge_qos_pri_map_cmd *)desc.data; in hclge_dbg_dump_qos_pri_map()
1182 struct hclge_desc desc[HCLGE_DSCP_MAP_TC_BD_NUM]; in hclge_dbg_dump_qos_dscp_map() local
1183 u8 *req0 = (u8 *)desc[0].data; in hclge_dbg_dump_qos_dscp_map()
1184 u8 *req1 = (u8 *)desc[1].data; in hclge_dbg_dump_qos_dscp_map()
1195 hclge_cmd_setup_basic_desc(&desc[0], HCLGE_OPC_QOS_MAP, true); in hclge_dbg_dump_qos_dscp_map()
1196 desc[0].flag |= cpu_to_le16(HCLGE_COMM_CMD_FLAG_NEXT); in hclge_dbg_dump_qos_dscp_map()
1197 hclge_cmd_setup_basic_desc(&desc[1], HCLGE_OPC_QOS_MAP, true); in hclge_dbg_dump_qos_dscp_map()
1198 ret = hclge_cmd_send(&hdev->hw, desc, HCLGE_DSCP_MAP_TC_BD_NUM); in hclge_dbg_dump_qos_dscp_map()
1233 struct hclge_desc desc; in hclge_dbg_dump_tx_buf_cfg() local
1237 hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_TX_BUFF_ALLOC, true); in hclge_dbg_dump_tx_buf_cfg()
1238 ret = hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_dbg_dump_tx_buf_cfg()
1245 tx_buf_cmd = (struct hclge_tx_buff_alloc_cmd *)desc.data; in hclge_dbg_dump_tx_buf_cfg()
1258 struct hclge_desc desc; in hclge_dbg_dump_rx_priv_buf_cfg() local
1262 hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_RX_PRIV_BUFF_ALLOC, true); in hclge_dbg_dump_rx_priv_buf_cfg()
1263 ret = hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_dbg_dump_rx_priv_buf_cfg()
1272 rx_buf_cmd = (struct hclge_rx_priv_buff_cmd *)desc.data; in hclge_dbg_dump_rx_priv_buf_cfg()
1288 struct hclge_desc desc; in hclge_dbg_dump_rx_common_wl_cfg() local
1292 hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_RX_COM_WL_ALLOC, true); in hclge_dbg_dump_rx_common_wl_cfg()
1293 ret = hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_dbg_dump_rx_common_wl_cfg()
1300 rx_com_wl = (struct hclge_rx_com_wl *)desc.data; in hclge_dbg_dump_rx_common_wl_cfg()
1314 struct hclge_desc desc; in hclge_dbg_dump_rx_global_pkt_cnt() local
1318 hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_RX_GBL_PKT_CNT, true); in hclge_dbg_dump_rx_global_pkt_cnt()
1319 ret = hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_dbg_dump_rx_global_pkt_cnt()
1326 rx_packet_cnt = (struct hclge_rx_com_wl *)desc.data; in hclge_dbg_dump_rx_global_pkt_cnt()
1339 struct hclge_desc desc[2]; in hclge_dbg_dump_rx_priv_wl_buf_cfg() local
1343 hclge_cmd_setup_basic_desc(&desc[0], HCLGE_OPC_RX_PRIV_WL_ALLOC, true); in hclge_dbg_dump_rx_priv_wl_buf_cfg()
1344 desc[0].flag |= cpu_to_le16(HCLGE_COMM_CMD_FLAG_NEXT); in hclge_dbg_dump_rx_priv_wl_buf_cfg()
1345 hclge_cmd_setup_basic_desc(&desc[1], HCLGE_OPC_RX_PRIV_WL_ALLOC, true); in hclge_dbg_dump_rx_priv_wl_buf_cfg()
1346 ret = hclge_cmd_send(&hdev->hw, desc, 2); in hclge_dbg_dump_rx_priv_wl_buf_cfg()
1353 rx_priv_wl = (struct hclge_rx_priv_wl_buf *)desc[0].data; in hclge_dbg_dump_rx_priv_wl_buf_cfg()
1360 rx_priv_wl = (struct hclge_rx_priv_wl_buf *)desc[1].data; in hclge_dbg_dump_rx_priv_wl_buf_cfg()
1375 struct hclge_desc desc[2]; in hclge_dbg_dump_rx_common_threshold_cfg() local
1379 hclge_cmd_setup_basic_desc(&desc[0], HCLGE_OPC_RX_COM_THRD_ALLOC, true); in hclge_dbg_dump_rx_common_threshold_cfg()
1380 desc[0].flag |= cpu_to_le16(HCLGE_COMM_CMD_FLAG_NEXT); in hclge_dbg_dump_rx_common_threshold_cfg()
1381 hclge_cmd_setup_basic_desc(&desc[1], HCLGE_OPC_RX_COM_THRD_ALLOC, true); in hclge_dbg_dump_rx_common_threshold_cfg()
1382 ret = hclge_cmd_send(&hdev->hw, desc, 2); in hclge_dbg_dump_rx_common_threshold_cfg()
1390 rx_com_thrd = (struct hclge_rx_com_thrd *)desc[0].data; in hclge_dbg_dump_rx_common_threshold_cfg()
1397 rx_com_thrd = (struct hclge_rx_com_thrd *)desc[1].data; in hclge_dbg_dump_rx_common_threshold_cfg()
1454 struct hclge_desc desc; in hclge_dbg_dump_mng_table() local
1466 hclge_cmd_setup_basic_desc(&desc, HCLGE_MAC_ETHERTYPE_IDX_RD, in hclge_dbg_dump_mng_table()
1468 req0 = (struct hclge_mac_ethertype_idx_rd_cmd *)&desc.data; in hclge_dbg_dump_mng_table()
1471 ret = hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_dbg_dump_mng_table()
1519 struct hclge_desc desc[3]; in hclge_dbg_fd_tcam_read() local
1524 hclge_cmd_setup_basic_desc(&desc[0], HCLGE_OPC_FD_TCAM_OP, true); in hclge_dbg_fd_tcam_read()
1525 desc[0].flag |= cpu_to_le16(HCLGE_COMM_CMD_FLAG_NEXT); in hclge_dbg_fd_tcam_read()
1526 hclge_cmd_setup_basic_desc(&desc[1], HCLGE_OPC_FD_TCAM_OP, true); in hclge_dbg_fd_tcam_read()
1527 desc[1].flag |= cpu_to_le16(HCLGE_COMM_CMD_FLAG_NEXT); in hclge_dbg_fd_tcam_read()
1528 hclge_cmd_setup_basic_desc(&desc[2], HCLGE_OPC_FD_TCAM_OP, true); in hclge_dbg_fd_tcam_read()
1530 req1 = (struct hclge_fd_tcam_config_1_cmd *)desc[0].data; in hclge_dbg_fd_tcam_read()
1531 req2 = (struct hclge_fd_tcam_config_2_cmd *)desc[1].data; in hclge_dbg_fd_tcam_read()
1532 req3 = (struct hclge_fd_tcam_config_3_cmd *)desc[2].data; in hclge_dbg_fd_tcam_read()
1538 ret = hclge_cmd_send(&hdev->hw, desc, 3); in hclge_dbg_fd_tcam_read()
1657 struct hclge_desc desc; in hclge_dbg_dump_fd_counter() local
1670 hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_FD_CNT_OP, true); in hclge_dbg_dump_fd_counter()
1671 req = (struct hclge_fd_ad_cnt_read_cmd *)desc.data; in hclge_dbg_dump_fd_counter()
1673 ret = hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_dbg_dump_fd_counter()
1803 struct hclge_desc desc; in hclge_dbg_get_imp_stats_info() local
1807 hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_IMP_STATS_BD, true); in hclge_dbg_get_imp_stats_info()
1809 req = (struct hclge_get_imp_bd_cmd *)desc.data; in hclge_dbg_get_imp_stats_info()
1810 ret = hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_dbg_get_imp_stats_info()
1847 static void hclge_ncl_config_data_print(struct hclge_desc *desc, int *index, in hclge_ncl_config_data_print() argument
1862 le32_to_cpu(desc[i].data[j])); in hclge_ncl_config_data_print()
1878 struct hclge_desc desc[HCLGE_CMD_NCL_CONFIG_BD_NUM]; in hclge_dbg_dump_ncl_config() local
1893 ret = hclge_dbg_cmd_send(hdev, desc, data0, bd_num, in hclge_dbg_dump_ncl_config()
1898 hclge_ncl_config_data_print(desc, &index, buf, len, &pos); in hclge_dbg_dump_ncl_config()
1909 struct hclge_desc desc; in hclge_dbg_dump_loopback() local
1914 req_app = (struct hclge_config_mac_mode_cmd *)desc.data; in hclge_dbg_dump_loopback()
1915 req_common = (struct hclge_common_lb_cmd *)desc.data; in hclge_dbg_dump_loopback()
1920 hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_CONFIG_MAC_MODE, true); in hclge_dbg_dump_loopback()
1921 ret = hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_dbg_dump_loopback()
1933 hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_COMMON_LOOPBACK, true); in hclge_dbg_dump_loopback()
1934 ret = hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_dbg_dump_loopback()
2077 struct hclge_desc desc; in hclge_get_vlan_rx_offload_cfg() local
2082 hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_VLAN_PORT_RX_CFG, true); in hclge_get_vlan_rx_offload_cfg()
2084 req = (struct hclge_vport_vtag_rx_cfg_cmd *)desc.data; in hclge_get_vlan_rx_offload_cfg()
2089 ret = hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_get_vlan_rx_offload_cfg()
2112 struct hclge_desc desc; in hclge_get_vlan_tx_offload_cfg() local
2117 hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_VLAN_PORT_TX_CFG, true); in hclge_get_vlan_tx_offload_cfg()
2118 req = (struct hclge_vport_vtag_tx_cfg_cmd *)desc.data; in hclge_get_vlan_tx_offload_cfg()
2123 ret = hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_get_vlan_tx_offload_cfg()
2147 struct hclge_desc *desc) in hclge_get_vlan_filter_config_cmd() argument
2152 hclge_cmd_setup_basic_desc(desc, HCLGE_OPC_VLAN_FILTER_CTRL, true); in hclge_get_vlan_filter_config_cmd()
2153 req = (struct hclge_vlan_filter_ctrl_cmd *)desc->data; in hclge_get_vlan_filter_config_cmd()
2157 ret = hclge_cmd_send(&hdev->hw, desc, 1); in hclge_get_vlan_filter_config_cmd()
2170 struct hclge_desc desc; in hclge_get_vlan_filter_state() local
2173 ret = hclge_get_vlan_filter_config_cmd(hdev, vlan_type, vf_id, &desc); in hclge_get_vlan_filter_state()
2177 req = (struct hclge_vlan_filter_ctrl_cmd *)desc.data; in hclge_get_vlan_filter_state()
2187 struct hclge_desc desc; in hclge_get_port_vlan_filter_bypass_state() local
2193 hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_PORT_VLAN_BYPASS, true); in hclge_get_port_vlan_filter_bypass_state()
2194 req = (struct hclge_port_vlan_filter_bypass_cmd *)desc.data; in hclge_get_port_vlan_filter_bypass_state()
2197 ret = hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_get_port_vlan_filter_bypass_state()