summaryrefslogtreecommitdiffstats
path: root/sys/dev/ppbus/ppb_msq.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ppbus/ppb_msq.c')
-rw-r--r--sys/dev/ppbus/ppb_msq.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/ppbus/ppb_msq.c b/sys/dev/ppbus/ppb_msq.c
index a02f9e1..89be014 100644
--- a/sys/dev/ppbus/ppb_msq.c
+++ b/sys/dev/ppbus/ppb_msq.c
@@ -31,6 +31,8 @@ __FBSDID("$FreeBSD$");
#include <machine/stdarg.h>
#include <sys/param.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
#include <sys/systm.h>
#include <sys/bus.h>
@@ -115,9 +117,13 @@ mode2xfer(device_t bus, struct ppb_device *ppbdev, int opcode)
int
ppb_MS_init(device_t bus, device_t dev, struct ppb_microseq *loop, int opcode)
{
+#ifdef INVARIANTS
+ struct ppb_data *ppb = device_get_softc(bus);
+#endif
struct ppb_device *ppbdev = (struct ppb_device *)device_get_ivars(dev);
struct ppb_xfer *xfer = mode2xfer(bus, ppbdev, opcode);
+ mtx_assert(ppb->ppc_lock, MA_OWNED);
xfer->loop = loop;
return (0);
@@ -265,6 +271,7 @@ ppb_MS_microseq(device_t bus, device_t dev, struct ppb_microseq *msq, int *ret)
MS_RET(0)
};
+ mtx_assert(ppb->ppc_lock, MA_OWNED);
if (ppb->ppb_owner != dev)
return (EACCES);
OpenPOWER on IntegriCloud