summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2015-05-18 12:21:05 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2015-05-18 12:21:05 +0000
commitc84f03222673c57b3ac88a57bf3ca81b0a1ebbd7 (patch)
treebe85549b9a1d7d8dcc8032f13c17d1169ac4eb25 /sys
parentf569f3ee98e5bbb41187418d2b694c267100787c (diff)
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
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/mfi.c7
1 files 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 <marco@peereboom.us>
*
@@ -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;
}