Lines Matching refs:csq

42 	struct hclgevf_cmq_ring *csq = &hw->cmq.csq;  in hclgevf_cmd_csq_clean()  local
49 if (!hclgevf_is_valid_csq_clean_head(csq, head)) { in hclgevf_cmd_csq_clean()
51 csq->next_to_use, csq->next_to_clean); in hclgevf_cmd_csq_clean()
58 clean = (head - csq->next_to_clean + csq->desc_num) % csq->desc_num; in hclgevf_cmd_csq_clean()
59 csq->next_to_clean = head; 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()
151 (ring_type == HCLGEVF_TYPE_CSQ) ? &hw->cmq.csq : &hw->cmq.crq; in hclgevf_alloc_cmd_queue()
222 struct hclgevf_cmq_ring *csq = &hw->cmq.csq; in hclgevf_cmd_send() local
232 spin_lock_bh(&hw->cmq.csq.lock); in hclgevf_cmd_send()
235 spin_unlock_bh(&hw->cmq.csq.lock); in hclgevf_cmd_send()
239 if (num > hclgevf_ring_space(&hw->cmq.csq)) { in hclgevf_cmd_send()
243 csq->next_to_clean = hclgevf_read_dev(hw, in hclgevf_cmd_send()
245 spin_unlock_bh(&hw->cmq.csq.lock); in hclgevf_cmd_send()
252 ntc = hw->cmq.csq.next_to_use; in hclgevf_cmd_send()
255 desc_to_use = &hw->cmq.csq.desc[hw->cmq.csq.next_to_use]; in hclgevf_cmd_send()
257 (hw->cmq.csq.next_to_use)++; in hclgevf_cmd_send()
258 if (hw->cmq.csq.next_to_use == hw->cmq.csq.desc_num) in hclgevf_cmd_send()
259 hw->cmq.csq.next_to_use = 0; in hclgevf_cmd_send()
265 hw->cmq.csq.next_to_use); in hclgevf_cmd_send()
285 desc_to_use = &hw->cmq.csq.desc[ntc]; in hclgevf_cmd_send()
297 if (ntc == hw->cmq.csq.desc_num) in hclgevf_cmd_send()
311 spin_unlock_bh(&hw->cmq.csq.lock); in hclgevf_cmd_send()
374 spin_lock_init(&hdev->hw.cmq.csq.lock); in hclgevf_cmd_queue_init()
378 hdev->hw.cmq.csq.desc_num = HCLGEVF_NIC_CMQ_DESC_NUM; in hclgevf_cmd_queue_init()
397 hclgevf_free_cmd_desc(&hdev->hw.cmq.csq); in hclgevf_cmd_queue_init()
405 spin_lock_bh(&hdev->hw.cmq.csq.lock); in hclgevf_cmd_init()
413 hdev->hw.cmq.csq.next_to_clean = 0; in hclgevf_cmd_init()
414 hdev->hw.cmq.csq.next_to_use = 0; in hclgevf_cmd_init()
421 spin_unlock_bh(&hdev->hw.cmq.csq.lock); in hclgevf_cmd_init()
475 spin_lock_bh(&hdev->hw.cmq.csq.lock); in hclgevf_cmd_uninit()
480 spin_unlock_bh(&hdev->hw.cmq.csq.lock); in hclgevf_cmd_uninit()
481 hclgevf_free_cmd_desc(&hdev->hw.cmq.csq); in hclgevf_cmd_uninit()