Lines Matching refs:csq
1175 struct hns_roce_v2_cmq_ring *csq) in init_csq() argument
1180 csq->desc_num = CMD_CSQ_DESC_NUM; in init_csq()
1181 spin_lock_init(&csq->lock); in init_csq()
1182 csq->flag = TYPE_CSQ; in init_csq()
1183 csq->head = 0; in init_csq()
1185 ret = hns_roce_alloc_cmq_desc(hr_dev, csq); in init_csq()
1189 dma = csq->desc_dma_addr; in init_csq()
1193 (u32)csq->desc_num >> HNS_ROCE_CMQ_DESC_NUM_S); in init_csq()
1209 ret = init_csq(hr_dev, &priv->cmq.csq); in hns_roce_v2_cmq_init()
1220 hns_roce_free_cmq_desc(hr_dev, &priv->cmq.csq); in hns_roce_v2_cmq_exit()
1241 return tail == priv->cmq.csq.head; in hns_roce_cmq_csq_done()
1309 struct hns_roce_v2_cmq_ring *csq = &priv->cmq.csq; in __hns_roce_cmq_send() local
1315 spin_lock_bh(&csq->lock); in __hns_roce_cmq_send()
1317 tail = csq->head; in __hns_roce_cmq_send()
1320 csq->desc[csq->head++] = desc[i]; in __hns_roce_cmq_send()
1321 if (csq->head == csq->desc_num) in __hns_roce_cmq_send()
1322 csq->head = 0; in __hns_roce_cmq_send()
1326 roce_write(hr_dev, ROCEE_TX_CMQ_PI_REG, csq->head); in __hns_roce_cmq_send()
1335 desc[i] = csq->desc[tail++]; in __hns_roce_cmq_send()
1336 if (tail == csq->desc_num) in __hns_roce_cmq_send()
1352 csq->head, tail); in __hns_roce_cmq_send()
1353 csq->head = tail; in __hns_roce_cmq_send()
1360 spin_unlock_bh(&csq->lock); in __hns_roce_cmq_send()