git: f4497b9f7779 - main - smartpqi: Allocate DMA memory NOWAIT
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 27 Jun 2022 17:07:56 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=f4497b9f77795ece4d2f2fad4c0329d82d53bc63
commit f4497b9f77795ece4d2f2fad4c0329d82d53bc63
Author: Yuri <yuri@aetern.org>
AuthorDate: 2022-06-27 15:48:31 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-06-27 17:06:31 +0000
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 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;