Lines Matching refs:cq
15 struct hw_cq *cq = NULL; in efct_hw_init_queues() local
44 cq = efct_hw_new_cq(eq, in efct_hw_init_queues()
46 if (!cq) { in efct_hw_init_queues()
51 mq = efct_hw_new_mq(cq, EFCT_HW_MQ_DEPTH); in efct_hw_init_queues()
59 cq = efct_hw_new_cq(eq, hw->num_qentries[SLI4_QTYPE_CQ]); in efct_hw_init_queues()
60 if (!cq) { in efct_hw_init_queues()
65 wq = efct_hw_new_wq(cq, hw->num_qentries[SLI4_QTYPE_WQ]); in efct_hw_init_queues()
162 struct hw_cq *cq = kzalloc(sizeof(*cq), GFP_KERNEL); in efct_hw_new_cq() local
164 if (!cq) in efct_hw_new_cq()
167 cq->eq = eq; in efct_hw_new_cq()
168 cq->type = SLI4_QTYPE_CQ; in efct_hw_new_cq()
169 cq->instance = eq->hw->cq_count++; in efct_hw_new_cq()
170 cq->entry_count = entry_count; in efct_hw_new_cq()
171 cq->queue = &hw->cq[cq->instance]; in efct_hw_new_cq()
173 INIT_LIST_HEAD(&cq->q_list); in efct_hw_new_cq()
175 if (sli_queue_alloc(&hw->sli, SLI4_QTYPE_CQ, cq->queue, in efct_hw_new_cq()
176 cq->entry_count, eq->queue)) { in efct_hw_new_cq()
179 kfree(cq); in efct_hw_new_cq()
183 hw->hw_cq[cq->instance] = cq; in efct_hw_new_cq()
184 INIT_LIST_HEAD(&cq->list_entry); in efct_hw_new_cq()
185 list_add_tail(&cq->list_entry, &eq->cq_list); in efct_hw_new_cq()
186 efc_log_debug(hw->os, "create cq[%2d] id %3d len %4d\n", cq->instance, in efct_hw_new_cq()
187 cq->queue->id, cq->entry_count); in efct_hw_new_cq()
188 return cq; in efct_hw_new_cq()
198 struct hw_cq *cq = NULL; in efct_hw_new_cq_set() local
207 cq = kzalloc(sizeof(*cq), GFP_KERNEL); in efct_hw_new_cq_set()
208 if (!cq) in efct_hw_new_cq_set()
211 cqs[i] = cq; in efct_hw_new_cq_set()
212 cq->eq = eqs[i]; in efct_hw_new_cq_set()
213 cq->type = SLI4_QTYPE_CQ; in efct_hw_new_cq_set()
214 cq->instance = hw->cq_count++; in efct_hw_new_cq_set()
215 cq->entry_count = entry_count; in efct_hw_new_cq_set()
216 cq->queue = &hw->cq[cq->instance]; in efct_hw_new_cq_set()
217 qs[i] = cq->queue; in efct_hw_new_cq_set()
219 INIT_LIST_HEAD(&cq->q_list); in efct_hw_new_cq_set()
244 efct_hw_new_mq(struct hw_cq *cq, u32 entry_count) in efct_hw_new_mq() argument
246 struct efct_hw *hw = cq->eq->hw; in efct_hw_new_mq()
252 mq->cq = cq; in efct_hw_new_mq()
254 mq->instance = cq->eq->hw->mq_count++; in efct_hw_new_mq()
260 cq->queue)) { in efct_hw_new_mq()
268 list_add_tail(&mq->list_entry, &cq->q_list); in efct_hw_new_mq()
275 efct_hw_new_wq(struct hw_cq *cq, u32 entry_count) in efct_hw_new_wq() argument
277 struct efct_hw *hw = cq->eq->hw; in efct_hw_new_wq()
283 wq->hw = cq->eq->hw; in efct_hw_new_wq()
284 wq->cq = cq; in efct_hw_new_wq()
286 wq->instance = cq->eq->hw->wq_count++; in efct_hw_new_wq()
295 wq->entry_count, cq->queue)) { in efct_hw_new_wq()
303 list_add_tail(&wq->list_entry, &cq->q_list); in efct_hw_new_wq()
333 rq->cq = cqs[i]; in efct_hw_new_rq_set()
390 struct hw_cq *cq; in efct_hw_del_eq() local
396 list_for_each_entry_safe(cq, cq_next, &eq->cq_list, list_entry) in efct_hw_del_eq()
397 efct_hw_del_cq(cq); in efct_hw_del_eq()
404 efct_hw_del_cq(struct hw_cq *cq) in efct_hw_del_cq() argument
409 if (!cq) in efct_hw_del_cq()
412 list_for_each_entry_safe(q, q_next, &cq->q_list, list_entry) { in efct_hw_del_cq()
427 list_del(&cq->list_entry); in efct_hw_del_cq()
428 cq->eq->hw->hw_cq[cq->instance] = NULL; in efct_hw_del_cq()
429 kfree(cq); in efct_hw_del_cq()
439 mq->cq->eq->hw->hw_mq[mq->instance] = NULL; in efct_hw_del_mq()
450 wq->cq->eq->hw->hw_wq[wq->instance] = NULL; in efct_hw_del_wq()
465 hw = rq->cq->eq->hw; in efct_hw_del_rq()
521 efct_hw_rqpair_process_rq(struct efct_hw *hw, struct hw_cq *cq, in efct_hw_rqpair_process_rq() argument
594 seq->hw_priv = cq->eq; in efct_hw_rqpair_process_rq()