Lines Matching refs:cmq

42 	struct hclgevf_cmq_ring *csq = &hw->cmq.csq;  in hclgevf_cmd_csq_clean()
69 return head == hw->cmq.csq.next_to_use; in hclgevf_cmd_csq_done()
120 hclgevf_cmd_config_regs(&hw->cmq.csq); in hclgevf_cmd_init_regs()
121 hclgevf_cmd_config_regs(&hw->cmq.crq); in hclgevf_cmd_init_regs()
151 (ring_type == HCLGEVF_TYPE_CSQ) ? &hw->cmq.csq : &hw->cmq.crq; in hclgevf_alloc_cmd_queue()
191 desc_to_use = &hw->cmq.csq.desc[hw->cmq.csq.next_to_use]; in hclgevf_cmd_copy_desc()
193 (hw->cmq.csq.next_to_use)++; in hclgevf_cmd_copy_desc()
194 if (hw->cmq.csq.next_to_use == hw->cmq.csq.desc_num) in hclgevf_cmd_copy_desc()
195 hw->cmq.csq.next_to_use = 0; in hclgevf_cmd_copy_desc()
235 desc[handle] = hw->cmq.csq.desc[ntc]; in hclgevf_cmd_check_retval()
237 if (ntc == hw->cmq.csq.desc_num) in hclgevf_cmd_check_retval()
244 hw->cmq.last_status = desc_ret; in hclgevf_cmd_check_retval()
268 } while (timeout < hw->cmq.tx_timeout); in hclgevf_cmd_check_result()
297 struct hclgevf_cmq_ring *csq = &hw->cmq.csq; in hclgevf_cmd_send()
301 spin_lock_bh(&hw->cmq.csq.lock); in hclgevf_cmd_send()
304 spin_unlock_bh(&hw->cmq.csq.lock); in hclgevf_cmd_send()
308 if (num > hclgevf_ring_space(&hw->cmq.csq)) { in hclgevf_cmd_send()
314 spin_unlock_bh(&hw->cmq.csq.lock); in hclgevf_cmd_send()
321 ntc = hw->cmq.csq.next_to_use; in hclgevf_cmd_send()
327 hw->cmq.csq.next_to_use); in hclgevf_cmd_send()
331 spin_unlock_bh(&hw->cmq.csq.lock); in hclgevf_cmd_send()
410 spin_lock_init(&hdev->hw.cmq.csq.lock); in hclgevf_cmd_queue_init()
411 spin_lock_init(&hdev->hw.cmq.crq.lock); in hclgevf_cmd_queue_init()
413 hdev->hw.cmq.tx_timeout = HCLGEVF_CMDQ_TX_TIMEOUT; in hclgevf_cmd_queue_init()
414 hdev->hw.cmq.csq.desc_num = HCLGEVF_NIC_CMQ_DESC_NUM; in hclgevf_cmd_queue_init()
415 hdev->hw.cmq.crq.desc_num = HCLGEVF_NIC_CMQ_DESC_NUM; in hclgevf_cmd_queue_init()
433 hclgevf_free_cmd_desc(&hdev->hw.cmq.csq); in hclgevf_cmd_queue_init()
461 spin_lock_bh(&hdev->hw.cmq.csq.lock); in hclgevf_cmd_init()
462 spin_lock(&hdev->hw.cmq.crq.lock); in hclgevf_cmd_init()
469 hdev->hw.cmq.csq.next_to_clean = 0; in hclgevf_cmd_init()
470 hdev->hw.cmq.csq.next_to_use = 0; in hclgevf_cmd_init()
471 hdev->hw.cmq.crq.next_to_clean = 0; in hclgevf_cmd_init()
472 hdev->hw.cmq.crq.next_to_use = 0; in hclgevf_cmd_init()
476 spin_unlock(&hdev->hw.cmq.crq.lock); in hclgevf_cmd_init()
477 spin_unlock_bh(&hdev->hw.cmq.csq.lock); in hclgevf_cmd_init()
548 spin_lock_bh(&hdev->hw.cmq.csq.lock); in hclgevf_cmd_uninit()
549 spin_lock(&hdev->hw.cmq.crq.lock); in hclgevf_cmd_uninit()
551 spin_unlock(&hdev->hw.cmq.crq.lock); in hclgevf_cmd_uninit()
552 spin_unlock_bh(&hdev->hw.cmq.csq.lock); in hclgevf_cmd_uninit()
554 hclgevf_free_cmd_desc(&hdev->hw.cmq.csq); in hclgevf_cmd_uninit()
555 hclgevf_free_cmd_desc(&hdev->hw.cmq.crq); in hclgevf_cmd_uninit()