Lines Matching refs:ofap
8701 struct pqi_ofa_memory *ofap; in pqi_ofa_alloc_mem() local
8705 ofap = ctrl_info->pqi_ofa_mem_virt_addr; in pqi_ofa_alloc_mem()
8722 mem_descriptor = &ofap->sg_descriptor[i]; in pqi_ofa_alloc_mem()
8728 put_unaligned_le16(sg_count, &ofap->num_memory_descriptors); in pqi_ofa_alloc_mem()
8729 put_unaligned_le32(sg_count * chunk_size, &ofap->bytes_allocated); in pqi_ofa_alloc_mem()
8735 mem_descriptor = &ofap->sg_descriptor[i]; in pqi_ofa_alloc_mem()
8772 struct pqi_ofa_memory *ofap; in pqi_ofa_setup_host_buffer() local
8776 ofap = dma_alloc_coherent(dev, sizeof(*ofap), in pqi_ofa_setup_host_buffer()
8778 if (!ofap) in pqi_ofa_setup_host_buffer()
8781 ctrl_info->pqi_ofa_mem_virt_addr = ofap; in pqi_ofa_setup_host_buffer()
8786 dma_free_coherent(dev, sizeof(*ofap), ofap, ctrl_info->pqi_ofa_mem_dma_handle); in pqi_ofa_setup_host_buffer()
8791 put_unaligned_le16(PQI_OFA_VERSION, &ofap->version); in pqi_ofa_setup_host_buffer()
8792 memcpy(&ofap->signature, PQI_OFA_SIGNATURE, sizeof(ofap->signature)); in pqi_ofa_setup_host_buffer()
8799 struct pqi_ofa_memory *ofap; in pqi_ofa_free_host_buffer() local
8803 ofap = ctrl_info->pqi_ofa_mem_virt_addr; in pqi_ofa_free_host_buffer()
8804 if (!ofap) in pqi_ofa_free_host_buffer()
8809 if (get_unaligned_le32(&ofap->bytes_allocated) == 0) in pqi_ofa_free_host_buffer()
8812 mem_descriptor = ofap->sg_descriptor; in pqi_ofa_free_host_buffer()
8814 get_unaligned_le16(&ofap->num_memory_descriptors); in pqi_ofa_free_host_buffer()
8825 dma_free_coherent(dev, sizeof(*ofap), ofap, in pqi_ofa_free_host_buffer()
8834 struct pqi_ofa_memory *ofap; in pqi_ofa_host_memory_update() local
8844 ofap = ctrl_info->pqi_ofa_mem_virt_addr; in pqi_ofa_host_memory_update()
8846 if (ofap) { in pqi_ofa_host_memory_update()
8848 get_unaligned_le16(&ofap->num_memory_descriptors) * in pqi_ofa_host_memory_update()