diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-09-22 22:17:45 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-09-22 22:17:45 +0000 |
commit | d26b16906b2691c7f6f8162719309a191b4dc9d0 (patch) | |
tree | 246ca9f5a26872a7d2ed5b6e843f99f9eca54d23 /sys/dev/midi.c | |
parent | f3ecf07ff4fd224ca32417039ccb99d8532ec9ac (diff) |
the following patch fixes a bug preventing midi uarts that do
not support interrupts on output, from writing blocks larger than
MIDI_MAXWRITE bytes. tested on both kinds of devices
from alex-contact@caoua.org
Diffstat (limited to 'sys/dev/midi.c')
-rw-r--r-- | sys/dev/midi.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/midi.c b/sys/dev/midi.c index fb6905b0682..881f86d5a01 100644 --- a/sys/dev/midi.c +++ b/sys/dev/midi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: midi.c,v 1.11 2004/09/21 06:03:15 brad Exp $ */ +/* $OpenBSD: midi.c,v 1.12 2004/09/22 22:17:44 deraadt Exp $ */ /* * Copyright (c) 2003, 2004 Alexandre Ratchov @@ -254,10 +254,9 @@ midi_out_do(struct midi_softc *sc) } if (!(sc->props & MIDI_PROP_OUT_INTR)) { - if (i < max) { - if (MIDIBUF_ISEMPTY(mb)) - midi_out_stop(sc); - } else + if (MIDIBUF_ISEMPTY(mb)) + midi_out_stop(sc); + else timeout_add(&sc->timeo, sc->wait); } } |