From f4497b9f77795ece4d2f2fad4c0329d82d53bc63 Mon Sep 17 00:00:00 2001 From: Yuri Date: Mon, 27 Jun 2022 09:48:31 -0600 Subject: [PATCH] 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 --- sys/dev/smartpqi/smartpqi_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/smartpqi/smartpqi_mem.c b/sys/dev/smartpqi/smartpqi_mem.c index 1ed2a582e57..e377473c19e 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;