summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2001-02-02 01:00:08 +0000
committerJason Wright <jason@cvs.openbsd.org>2001-02-02 01:00:08 +0000
commit6d56fb1ad0b59b5a22340eb798f0c7da0b12230b (patch)
tree78d4698062bd74b5a24378cc779aede40f71f66d /sys/dev/pci
parenta5f56aa70ec110f9750c93c1a3df6d2dd9e25585 (diff)
The read/write indication bit in DMAERR reg is bit 1, not bit 0
also, add a mask for the address portion of DMAERR and use it
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/ubsec.c4
-rw-r--r--sys/dev/pci/ubsecreg.h5
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/pci/ubsec.c b/sys/dev/pci/ubsec.c
index b82dc6c6b23..d90b7f708b9 100644
--- a/sys/dev/pci/ubsec.c
+++ b/sys/dev/pci/ubsec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubsec.c,v 1.39 2001/01/31 05:14:02 jason Exp $ */
+/* $OpenBSD: ubsec.c,v 1.40 2001/02/02 01:00:07 jason Exp $ */
/*
* Copyright (c) 2000 Jason L. Wright (jason@thought.net)
@@ -292,7 +292,7 @@ ubsec_intr(arg)
a = READ_REG(sc, BS_ERR);
printf("%s: dmaerr %s@%08x\n", sc->sc_dv.dv_xname,
(a & BS_ERR_READ) ? "read" : "write",
- a & ~BS_ERR_READ);
+ a & BS_ERR_ADDR);
}
return (1);
diff --git a/sys/dev/pci/ubsecreg.h b/sys/dev/pci/ubsecreg.h
index ceb510230bc..2a20974ad80 100644
--- a/sys/dev/pci/ubsecreg.h
+++ b/sys/dev/pci/ubsecreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubsecreg.h,v 1.9 2001/01/29 04:01:44 jason Exp $ */
+/* $OpenBSD: ubsecreg.h,v 1.10 2001/02/02 01:00:07 jason Exp $ */
/*
* Copyright (c) 2000 Theo de Raadt
@@ -67,7 +67,8 @@
#define BS_STAT_MCR2_DONE 0x04000000 /* MCR2 is done */
/* BS_ERR - DMA Error Address */
-#define BS_ERR_READ 0x00000001 /* fault was on read */
+#define BS_ERR_ADDR 0xfffffffc /* error address mask */
+#define BS_ERR_READ 0x00000002 /* fault was on read */
#define UBSEC_CARD(sid) (((sid) & 0xf0000000) >> 28)
#define UBSEC_SESSION(sid) ( (sid) & 0x0fffffff)