diff options
author | Bret Lambert <blambert@cvs.openbsd.org> | 2014-09-01 07:52:31 +0000 |
---|---|---|
committer | Bret Lambert <blambert@cvs.openbsd.org> | 2014-09-01 07:52:31 +0000 |
commit | 3d943da9c94fd45c5728d1bd8fcba2bbda2cd0e5 (patch) | |
tree | 4180f0c85a8b171e3c1ab88340d8dbc47ab2ff5f /sys/dev | |
parent | 03282b82ef7a1a49ad01ba348f7bc97db52f1309 (diff) |
move mpi(4) from workq to taskq
ok dlg@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/mpi.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/mpivar.h | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c index e5c77b0118f..3efc4f76325 100644 --- a/sys/dev/ic/mpi.c +++ b/sys/dev/ic/mpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpi.c,v 1.193 2014/07/13 23:10:23 deraadt Exp $ */ +/* $OpenBSD: mpi.c,v 1.194 2014/09/01 07:52:30 blambert Exp $ */ /* * Copyright (c) 2005, 2006, 2009 David Gwynne <dlg@openbsd.org> @@ -31,6 +31,7 @@ #include <sys/rwlock.h> #include <sys/sensors.h> #include <sys/dkio.h> +#include <sys/task.h> #include <machine/bus.h> @@ -225,6 +226,8 @@ mpi_attach(struct mpi_softc *sc) rw_init(&sc->sc_lock, "mpi_lock"); mtx_init(&sc->sc_evt_rescan_mtx, IPL_BIO); + task_set(&sc->sc_evt_rescan, mpi_fc_rescan, sc, NULL); + /* disable interrupts */ mpi_write(sc, MPI_INTR_MASK, MPI_INTR_MASK_REPLY | MPI_INTR_MASK_DOORBELL); @@ -2474,8 +2477,7 @@ mpi_evt_fc_rescan(struct mpi_softc *sc) mtx_leave(&sc->sc_evt_rescan_mtx); if (queue) { - workq_queue_task(NULL, &sc->sc_evt_rescan, 0, - mpi_fc_rescan, sc, NULL); + task_add(systq, &sc->sc_evt_rescan); } } diff --git a/sys/dev/ic/mpivar.h b/sys/dev/ic/mpivar.h index f1acd33e06a..8bcf4fb48b6 100644 --- a/sys/dev/ic/mpivar.h +++ b/sys/dev/ic/mpivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mpivar.h,v 1.37 2014/04/16 01:19:28 dlg Exp $ */ +/* $OpenBSD: mpivar.h,v 1.38 2014/09/01 07:52:30 blambert Exp $ */ /* * Copyright (c) 2005 David Gwynne <dlg@openbsd.org> @@ -17,6 +17,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include <sys/task.h> + /* #define MPI_DEBUG */ #ifdef MPI_DEBUG extern uint32_t mpi_debug; @@ -149,7 +151,7 @@ struct mpi_softc { struct mutex sc_evt_scan_mtx; struct scsi_iohandler sc_evt_scan_handler; - struct workq_task sc_evt_rescan; + struct task sc_evt_rescan; struct mutex sc_evt_rescan_mtx; u_int sc_evt_rescan_sem; |