From 8bd0e12fdfa62023d3b7829e002eda212184ef77 Mon Sep 17 00:00:00 2001 From: mikeb Date: Mon, 18 May 2015 12:21:04 +0000 Subject: [PATCH] Prevent splassert from firing during sd_flush which runs "cold" While mfi(4) should pass SCSI transfer flags (e.g. SCSI_POLL and SCSI_NOSLEEP) down to the management function, make it at least use "cold" consistently for now. ok dlg --- sys/dev/ic/mfi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c index 78e5133bdc4..535a30becf8 100644 --- a/sys/dev/ic/mfi.c +++ b/sys/dev/ic/mfi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfi.c,v 1.162 2015/03/14 03:38:47 jsg Exp $ */ +/* $OpenBSD: mfi.c,v 1.163 2015/05/18 12:21:04 mikeb Exp $ */ /* * Copyright (c) 2006 Marco Peereboom * @@ -1360,7 +1360,7 @@ mfi_do_mgmt(struct mfi_softc *sc, struct mfi_ccb *ccb, uint32_t opc, DNPRINTF(MFI_D_MISC, "%s: mfi_do_mgmt %#x\n", DEVNAME(sc), opc); - dma_buf = dma_alloc(len, PR_WAITOK); + dma_buf = dma_alloc(len, cold ? PR_NOWAIT : PR_WAITOK); if (dma_buf == NULL) goto done; @@ -1387,7 +1387,8 @@ mfi_do_mgmt(struct mfi_softc *sc, struct mfi_ccb *ccb, uint32_t opc, ccb->ccb_len = len; ccb->ccb_sgl = &dcmd->mdf_sgl; - if (mfi_create_sgl(sc, ccb, BUS_DMA_WAITOK)) { + if (mfi_create_sgl(sc, ccb, cold ? BUS_DMA_NOWAIT : + BUS_DMA_WAITOK)) { rv = EINVAL; goto done; } -- 2.20.1