diff options
author | 2004-09-22 22:17:44 +0000 | |
---|---|---|
committer | 2004-09-22 22:17:44 +0000 | |
commit | 588907fa596a99b80df020ed56e5df333b4e8fce (patch) | |
tree | 682a153f9ebc8d72df5e741284f33cf01f53ec81 | |
parent | Bring some enhancements and fixes to fdc(4) from NetBSD: (diff) | |
download | wireguard-openbsd-588907fa596a99b80df020ed56e5df333b4e8fce.tar.xz wireguard-openbsd-588907fa596a99b80df020ed56e5df333b4e8fce.zip |
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
-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); } } |