summaryrefslogtreecommitdiff
path: root/sys/dev/pci/ubsec.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2000-07-20 21:45:20 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2000-07-20 21:45:20 +0000
commit7d11957ea636eec5fa2901a61ea64cb29549aa35 (patch)
treea1727d5795b61bd03d88141e39cf8828ba986958 /sys/dev/pci/ubsec.c
parentec791d29f98c4070482700d98b3c1d25f3259425 (diff)
work around broken A0 5805 silicon that fails to set the status result word in the mcr
Diffstat (limited to 'sys/dev/pci/ubsec.c')
-rw-r--r--sys/dev/pci/ubsec.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/dev/pci/ubsec.c b/sys/dev/pci/ubsec.c
index fe4c9611285..284f873fc42 100644
--- a/sys/dev/pci/ubsec.c
+++ b/sys/dev/pci/ubsec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubsec.c,v 1.16 2000/06/20 05:40:45 jason Exp $ */
+/* $OpenBSD: ubsec.c,v 1.17 2000/07/20 21:45:19 deraadt Exp $ */
/*
* Copyright (c) 2000 Jason L. Wright (jason@thought.net)
@@ -32,6 +32,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#define UBSEC_DEBUG
+
+
/*
* uBsec 5[56]01 hardware crypto accelerator
*/
@@ -208,10 +211,14 @@ ubsec_intr(arg)
WRITE_REG(sc, BS_STAT, stat); /* IACK */
- if (stat & BS_STAT_MCR1_DONE) {
+printf("ubsec intr %x\n", stat);
+ if ((stat & BS_STAT_MCR1_DONE)) {
while (!SIMPLEQ_EMPTY(&sc->sc_qchip)) {
q = SIMPLEQ_FIRST(&sc->sc_qchip);
- if ((q->q_mcr.mcr_flags & UBS_MCR_DONE) == 0)
+ printf("mcr_flags %x %x %x\n", &q->q_mcr, q->q_mcr.mcr_flags,
+ READ_REG(sc, BS_ERR));
+ if ((q->q_mcr.mcr_flags & UBS_MCR_DONE) == 0 &&
+ READ_REG(sc, BS_ERR) != vtophys(&q->q_mcr))
break;
npkts++;
SIMPLEQ_REMOVE_HEAD(&sc->sc_qchip, q, q_next);