smartpqi: Allocate DMA memory NOWAIT

We're not allowed to wait in this allocation path, so allocate the
memory NOWAIT instead of WAITOK. The code already copes with the
failures that may result, so no additional code is needed.

PR: 263008
Reviewed by: markj, Scott Benesh at Microsemi, imp
Differential Revision: https://reviews.freebsd.org/D35601
This commit is contained in:
Yuri 2022-06-27 09:48:31 -06:00 committed by Warner Losh
parent 121ecca0d8
commit f4497b9f77

View File

@ -99,7 +99,7 @@ os_dma_mem_alloc(pqisrc_softstate_t *softs, struct dma_mem *dma_mem)
}
if ((ret = bus_dmamem_alloc(dma_mem->dma_tag, (void **)&dma_mem->virt_addr,
BUS_DMA_WAITOK, &dma_mem->dma_map)) != 0) {
BUS_DMA_NOWAIT, &dma_mem->dma_map)) != 0) {
DBG_ERR("can't allocate DMA memory for required object \
with error = 0x%x\n", ret);
goto err_mem;