Lines Matching refs:qp
382 int ehea_qp_alloc_register(struct ehea_qp *qp, struct hw_queue *hw_queue, in ehea_qp_alloc_register() argument
403 qp->fw_handle, rpage, 1); in ehea_qp_alloc_register()
427 struct ehea_qp *qp; in ehea_create_qp() local
432 qp = kzalloc(sizeof(*qp), GFP_KERNEL); in ehea_create_qp()
433 if (!qp) { in ehea_create_qp()
438 qp->adapter = adapter; in ehea_create_qp()
441 &qp->fw_handle, &qp->epas); in ehea_create_qp()
452 ret = ehea_qp_alloc_register(qp, &qp->hw_squeue, init_attr->nr_sq_pages, in ehea_create_qp()
461 ret = ehea_qp_alloc_register(qp, &qp->hw_rqueue1, in ehea_create_qp()
472 ret = ehea_qp_alloc_register(qp, &qp->hw_rqueue2, in ehea_create_qp()
484 ret = ehea_qp_alloc_register(qp, &qp->hw_rqueue3, in ehea_create_qp()
495 qp->init_attr = *init_attr; in ehea_create_qp()
497 return qp; in ehea_create_qp()
500 hw_queue_dtor(&qp->hw_rqueue2); in ehea_create_qp()
503 hw_queue_dtor(&qp->hw_rqueue1); in ehea_create_qp()
506 hw_queue_dtor(&qp->hw_squeue); in ehea_create_qp()
509 ehea_h_disable_and_get_hea(adapter->handle, qp->fw_handle); in ehea_create_qp()
510 ehea_h_free_resource(adapter->handle, qp->fw_handle, FORCE_FREE); in ehea_create_qp()
513 kfree(qp); in ehea_create_qp()
517 u64 ehea_destroy_qp_res(struct ehea_qp *qp, u64 force) in ehea_destroy_qp_res() argument
520 struct ehea_qp_init_attr *qp_attr = &qp->init_attr; in ehea_destroy_qp_res()
523 ehea_h_disable_and_get_hea(qp->adapter->handle, qp->fw_handle); in ehea_destroy_qp_res()
524 hret = ehea_h_free_resource(qp->adapter->handle, qp->fw_handle, force); in ehea_destroy_qp_res()
528 hw_queue_dtor(&qp->hw_squeue); in ehea_destroy_qp_res()
529 hw_queue_dtor(&qp->hw_rqueue1); in ehea_destroy_qp_res()
532 hw_queue_dtor(&qp->hw_rqueue2); in ehea_destroy_qp_res()
534 hw_queue_dtor(&qp->hw_rqueue3); in ehea_destroy_qp_res()
535 kfree(qp); in ehea_destroy_qp_res()
540 int ehea_destroy_qp(struct ehea_qp *qp) in ehea_destroy_qp() argument
543 if (!qp) in ehea_destroy_qp()
546 hcp_epas_dtor(&qp->epas); in ehea_destroy_qp()
548 hret = ehea_destroy_qp_res(qp, NORMAL_FREE); in ehea_destroy_qp()
550 ehea_error_data(qp->adapter, qp->fw_handle); in ehea_destroy_qp()
551 hret = ehea_destroy_qp_res(qp, FORCE_FREE); in ehea_destroy_qp()