Lines Matching refs:pwrb_context

1194 	struct hwi_wrb_context *pwrb_context;  in alloc_wrb_handle()  local
1200 pwrb_context = &phwi_ctrlr->wrb_context[cri_index]; in alloc_wrb_handle()
1201 if (pwrb_context->wrb_handles_available >= 2) { in alloc_wrb_handle()
1202 pwrb_handle = pwrb_context->pwrb_handle_base[ in alloc_wrb_handle()
1203 pwrb_context->alloc_index]; in alloc_wrb_handle()
1204 pwrb_context->wrb_handles_available--; in alloc_wrb_handle()
1205 if (pwrb_context->alloc_index == in alloc_wrb_handle()
1207 pwrb_context->alloc_index = 0; in alloc_wrb_handle()
1209 pwrb_context->alloc_index++; in alloc_wrb_handle()
1210 pwrb_handle_tmp = pwrb_context->pwrb_handle_base[ in alloc_wrb_handle()
1211 pwrb_context->alloc_index]; in alloc_wrb_handle()
1227 free_wrb_handle(struct beiscsi_hba *phba, struct hwi_wrb_context *pwrb_context, in free_wrb_handle() argument
1230 pwrb_context->pwrb_handle_base[pwrb_context->free_index] = pwrb_handle; in free_wrb_handle()
1231 pwrb_context->wrb_handles_available++; in free_wrb_handle()
1232 if (pwrb_context->free_index == (phba->params.wrbs_per_cxn - 1)) in free_wrb_handle()
1233 pwrb_context->free_index = 0; in free_wrb_handle()
1235 pwrb_context->free_index++; in free_wrb_handle()
1241 pwrb_handle, pwrb_context->free_index, in free_wrb_handle()
1242 pwrb_context->wrb_handles_available); in free_wrb_handle()
1416 struct hwi_wrb_context *pwrb_context; in hwi_complete_drvr_msgs() local
1437 pwrb_context = &phwi_ctrlr->wrb_context[cri_index]; in hwi_complete_drvr_msgs()
1438 pwrb_handle = pwrb_context->pwrb_handle_basestd[wrb_index]; in hwi_complete_drvr_msgs()
1523 struct hwi_wrb_context *pwrb_context; in hwi_complete_cmd() local
1540 pwrb_context = &phwi_ctrlr->wrb_context[cri_index]; in hwi_complete_cmd()
1542 pwrb_handle = pwrb_context->pwrb_handle_basestd[ in hwi_complete_cmd()
2824 struct hwi_wrb_context *pwrb_context; in beiscsi_init_wrb_handle() local
2848 pwrb_context = &phwi_ctrlr->wrb_context[index]; in beiscsi_init_wrb_handle()
2849 pwrb_context->pwrb_handle_base = in beiscsi_init_wrb_handle()
2852 if (!pwrb_context->pwrb_handle_base) { in beiscsi_init_wrb_handle()
2857 pwrb_context->pwrb_handle_basestd = in beiscsi_init_wrb_handle()
2860 if (!pwrb_context->pwrb_handle_basestd) { in beiscsi_init_wrb_handle()
2873 pwrb_context->alloc_index = 0; in beiscsi_init_wrb_handle()
2874 pwrb_context->wrb_handles_available = 0; in beiscsi_init_wrb_handle()
2875 pwrb_context->free_index = 0; in beiscsi_init_wrb_handle()
2879 pwrb_context->pwrb_handle_base[j] = pwrb_handle; in beiscsi_init_wrb_handle()
2880 pwrb_context->pwrb_handle_basestd[j] = in beiscsi_init_wrb_handle()
2882 pwrb_context->wrb_handles_available++; in beiscsi_init_wrb_handle()
2891 pwrb_context = &phwi_ctrlr->wrb_context[index]; in beiscsi_init_wrb_handle()
2902 pwrb_handle = pwrb_context->pwrb_handle_base[j]; in beiscsi_init_wrb_handle()
2912 pwrb_context = &phwi_ctrlr->wrb_context[j]; in beiscsi_init_wrb_handle()
2913 kfree(pwrb_context->pwrb_handle_base); in beiscsi_init_wrb_handle()
2914 kfree(pwrb_context->pwrb_handle_basestd); in beiscsi_init_wrb_handle()
3570 struct hwi_wrb_context *pwrb_context; in beiscsi_create_wrb_rings() local
3654 pwrb_context = &phwi_ctrlr->wrb_context[i]; in beiscsi_create_wrb_rings()
3655 BE_SET_CID_TO_CRI(i, pwrb_context->cid); in beiscsi_create_wrb_rings()
3665 struct hwi_wrb_context *pwrb_context; in free_wrb_handles() local
3669 pwrb_context = &phwi_ctrlr->wrb_context[index]; in free_wrb_handles()
3670 kfree(pwrb_context->pwrb_handle_base); in free_wrb_handles()
3671 kfree(pwrb_context->pwrb_handle_basestd); in free_wrb_handles()
4558 struct hwi_wrb_context *pwrb_context; in beiscsi_free_mgmt_task_handles() local
4564 pwrb_context = &phwi_ctrlr->wrb_context[cri_index]; in beiscsi_free_mgmt_task_handles()
4571 free_wrb_handle(phba, pwrb_context, in beiscsi_free_mgmt_task_handles()
4603 struct hwi_wrb_context *pwrb_context; in beiscsi_cleanup_task() local
4609 pwrb_context = &phwi_ctrlr->wrb_context[cri_index]; in beiscsi_cleanup_task()
4619 free_wrb_handle(phba, pwrb_context, in beiscsi_cleanup_task()
4704 struct hwi_wrb_context *pwrb_context; in beiscsi_alloc_pdu() local
4841 pwrb_context = &phwi_ctrlr->wrb_context[cri_index]; in beiscsi_alloc_pdu()
4843 free_wrb_handle(phba, pwrb_context, io_task->pwrb_handle); in beiscsi_alloc_pdu()