aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri <yuri@aetern.org>2022-06-27 15:48:31 +0000
committerWarner Losh <imp@FreeBSD.org>2022-06-27 17:06:31 +0000
commitf4497b9f77795ece4d2f2fad4c0329d82d53bc63 (patch)
treec87ff078c6b3032f7d3335dd4ac2cd2995e8e8f3
parent121ecca0d82b4a5ccee1a8bb01e50b026a22bb3f (diff)
downloadsrc-f4497b9f77795ece4d2f2fad4c0329d82d53bc63.tar.gz
src-f4497b9f77795ece4d2f2fad4c0329d82d53bc63.zip
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
-rw-r--r--sys/dev/smartpqi/smartpqi_mem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/smartpqi/smartpqi_mem.c b/sys/dev/smartpqi/smartpqi_mem.c
index 1ed2a582e574..e377473c19e8 100644
--- a/sys/dev/smartpqi/smartpqi_mem.c
+++ b/sys/dev/smartpqi/smartpqi_mem.c
@@ -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;