summaryrefslogtreecommitdiff
path: root/sys/dev/ic/mpivar.h
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2010-01-03 06:15:31 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2010-01-03 06:15:31 +0000
commit7bbb0b2fdb44c5b4fa3d1131e02b42d1028f34e5 (patch)
treead0cbc997c73d9981b662ee29f290ecdcf416d86 /sys/dev/ic/mpivar.h
parent46e72594047f32bf470f6ca20938367c79baa8cc (diff)
switch mpi from using splbio to protect itself over to mutexes.
mpi only needs two mutexes, one for the list of free ccbs, and another to protect the reply doorbell. the latter is necessary to allow polling for command completion to work in smp systems. tested on sas and fc hbas. this diff was written over 2 years ago now with surprisingly few tweaks to handle changes that have occurred since then.
Diffstat (limited to 'sys/dev/ic/mpivar.h')
-rw-r--r--sys/dev/ic/mpivar.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/ic/mpivar.h b/sys/dev/ic/mpivar.h
index 8db118095e8..4d4f2d8cd33 100644
--- a/sys/dev/ic/mpivar.h
+++ b/sys/dev/ic/mpivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpivar.h,v 1.25 2009/11/02 23:20:41 marco Exp $ */
+/* $OpenBSD: mpivar.h,v 1.26 2010/01/03 06:15:30 dlg Exp $ */
/*
* Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
@@ -111,6 +111,8 @@ struct mpi_softc {
bus_size_t sc_ios;
bus_dma_tag_t sc_dmat;
+ struct mutex sc_reply_mtx;
+
u_int8_t sc_porttype;
int sc_maxcmds;
int sc_maxchdepth;
@@ -125,11 +127,14 @@ struct mpi_softc {
struct mpi_dmamem *sc_requests;
struct mpi_ccb *sc_ccbs;
struct mpi_ccb_list sc_ccb_free;
+ struct mutex sc_ccb_mtx;
struct mpi_dmamem *sc_replies;
struct mpi_rcb *sc_rcbs;
int sc_repq;
+ struct mpi_ccb *sc_evt_ccb;
+
size_t sc_fw_len;
struct mpi_dmamem *sc_fw;