summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjason <jason@openbsd.org>2000-11-17 17:38:32 +0000
committerjason <jason@openbsd.org>2000-11-17 17:38:32 +0000
commit51102da8e5b534253043c6df5b757e17cb227dbf (patch)
tree3a13e45ed93ae999d72de2f5b9e4fb46d3e684e3
parentUncomment audio* at uaudio?, especially since ho@ has had success with the (diff)
downloadwireguard-openbsd-51102da8e5b534253043c6df5b757e17cb227dbf.tar.xz
wireguard-openbsd-51102da8e5b534253043c6df5b757e17cb227dbf.zip
seems the qe/mace combination needs a delay between accesses to the
two chips. Better fix for the NMI problem.
-rw-r--r--sys/arch/sparc/dev/qe.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/arch/sparc/dev/qe.c b/sys/arch/sparc/dev/qe.c
index ee6d01da48f..2404679e761 100644
--- a/sys/arch/sparc/dev/qe.c
+++ b/sys/arch/sparc/dev/qe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qe.c,v 1.12 2000/11/16 19:31:10 jason Exp $ */
+/* $OpenBSD: qe.c,v 1.13 2000/11/17 17:38:32 jason Exp $ */
/*
* Copyright (c) 1998, 2000 Jason L. Wright.
@@ -734,11 +734,12 @@ qeinit(sc)
cr->rxwbufptr = cr->rxrbufptr = sc->sc_channel * qec->sc_msize;
cr->txwbufptr = cr->txrbufptr = cr->rxrbufptr + qec->sc_rsize;
- for (i = 500; i > 0; i--) {
- if ((mr->biucc & QE_MR_BIUCC_SWRST) == 0)
- break;
- DELAY(10);
- }
+ /*
+ * When switching from mace<->qec always guarantee an sbus
+ * turnaround (if last op was read, perform a dummy write, and
+ * vice versa).
+ */
+ i = cr->qmask; /* dummy */
mr->biucc = QE_MR_BIUCC_BSWAP | QE_MR_BIUCC_64TS;
mr->fifofc = QE_MR_FIFOCC_TXF16 | QE_MR_FIFOCC_RXF32 |
@@ -766,7 +767,7 @@ qeinit(sc)
qe_mcreset(sc);
mr->iac = 0;
- i = mr->mpc;
+ i = mr->mpc; /* cleared on read */
ifp->if_flags |= IFF_RUNNING;
ifp->if_flags &= ~IFF_OACTIVE;