diff options
author | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2018-05-18 05:20:33 +0000 |
---|---|---|
committer | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2018-05-18 05:20:33 +0000 |
commit | e30be8cc2472920a9728be53d98c879bc32b4f6c (patch) | |
tree | 59e4bb2b9e852e45f4b4d79e8002c801341e2d12 /sys/dev | |
parent | 9076128d906159dd11c23fbbe50d745c57233f3a (diff) |
Use SCSI_NOSLEEP for management commands issued during attach.
No real change because we'll never run out of ccbs that early.
Noticed during review of the preceding changes.
ok dlg@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/mfii.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/pci/mfii.c b/sys/dev/pci/mfii.c index abb0ed6279d..7b06915dbdd 100644 --- a/sys/dev/pci/mfii.c +++ b/sys/dev/pci/mfii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfii.c,v 1.54 2018/05/18 05:17:40 jmatthew Exp $ */ +/* $OpenBSD: mfii.c,v 1.55 2018/05/18 05:20:32 jmatthew Exp $ */ /* * Copyright (c) 2012 David Gwynne <dlg@openbsd.org> @@ -1062,7 +1062,7 @@ mfii_aen_register(struct mfii_softc *sc) struct mfii_dmamem *mdm; int rv; - ccb = scsi_io_get(&sc->sc_iopool, 0); + ccb = scsi_io_get(&sc->sc_iopool, SCSI_NOSLEEP); if (ccb == NULL) { printf("%s: unable to allocate ccb for aen\n", DEVNAME(sc)); return (ENOMEM); @@ -1824,7 +1824,11 @@ mfii_initialise_firmware(struct mfii_softc *sc) iiq->timestamp = htole64(time_uptime); - ccb = scsi_io_get(&sc->sc_iopool, 0); + ccb = scsi_io_get(&sc->sc_iopool, SCSI_NOSLEEP); + if (ccb == NULL) { + /* shouldn't ever run out of ccbs during attach */ + return (1); + } mfii_scrub_ccb(ccb); init = ccb->ccb_request; |