Lines Matching refs:desc
179 struct hclge_desc *desc; in hclge_get_32_bit_regs() local
193 desc = kcalloc(cmd_num, sizeof(struct hclge_desc), GFP_KERNEL); in hclge_get_32_bit_regs()
194 if (!desc) in hclge_get_32_bit_regs()
197 hclge_cmd_setup_basic_desc(&desc[0], HCLGE_OPC_QUERY_32_BIT_REG, true); in hclge_get_32_bit_regs()
198 ret = hclge_cmd_send(&hdev->hw, desc, cmd_num); in hclge_get_32_bit_regs()
202 kfree(desc); in hclge_get_32_bit_regs()
208 desc_data = (__le32 *)(&desc[i].data[0]); in hclge_get_32_bit_regs()
211 desc_data = (__le32 *)(&desc[i]); in hclge_get_32_bit_regs()
223 kfree(desc); in hclge_get_32_bit_regs()
233 struct hclge_desc *desc; in hclge_get_64_bit_regs() local
247 desc = kcalloc(cmd_num, sizeof(struct hclge_desc), GFP_KERNEL); in hclge_get_64_bit_regs()
248 if (!desc) in hclge_get_64_bit_regs()
251 hclge_cmd_setup_basic_desc(&desc[0], HCLGE_OPC_QUERY_64_BIT_REG, true); in hclge_get_64_bit_regs()
252 ret = hclge_cmd_send(&hdev->hw, desc, cmd_num); in hclge_get_64_bit_regs()
256 kfree(desc); in hclge_get_64_bit_regs()
262 desc_data = (__le64 *)(&desc[i].data[0]); in hclge_get_64_bit_regs()
265 desc_data = (__le64 *)(&desc[i]); in hclge_get_64_bit_regs()
277 kfree(desc); in hclge_get_64_bit_regs()
281 int hclge_query_bd_num_cmd_send(struct hclge_dev *hdev, struct hclge_desc *desc) in hclge_query_bd_num_cmd_send() argument
287 hclge_cmd_setup_basic_desc(&desc[i], HCLGE_OPC_DFX_BD_NUM, in hclge_query_bd_num_cmd_send()
289 desc[i].flag |= cpu_to_le16(HCLGE_COMM_CMD_FLAG_NEXT); in hclge_query_bd_num_cmd_send()
293 hclge_cmd_setup_basic_desc(&desc[i], HCLGE_OPC_DFX_BD_NUM, true); in hclge_query_bd_num_cmd_send()
295 return hclge_cmd_send(&hdev->hw, desc, HCLGE_GET_DFX_REG_TYPE_CNT); in hclge_query_bd_num_cmd_send()
303 struct hclge_desc desc[HCLGE_GET_DFX_REG_TYPE_CNT]; in hclge_get_dfx_reg_bd_num() local
306 ret = hclge_query_bd_num_cmd_send(hdev, desc); in hclge_get_dfx_reg_bd_num()
313 entries_per_desc = ARRAY_SIZE(desc[0].data); in hclge_get_dfx_reg_bd_num()
318 bd_num_list[i] = le32_to_cpu(desc[desc_index].data[index]); in hclge_get_dfx_reg_bd_num()
328 struct hclge_desc *desc = desc_src; in hclge_dfx_reg_cmd_send() local
331 hclge_cmd_setup_basic_desc(desc, cmd, true); in hclge_dfx_reg_cmd_send()
333 desc->flag |= cpu_to_le16(HCLGE_COMM_CMD_FLAG_NEXT); in hclge_dfx_reg_cmd_send()
334 desc++; in hclge_dfx_reg_cmd_send()
335 hclge_cmd_setup_basic_desc(desc, cmd, true); in hclge_dfx_reg_cmd_send()
338 desc = desc_src; in hclge_dfx_reg_cmd_send()
339 ret = hclge_cmd_send(&hdev->hw, desc, bd_num); in hclge_dfx_reg_cmd_send()
350 struct hclge_desc *desc, int bd_num) in hclge_dfx_reg_rpu_tnl_cmd_send() argument
355 hclge_cmd_setup_basic_desc(&desc[i], HCLGE_OPC_DFX_RPU_REG_0, in hclge_dfx_reg_rpu_tnl_cmd_send()
358 desc[i].flag |= cpu_to_le16(HCLGE_COMM_CMD_FLAG_NEXT); in hclge_dfx_reg_rpu_tnl_cmd_send()
361 desc[0].data[0] = cpu_to_le32(tnl_id); in hclge_dfx_reg_rpu_tnl_cmd_send()
362 ret = hclge_cmd_send(&hdev->hw, desc, bd_num); in hclge_dfx_reg_rpu_tnl_cmd_send()
374 struct hclge_desc *desc = desc_src; in hclge_dfx_reg_fetch_data() local
377 entries_per_desc = ARRAY_SIZE(desc->data); in hclge_dfx_reg_fetch_data()
382 *reg++ = le32_to_cpu(desc[desc_index].data[index]); in hclge_dfx_reg_fetch_data()
560 struct hclge_desc desc; in hclge_get_regs_num() local
564 hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_QUERY_REG_NUM, true); in hclge_get_regs_num()
565 ret = hclge_cmd_send(&hdev->hw, &desc, 1); in hclge_get_regs_num()
572 *regs_num_32_bit = le32_to_cpu(desc.data[0]); in hclge_get_regs_num()
573 *regs_num_64_bit = le32_to_cpu(desc.data[1]); in hclge_get_regs_num()