Lines Matching refs:mem

189 	struct config_request *mem)  in _config_alloc_config_dma_memory()  argument
193 if (mem->sz > ioc->config_page_sz) { in _config_alloc_config_dma_memory()
194 mem->page = dma_alloc_coherent(&ioc->pdev->dev, mem->sz, in _config_alloc_config_dma_memory()
195 &mem->page_dma, GFP_KERNEL); in _config_alloc_config_dma_memory()
196 if (!mem->page) { in _config_alloc_config_dma_memory()
199 ioc->name, __func__, mem->sz); in _config_alloc_config_dma_memory()
203 mem->page = ioc->config_page; in _config_alloc_config_dma_memory()
204 mem->page_dma = ioc->config_page_dma; in _config_alloc_config_dma_memory()
220 struct config_request *mem) in _config_free_config_dma_memory() argument
222 if (mem->sz > ioc->config_page_sz) in _config_free_config_dma_memory()
223 dma_free_coherent(&ioc->pdev->dev, mem->sz, mem->page, in _config_free_config_dma_memory()
224 mem->page_dma); in _config_free_config_dma_memory()
297 struct config_request mem; in _config_request() local
309 memset(&mem, 0, sizeof(struct config_request)); in _config_request()
322 mem.sz = mpi_request->Header.PageLength * 4; in _config_request()
324 mem.sz = le16_to_cpu(mpi_reply->ExtPageLength) * 4; in _config_request()
325 r = _config_alloc_config_dma_memory(ioc, &mem); in _config_request()
333 MPT3_CONFIG_COMMON_WRITE_SGLFLAGS | mem.sz, in _config_request()
334 mem.page_dma); in _config_request()
335 memcpy(mem.page, config_page, min_t(u16, mem.sz, in _config_request()
340 MPT3_CONFIG_COMMON_SGLFLAGS | mem.sz, mem.page_dma); in _config_request()
341 memset(mem.page, 0, min_t(u16, mem.sz, config_page_sz)); in _config_request()
452 u8 *p = (u8 *)mem.page; in _config_request()
460 _debug_dump_config(p, min_t(u16, mem.sz, in _config_request()
477 _debug_dump_config(p, min_t(u16, mem.sz, in _config_request()
488 memcpy(config_page, mem.page, min_t(u16, mem.sz, in _config_request()
494 _config_free_config_dma_memory(ioc, &mem); in _config_request()