diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2010-07-07 05:35:49 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2010-07-07 05:35:49 +0000 |
commit | 5357960ddf54bab7884da4e01b2bb9190a2e3e4d (patch) | |
tree | 8dd727ed63635fac934976d0d90e4e504953d6bd /sys/dev/pci/mpii.c | |
parent | 4b063f3bf56e5fe1644e24c36e8ceb0a984c606e (diff) |
let the config page request code sleep while waiting for a ccb if it is
allowed to.
Diffstat (limited to 'sys/dev/pci/mpii.c')
-rw-r--r-- | sys/dev/pci/mpii.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/pci/mpii.c b/sys/dev/pci/mpii.c index 53978bad1a4..d783a6607ce 100644 --- a/sys/dev/pci/mpii.c +++ b/sys/dev/pci/mpii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpii.c,v 1.27 2010/07/07 05:25:53 dlg Exp $ */ +/* $OpenBSD: mpii.c,v 1.28 2010/07/07 05:35:48 dlg Exp $ */ /* * Copyright (c) 2010 Mike Belopuhov <mkb@crypt.org.ru> * Copyright (c) 2009 James Giannoules @@ -3613,7 +3613,8 @@ mpii_req_cfg_header(struct mpii_softc *sc, u_int8_t type, u_int8_t number, "address: 0x%08x flags: 0x%b\n", DEVNAME(sc), type, number, address, flags, MPII_PG_FMT); - ccb = scsi_io_get(&sc->sc_iopool, 0); + ccb = scsi_io_get(&sc->sc_iopool, + ISSET(flags, MPII_PG_POLL) ? SCSI_NOSLEEP : 0); if (ccb == NULL) { DNPRINTF(MPII_D_MISC, "%s: mpii_cfg_header ccb_get\n", DEVNAME(sc)); @@ -3725,7 +3726,8 @@ mpii_req_cfg_page(struct mpii_softc *sc, u_int32_t address, int flags, len < page_length * 4) return (1); - ccb = scsi_io_get(&sc->sc_iopool, 0); + ccb = scsi_io_get(&sc->sc_iopool, + ISSET(flags, MPII_PG_POLL) ? SCSI_NOSLEEP : 0); if (ccb == NULL) { DNPRINTF(MPII_D_MISC, "%s: mpii_cfg_page ccb_get\n", DEVNAME(sc)); |