Lines Matching refs:mem_descr
2469 struct be_mem_descriptor *mem_descr; in beiscsi_alloc_mem() local
2487 phba->init_mem = kcalloc(SE_MEM_MAX, sizeof(*mem_descr), in beiscsi_alloc_mem()
2505 mem_descr = phba->init_mem; in beiscsi_alloc_mem()
2508 mem_descr->mem_array = NULL; in beiscsi_alloc_mem()
2509 mem_descr++; in beiscsi_alloc_mem()
2543 mem_descr->num_elements = j; in beiscsi_alloc_mem()
2544 mem_descr->size_in_bytes = phba->mem_req[i]; in beiscsi_alloc_mem()
2545 mem_descr->mem_array = kmalloc_array(j, sizeof(*mem_arr), in beiscsi_alloc_mem()
2547 if (!mem_descr->mem_array) in beiscsi_alloc_mem()
2550 memcpy(mem_descr->mem_array, mem_arr_orig, in beiscsi_alloc_mem()
2552 mem_descr++; in beiscsi_alloc_mem()
2557 mem_descr->num_elements = j; in beiscsi_alloc_mem()
2559 for (j = mem_descr->num_elements; j > 0; j--) { in beiscsi_alloc_mem()
2561 mem_descr->mem_array[j - 1].size, in beiscsi_alloc_mem()
2562 mem_descr->mem_array[j - 1]. in beiscsi_alloc_mem()
2564 (unsigned long)mem_descr-> in beiscsi_alloc_mem()
2570 kfree(mem_descr->mem_array); in beiscsi_alloc_mem()
2571 mem_descr--; in beiscsi_alloc_mem()
2591 struct be_mem_descriptor *mem_descr; in iscsi_init_global_templates() local
2593 mem_descr = phba->init_mem; in iscsi_init_global_templates()
2594 mem_descr += ISCSI_MEM_GLOBAL_HEADER; in iscsi_init_global_templates()
2596 (struct pdu_data_out *)mem_descr->mem_array[0].virtual_address; in iscsi_init_global_templates()
2603 (struct pdu_nop_out *)((unsigned char *)mem_descr->mem_array[0]. in iscsi_init_global_templates()
2725 struct be_mem_descriptor *mem_descr; in hwi_init_async_pdu_ctx() local
2730 mem_descr = (struct be_mem_descriptor *)phba->init_mem; in hwi_init_async_pdu_ctx()
2731 mem_descr += (HWI_MEM_ASYNC_PDU_CONTEXT_ULP0 + in hwi_init_async_pdu_ctx()
2737 mem_descr->mem_array[0].virtual_address; in hwi_init_async_pdu_ctx()
2750 mem_descr = (struct be_mem_descriptor *)phba->init_mem; in hwi_init_async_pdu_ctx()
2751 mem_descr += HWI_MEM_ASYNC_HEADER_BUF_ULP0 + in hwi_init_async_pdu_ctx()
2753 if (mem_descr->mem_array[0].virtual_address) { in hwi_init_async_pdu_ctx()
2758 mem_descr->mem_array[0]. in hwi_init_async_pdu_ctx()
2769 mem_descr->mem_array[0].virtual_address; in hwi_init_async_pdu_ctx()
2772 mem_descr->mem_array[0]. in hwi_init_async_pdu_ctx()
2776 mem_descr = (struct be_mem_descriptor *)phba->init_mem; in hwi_init_async_pdu_ctx()
2777 mem_descr += HWI_MEM_ASYNC_HEADER_RING_ULP0 + in hwi_init_async_pdu_ctx()
2779 if (mem_descr->mem_array[0].virtual_address) { in hwi_init_async_pdu_ctx()
2784 mem_descr->mem_array[0]. in hwi_init_async_pdu_ctx()
2793 mem_descr->mem_array[0].virtual_address; in hwi_init_async_pdu_ctx()
2796 mem_descr = (struct be_mem_descriptor *)phba->init_mem; in hwi_init_async_pdu_ctx()
2797 mem_descr += HWI_MEM_ASYNC_HEADER_HANDLE_ULP0 + in hwi_init_async_pdu_ctx()
2799 if (mem_descr->mem_array[0].virtual_address) { in hwi_init_async_pdu_ctx()
2804 mem_descr->mem_array[0]. in hwi_init_async_pdu_ctx()
2813 mem_descr->mem_array[0].virtual_address; in hwi_init_async_pdu_ctx()
2816 mem_descr = (struct be_mem_descriptor *)phba->init_mem; in hwi_init_async_pdu_ctx()
2817 mem_descr += HWI_MEM_ASYNC_DATA_RING_ULP0 + in hwi_init_async_pdu_ctx()
2819 if (mem_descr->mem_array[0].virtual_address) { in hwi_init_async_pdu_ctx()
2824 mem_descr->mem_array[0]. in hwi_init_async_pdu_ctx()
2833 mem_descr->mem_array[0].virtual_address; in hwi_init_async_pdu_ctx()
2836 mem_descr = (struct be_mem_descriptor *)phba->init_mem; in hwi_init_async_pdu_ctx()
2837 mem_descr += HWI_MEM_ASYNC_DATA_HANDLE_ULP0 + in hwi_init_async_pdu_ctx()
2839 if (!mem_descr->mem_array[0].virtual_address) in hwi_init_async_pdu_ctx()
2846 mem_descr->mem_array[0].virtual_address; in hwi_init_async_pdu_ctx()
2856 mem_descr = (struct be_mem_descriptor *)phba->init_mem; in hwi_init_async_pdu_ctx()
2857 mem_descr += HWI_MEM_ASYNC_DATA_BUF_ULP0 + in hwi_init_async_pdu_ctx()
2859 if (mem_descr->mem_array[0].virtual_address) { in hwi_init_async_pdu_ctx()
2864 mem_descr->mem_array[0]. in hwi_init_async_pdu_ctx()
2876 mem_descr->mem_array[idx].virtual_address; in hwi_init_async_pdu_ctx()
2878 mem_descr->mem_array[idx]. in hwi_init_async_pdu_ctx()
2881 num_async_data = ((mem_descr->mem_array[idx].size) / in hwi_init_async_pdu_ctx()
2916 mem_descr->mem_array[idx]. in hwi_init_async_pdu_ctx()
2920 mem_descr->mem_array[idx]. in hwi_init_async_pdu_ctx()
2923 ((mem_descr->mem_array[idx]. in hwi_init_async_pdu_ctx()
3149 struct be_mem_descriptor *mem_descr; in beiscsi_create_def_hdr() local
3156 mem_descr = phba->init_mem; in beiscsi_create_def_hdr()
3157 mem_descr += HWI_MEM_ASYNC_HEADER_RING_ULP0 + in beiscsi_create_def_hdr()
3159 dq_vaddress = mem_descr->mem_array[idx].virtual_address; in beiscsi_create_def_hdr()
3160 ret = be_fill_queue(dq, mem_descr->mem_array[0].size / in beiscsi_create_def_hdr()
3170 mem->dma = (unsigned long)mem_descr->mem_array[idx]. in beiscsi_create_def_hdr()
3201 struct be_mem_descriptor *mem_descr; in beiscsi_create_def_data() local
3208 mem_descr = phba->init_mem; in beiscsi_create_def_data()
3209 mem_descr += HWI_MEM_ASYNC_DATA_RING_ULP0 + in beiscsi_create_def_data()
3211 dq_vaddress = mem_descr->mem_array[idx].virtual_address; in beiscsi_create_def_data()
3212 ret = be_fill_queue(dataq, mem_descr->mem_array[0].size / in beiscsi_create_def_data()
3223 mem->dma = (unsigned long)mem_descr->mem_array[idx]. in beiscsi_create_def_data()
3252 struct be_mem_descriptor *mem_descr; in beiscsi_post_template_hdr() local
3259 mem_descr = (struct be_mem_descriptor *)phba->init_mem; in beiscsi_post_template_hdr()
3260 mem_descr += HWI_MEM_TEMPLATE_HDR_ULP0 + in beiscsi_post_template_hdr()
3262 pm_arr = mem_descr->mem_array; in beiscsi_post_template_hdr()
3286 struct be_mem_descriptor *mem_descr; in beiscsi_post_pages() local
3292 mem_descr = phba->init_mem; in beiscsi_post_pages()
3293 mem_descr += HWI_MEM_SGE; in beiscsi_post_pages()
3294 pm_arr = mem_descr->mem_array; in beiscsi_post_pages()
3302 for (i = 0; i < mem_descr->num_elements; i++) { in beiscsi_post_pages()
3357 struct be_mem_descriptor *mem_descr; in beiscsi_create_wrb_rings() local
3364 mem_descr = phba->init_mem; in beiscsi_create_wrb_rings()
3365 mem_descr += HWI_MEM_WRB; in beiscsi_create_wrb_rings()
3374 wrb_vaddr = mem_descr->mem_array[idx].virtual_address; in beiscsi_create_wrb_rings()
3375 pa_addr_lo = mem_descr->mem_array[idx].bus_address.u.a64.address; in beiscsi_create_wrb_rings()
3376 num_wrb_rings = mem_descr->mem_array[idx].size / in beiscsi_create_wrb_rings()
3390 wrb_vaddr = mem_descr->mem_array[idx].virtual_address; in beiscsi_create_wrb_rings()
3391 pa_addr_lo = mem_descr->mem_array[idx]. in beiscsi_create_wrb_rings()
3393 num_wrb_rings = mem_descr->mem_array[idx].size / in beiscsi_create_wrb_rings()
3870 struct be_mem_descriptor *mem_descr; in beiscsi_free_mem() local
3873 mem_descr = phba->init_mem; in beiscsi_free_mem()
3875 for (j = mem_descr->num_elements; j > 0; j--) { in beiscsi_free_mem()
3877 mem_descr->mem_array[j - 1].size, in beiscsi_free_mem()
3878 mem_descr->mem_array[j - 1].virtual_address, in beiscsi_free_mem()
3879 (unsigned long)mem_descr->mem_array[j - 1]. in beiscsi_free_mem()
3883 kfree(mem_descr->mem_array); in beiscsi_free_mem()
3884 mem_descr++; in beiscsi_free_mem()