summaryrefslogtreecommitdiffstats
path: root/sys/dev/isa
diff options
context:
space:
mode:
authorratchov <ratchov@openbsd.org>2012-03-30 08:18:19 +0000
committerratchov <ratchov@openbsd.org>2012-03-30 08:18:19 +0000
commitf3db5e0d9a7a9960945de6cf4010a0ea22c67aef (patch)
treed603e0e7ffe29e4c24ac606b090bf900e03205c0 /sys/dev/isa
parenttweak FILES and HISTORY; (diff)
downloadwireguard-openbsd-f3db5e0d9a7a9960945de6cf4010a0ea22c67aef.tar.xz
wireguard-openbsd-f3db5e0d9a7a9960945de6cf4010a0ea22c67aef.zip
If the MIDI UART is not ready for output, don't spin at IPL_CLOCK;
just return and make the midi(4) driver retry later. UART buffers are large enough for this, except eap(4) which uses interrupts for output. help from and ok jsg@
Diffstat (limited to 'sys/dev/isa')
-rw-r--r--sys/dev/isa/mpu401.c12
-rw-r--r--sys/dev/isa/sbdsp.c9
2 files changed, 10 insertions, 11 deletions
diff --git a/sys/dev/isa/mpu401.c b/sys/dev/isa/mpu401.c
index 9e98db5a536..593d0b0fd23 100644
--- a/sys/dev/isa/mpu401.c
+++ b/sys/dev/isa/mpu401.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpu401.c,v 1.11 2008/06/26 05:42:16 ray Exp $ */
+/* $OpenBSD: mpu401.c,v 1.12 2012/03/30 08:18:19 ratchov Exp $ */
/* $NetBSD: mpu401.c,v 1.3 1998/11/25 22:17:06 augustss Exp $ */
/*
@@ -208,12 +208,12 @@ mpu_output(v, d)
mpu_readinput(sc);
splx(s);
}
- if (mpu_waitready(sc)) {
- DPRINTF(("mpu_output: not ready\n"));
- return EIO;
- }
+ if (MPU_GETSTATUS(sc->iot, sc->ioh) & MPU_OUTPUT_BUSY)
+ delay(10);
+ if (MPU_GETSTATUS(sc->iot, sc->ioh) & MPU_OUTPUT_BUSY)
+ return 0;
bus_space_write_1(sc->iot, sc->ioh, MPU_DATA, d);
- return 0;
+ return 1;
}
void
diff --git a/sys/dev/isa/sbdsp.c b/sys/dev/isa/sbdsp.c
index 32d63f06567..5c5a507f13c 100644
--- a/sys/dev/isa/sbdsp.c
+++ b/sys/dev/isa/sbdsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sbdsp.c,v 1.31 2010/07/15 03:43:11 jakemsr Exp $ */
+/* $OpenBSD: sbdsp.c,v 1.32 2012/03/30 08:18:19 ratchov Exp $ */
/*
* Copyright (c) 1991-1993 Regents of the University of California.
@@ -2385,10 +2385,9 @@ sbdsp_midi_output(addr, d)
struct sbdsp_softc *sc = addr;
if (sc->sc_model < SB_20 && sbdsp_wdsp(sc, SB_MIDI_WRITE))
- return EIO;
- if (sbdsp_wdsp(sc, d))
- return EIO;
- return 0;
+ return 1;
+ (void)sbdsp_wdsp(sc, d);
+ return 1;
}
void