summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorMarco Peereboom <marco@cvs.openbsd.org>2006-04-16 16:41:30 +0000
committerMarco Peereboom <marco@cvs.openbsd.org>2006-04-16 16:41:30 +0000
commit8d562aa46f5b0433757d6df9eb4c824ea84bf992 (patch)
tree9042e8cd2f11dc199b947194b14eff8c2c694a7b /sys/dev/ic
parent4178ec7446512122df25fcd8639e3a7fa9de3b3a (diff)
Shuffle some #defines.
Fix comments. Add human readable enable intrrupt #define.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/mfi.c6
-rw-r--r--sys/dev/ic/mfireg.h11
2 files changed, 7 insertions, 10 deletions
diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c
index d6194583f4b..b5bb8859782 100644
--- a/sys/dev/ic/mfi.c
+++ b/sys/dev/ic/mfi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfi.c,v 1.8 2006/04/16 16:34:35 marco Exp $ */
+/* $OpenBSD: mfi.c,v 1.9 2006/04/16 16:41:29 marco Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
*
@@ -232,7 +232,7 @@ mfi_attach(struct mfi_softc *sc)
DNPRINTF(MFI_D_MISC, "%s: max commands: %u, max sgl: %u\n",
DEVNAME(sc), sc->sc_max_cmds, sc->sc_max_sgl);
- /* reply queue memory */
+ /* consumer/producer and reply queue memory */
sc->sc_pcq = mfi_allocmem(sc, (sizeof(uint32_t) * sc->sc_max_cmds) +
sizeof(struct mfi_prod_cons));
if (sc->sc_pcq == NULL) {
@@ -242,7 +242,7 @@ mfi_attach(struct mfi_softc *sc)
}
/* enable interrupts */
- mfi_write(sc, MFI_OMSK, 0x01);
+ mfi_write(sc, MFI_OMSK, MFI_ENABLE_INTR);
return (0);
}
diff --git a/sys/dev/ic/mfireg.h b/sys/dev/ic/mfireg.h
index 7f6e34e00b5..17676bd141a 100644
--- a/sys/dev/ic/mfireg.h
+++ b/sys/dev/ic/mfireg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfireg.h,v 1.4 2006/04/16 16:34:35 marco Exp $ */
+/* $OpenBSD: mfireg.h,v 1.5 2006/04/16 16:41:29 marco Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
*
@@ -17,6 +17,9 @@
#define MFI_FRAME_SIZE 64
+#define MFI_OSTS_INTR_VALID 0x00000002 /* valid interrupt */
+#define MFI_INVALID_CTX 0xffffffff
+#define MFI_ENABLE_INTR 0x01
/* register offsets */
#define MFI_IMSG0 0x10 /* inbound msg 0 */
@@ -32,11 +35,6 @@
#define MFI_IQP 0x40 /* inbound queue port */
#define MFI_OQP 0x44 /* outbound queue port */
-/* valid interrupt */
-#define MFI_OSTS_INTR_VALID 0x00000002
-
-#define MFI_INVALID_CTX 0xffffffff
-
/* * firmware states */
#define MFI_STATE_MASK 0xf0000000
#define MFI_STATE_UNDEFINED 0x00000000
@@ -100,7 +98,6 @@
/* mailbox bytes in direct command */
#define MFI_MBOX_SIZE 12
-
/* mfi completion codes */
typedef enum {
MFI_STAT_OK = 0x00,