Lines Matching refs:pwrb_context
1208 struct hwi_wrb_context *pwrb_context; in alloc_wrb_handle() local
1214 pwrb_context = &phwi_ctrlr->wrb_context[cri_index]; in alloc_wrb_handle()
1215 if (pwrb_context->wrb_handles_available >= 2) { in alloc_wrb_handle()
1216 pwrb_handle = pwrb_context->pwrb_handle_base[ in alloc_wrb_handle()
1217 pwrb_context->alloc_index]; in alloc_wrb_handle()
1218 pwrb_context->wrb_handles_available--; in alloc_wrb_handle()
1219 if (pwrb_context->alloc_index == in alloc_wrb_handle()
1221 pwrb_context->alloc_index = 0; in alloc_wrb_handle()
1223 pwrb_context->alloc_index++; in alloc_wrb_handle()
1226 *pcontext = pwrb_context; in alloc_wrb_handle()
1241 free_wrb_handle(struct beiscsi_hba *phba, struct hwi_wrb_context *pwrb_context, in free_wrb_handle() argument
1244 pwrb_context->pwrb_handle_base[pwrb_context->free_index] = pwrb_handle; in free_wrb_handle()
1245 pwrb_context->wrb_handles_available++; in free_wrb_handle()
1246 if (pwrb_context->free_index == (phba->params.wrbs_per_cxn - 1)) in free_wrb_handle()
1247 pwrb_context->free_index = 0; in free_wrb_handle()
1249 pwrb_context->free_index++; in free_wrb_handle()
1255 pwrb_handle, pwrb_context->free_index, in free_wrb_handle()
1256 pwrb_context->wrb_handles_available); in free_wrb_handle()
1432 struct hwi_wrb_context *pwrb_context; in hwi_complete_drvr_msgs() local
1453 pwrb_context = &phwi_ctrlr->wrb_context[cri_index]; in hwi_complete_drvr_msgs()
1454 pwrb_handle = pwrb_context->pwrb_handle_basestd[wrb_index]; in hwi_complete_drvr_msgs()
1539 struct hwi_wrb_context *pwrb_context; in hwi_complete_cmd() local
1556 pwrb_context = &phwi_ctrlr->wrb_context[cri_index]; in hwi_complete_cmd()
1558 pwrb_handle = pwrb_context->pwrb_handle_basestd[ in hwi_complete_cmd()
2845 struct hwi_wrb_context *pwrb_context; in beiscsi_init_wrb_handle() local
2869 pwrb_context = &phwi_ctrlr->wrb_context[index]; in beiscsi_init_wrb_handle()
2870 pwrb_context->pwrb_handle_base = in beiscsi_init_wrb_handle()
2873 if (!pwrb_context->pwrb_handle_base) { in beiscsi_init_wrb_handle()
2878 pwrb_context->pwrb_handle_basestd = in beiscsi_init_wrb_handle()
2881 if (!pwrb_context->pwrb_handle_basestd) { in beiscsi_init_wrb_handle()
2894 pwrb_context->alloc_index = 0; in beiscsi_init_wrb_handle()
2895 pwrb_context->wrb_handles_available = 0; in beiscsi_init_wrb_handle()
2896 pwrb_context->free_index = 0; in beiscsi_init_wrb_handle()
2900 pwrb_context->pwrb_handle_base[j] = pwrb_handle; in beiscsi_init_wrb_handle()
2901 pwrb_context->pwrb_handle_basestd[j] = in beiscsi_init_wrb_handle()
2903 pwrb_context->wrb_handles_available++; in beiscsi_init_wrb_handle()
2912 pwrb_context = &phwi_ctrlr->wrb_context[index]; in beiscsi_init_wrb_handle()
2923 pwrb_handle = pwrb_context->pwrb_handle_base[j]; in beiscsi_init_wrb_handle()
2933 pwrb_context = &phwi_ctrlr->wrb_context[j]; in beiscsi_init_wrb_handle()
2934 kfree(pwrb_context->pwrb_handle_base); in beiscsi_init_wrb_handle()
2935 kfree(pwrb_context->pwrb_handle_basestd); in beiscsi_init_wrb_handle()
3591 struct hwi_wrb_context *pwrb_context; in beiscsi_create_wrb_rings() local
3675 pwrb_context = &phwi_ctrlr->wrb_context[i]; in beiscsi_create_wrb_rings()
3676 BE_SET_CID_TO_CRI(i, pwrb_context->cid); in beiscsi_create_wrb_rings()
3686 struct hwi_wrb_context *pwrb_context; in free_wrb_handles() local
3690 pwrb_context = &phwi_ctrlr->wrb_context[index]; in free_wrb_handles()
3691 kfree(pwrb_context->pwrb_handle_base); in free_wrb_handles()
3692 kfree(pwrb_context->pwrb_handle_basestd); in free_wrb_handles()
4594 struct hwi_wrb_context *pwrb_context; in beiscsi_free_mgmt_task_handles() local
4600 pwrb_context = &phwi_ctrlr->wrb_context[cri_index]; in beiscsi_free_mgmt_task_handles()
4607 free_wrb_handle(phba, pwrb_context, in beiscsi_free_mgmt_task_handles()
4641 struct hwi_wrb_context *pwrb_context; in beiscsi_cleanup_task() local
4647 pwrb_context = &phwi_ctrlr->wrb_context[cri_index]; in beiscsi_cleanup_task()
4657 free_wrb_handle(phba, pwrb_context, in beiscsi_cleanup_task()
4684 struct hwi_wrb_context *pwrb_context = NULL; in beiscsi_offload_connection() local
4700 &pwrb_context); in beiscsi_offload_connection()
4706 pwrb_context); in beiscsi_offload_connection()
4709 pwrb_context); in beiscsi_offload_connection()
4746 struct hwi_wrb_context *pwrb_context; in beiscsi_alloc_pdu() local
4780 &io_task->pwrb_context); in beiscsi_alloc_pdu()
4815 &io_task->pwrb_context); in beiscsi_alloc_pdu()
4852 &io_task->pwrb_context); in beiscsi_alloc_pdu()
4886 pwrb_context = &phwi_ctrlr->wrb_context[cri_index]; in beiscsi_alloc_pdu()
4888 free_wrb_handle(phba, pwrb_context, io_task->pwrb_handle); in beiscsi_alloc_pdu()
4939 if (io_task->pwrb_context->plast_wrb) in beiscsi_iotask_v2()
4941 io_task->pwrb_context->plast_wrb, in beiscsi_iotask_v2()
4943 io_task->pwrb_context->plast_wrb = pwrb; in beiscsi_iotask_v2()
5001 if (io_task->pwrb_context->plast_wrb) in beiscsi_iotask()
5003 io_task->pwrb_context->plast_wrb, in beiscsi_iotask()
5005 io_task->pwrb_context->plast_wrb = pwrb; in beiscsi_iotask()
5045 if (io_task->pwrb_context->plast_wrb) in beiscsi_mtask()
5047 io_task->pwrb_context->plast_wrb, in beiscsi_mtask()
5049 io_task->pwrb_context->plast_wrb = pwrb; in beiscsi_mtask()
5063 if (io_task->pwrb_context->plast_wrb) in beiscsi_mtask()
5065 io_task->pwrb_context->plast_wrb, in beiscsi_mtask()
5067 io_task->pwrb_context->plast_wrb = pwrb; in beiscsi_mtask()