Lines Matching refs:qp

377 static int ehea_qp_alloc_register(struct ehea_qp *qp, struct hw_queue *hw_queue,  in ehea_qp_alloc_register()  argument
398 qp->fw_handle, rpage, 1); in ehea_qp_alloc_register()
422 struct ehea_qp *qp; in ehea_create_qp() local
427 qp = kzalloc(sizeof(*qp), GFP_KERNEL); in ehea_create_qp()
428 if (!qp) in ehea_create_qp()
431 qp->adapter = adapter; in ehea_create_qp()
434 &qp->fw_handle, &qp->epas); in ehea_create_qp()
445 ret = ehea_qp_alloc_register(qp, &qp->hw_squeue, init_attr->nr_sq_pages, in ehea_create_qp()
454 ret = ehea_qp_alloc_register(qp, &qp->hw_rqueue1, in ehea_create_qp()
465 ret = ehea_qp_alloc_register(qp, &qp->hw_rqueue2, in ehea_create_qp()
477 ret = ehea_qp_alloc_register(qp, &qp->hw_rqueue3, in ehea_create_qp()
488 qp->init_attr = *init_attr; in ehea_create_qp()
490 return qp; in ehea_create_qp()
493 hw_queue_dtor(&qp->hw_rqueue2); in ehea_create_qp()
496 hw_queue_dtor(&qp->hw_rqueue1); in ehea_create_qp()
499 hw_queue_dtor(&qp->hw_squeue); in ehea_create_qp()
502 ehea_h_disable_and_get_hea(adapter->handle, qp->fw_handle); in ehea_create_qp()
503 ehea_h_free_resource(adapter->handle, qp->fw_handle, FORCE_FREE); in ehea_create_qp()
506 kfree(qp); in ehea_create_qp()
510 static u64 ehea_destroy_qp_res(struct ehea_qp *qp, u64 force) in ehea_destroy_qp_res() argument
513 struct ehea_qp_init_attr *qp_attr = &qp->init_attr; in ehea_destroy_qp_res()
516 ehea_h_disable_and_get_hea(qp->adapter->handle, qp->fw_handle); in ehea_destroy_qp_res()
517 hret = ehea_h_free_resource(qp->adapter->handle, qp->fw_handle, force); in ehea_destroy_qp_res()
521 hw_queue_dtor(&qp->hw_squeue); in ehea_destroy_qp_res()
522 hw_queue_dtor(&qp->hw_rqueue1); in ehea_destroy_qp_res()
525 hw_queue_dtor(&qp->hw_rqueue2); in ehea_destroy_qp_res()
527 hw_queue_dtor(&qp->hw_rqueue3); in ehea_destroy_qp_res()
528 kfree(qp); in ehea_destroy_qp_res()
533 int ehea_destroy_qp(struct ehea_qp *qp) in ehea_destroy_qp() argument
536 if (!qp) in ehea_destroy_qp()
539 hcp_epas_dtor(&qp->epas); in ehea_destroy_qp()
541 hret = ehea_destroy_qp_res(qp, NORMAL_FREE); in ehea_destroy_qp()
543 ehea_error_data(qp->adapter, qp->fw_handle, &aer, &aerr); in ehea_destroy_qp()
544 hret = ehea_destroy_qp_res(qp, FORCE_FREE); in ehea_destroy_qp()