summaryrefslogtreecommitdiff
path: root/sys/dev/pci/ips.c
diff options
context:
space:
mode:
authorAlexander Yurchenko <grange@cvs.openbsd.org>2006-11-29 14:38:18 +0000
committerAlexander Yurchenko <grange@cvs.openbsd.org>2006-11-29 14:38:18 +0000
commit160c39c2867315a536b6441ade3adf8282ff8cf0 (patch)
tree6d77a965bed79ce27e3b5619d671c4e98130b476 /sys/dev/pci/ips.c
parent35f9fc4e975026f44900b0ec0cd101ae34acee18 (diff)
Add some constants.
Diffstat (limited to 'sys/dev/pci/ips.c')
-rw-r--r--sys/dev/pci/ips.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/pci/ips.c b/sys/dev/pci/ips.c
index 94fcd1a3835..73555ad1b70 100644
--- a/sys/dev/pci/ips.c
+++ b/sys/dev/pci/ips.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ips.c,v 1.12 2006/11/29 00:08:00 grange Exp $ */
+/* $OpenBSD: ips.c,v 1.13 2006/11/29 14:38:17 grange Exp $ */
/*
* Copyright (c) 2006 Alexander Yurchenko <grange@openbsd.org>
@@ -65,6 +65,12 @@ int ips_debug = IPS_D_ERR;
#define IPS_MORPHEUS_OIMR 0x0034 /* outbound IRQ mask */
#define IPS_MORPHEUS_IQPR 0x0040 /* inbound queue port */
#define IPS_MORPHEUS_OQPR 0x0044 /* outbound queue port */
+#define IPS_MORPHEUS_OQPR_ID(x) (((x) >> 8) & 0xff)
+#define IPS_MORPHEUS_OQPR_ST(x) (((x) >> 16) & 0xff)
+#define IPS_MORPHEUS_OQPR_GSC(x) (((x) >> 16) & 0x0f)
+#define IPS_MORPHEUS_OQPR_EST(x) (((x) >> 24) & 0xff)
+#define IPS_MORPHEUS_GSC_NOERR 0x0
+#define IPS_MORPHEUS_GSC_RECOV 0x1
/* Commands */
#define IPS_CMD_READ 0x02
@@ -687,7 +693,7 @@ ips_morpheus_intr(void *arg)
while ((oqpr = IPS_READ_4(sc, IPS_MORPHEUS_OQPR)) != 0xffffffff) {
DPRINTF(IPS_D_INTR, ("OQPR 0x%08x\n", oqpr));
- id = (oqpr >> 8) & 0xff;
+ id = IPS_MORPHEUS_OQPR_ID(oqpr);
if (id >= sc->sc_ai.max_concurrent_cmds) {
DPRINTF(IPS_D_ERR, ("%s: intr, bogus id %d",
sc->sc_dev.dv_xname, id));