Lines Matching refs:mem

187 	struct config_request *mem)  in _config_alloc_config_dma_memory()  argument
191 if (mem->sz > ioc->config_page_sz) { in _config_alloc_config_dma_memory()
192 mem->page = dma_alloc_coherent(&ioc->pdev->dev, mem->sz, in _config_alloc_config_dma_memory()
193 &mem->page_dma, GFP_KERNEL); in _config_alloc_config_dma_memory()
194 if (!mem->page) { in _config_alloc_config_dma_memory()
197 ioc->name, __func__, mem->sz); in _config_alloc_config_dma_memory()
201 mem->page = ioc->config_page; in _config_alloc_config_dma_memory()
202 mem->page_dma = ioc->config_page_dma; in _config_alloc_config_dma_memory()
218 struct config_request *mem) in _config_free_config_dma_memory() argument
220 if (mem->sz > ioc->config_page_sz) in _config_free_config_dma_memory()
221 dma_free_coherent(&ioc->pdev->dev, mem->sz, mem->page, in _config_free_config_dma_memory()
222 mem->page_dma); in _config_free_config_dma_memory()
293 struct config_request mem; in _config_request() local
305 memset(&mem, 0, sizeof(struct config_request)); in _config_request()
318 mem.sz = mpi_request->Header.PageLength * 4; in _config_request()
320 mem.sz = le16_to_cpu(mpi_reply->ExtPageLength) * 4; in _config_request()
321 r = _config_alloc_config_dma_memory(ioc, &mem); in _config_request()
329 MPT3_CONFIG_COMMON_WRITE_SGLFLAGS | mem.sz, in _config_request()
330 mem.page_dma); in _config_request()
331 memcpy(mem.page, config_page, min_t(u16, mem.sz, in _config_request()
336 MPT3_CONFIG_COMMON_SGLFLAGS | mem.sz, mem.page_dma); in _config_request()
337 memset(mem.page, 0, min_t(u16, mem.sz, config_page_sz)); in _config_request()
446 u8 *p = (u8 *)mem.page; in _config_request()
454 _debug_dump_config(p, min_t(u16, mem.sz, in _config_request()
471 _debug_dump_config(p, min_t(u16, mem.sz, in _config_request()
482 memcpy(config_page, mem.page, min_t(u16, mem.sz, in _config_request()
488 _config_free_config_dma_memory(ioc, &mem); in _config_request()