From alsa-devel-owner@alsa.jcu.cz  Thu Jan 14 02:27:42 1999
Received: from post.mail.demon.net (post-20.mail.demon.net [194.217.242.27])
	by marvin.jcu.cz (8.9.1a/8.9.1) with ESMTP id CAA18268
	for <alsa-devel@alsa.jcu.cz>; Thu, 14 Jan 1999 02:26:51 +0100
Received: from [212.228.182.246] (helo=ariel.sr.home)
	by post.mail.demon.net with esmtp (Exim 2.10 #2)
	id 100bYf-0003p8-00
	for alsa-devel@alsa.jcu.cz; Thu, 14 Jan 1999 01:26:49 +0000
Received: (from steve@localhost)
	by ariel.sr.home (8.8.7/8.8.7) id BAA01526
	for alsa-devel@alsa.jcu.cz; Thu, 14 Jan 1999 01:25:33 GMT
Date: Thu, 14 Jan 1999 01:25:33 GMT
From: Steve Ratcliffe <steve@parabola.demon.co.uk>
Message-Id: <199901140125.BAA01526@ariel.sr.home>
To: alsa-devel@alsa.jcu.cz
Subject: Re: Ultrasound Midi.
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

>
> Oops. Bug in alsa-lib (which don't set O_NONBLOCK correctly). I fixed this
> bug today. Get latest CVS sources.

Fine.  But I think that the kernel also needs this patch to fix the
behaviour when O_NONBLOCK is not set.

> Small bug in GF1 UART driver.. Check CVS.. Now should be all ok..

Sorry, forgot to mention that I am using AWE64.  However, you are
still right!  Similar bug exists in mpu401_uart.c driver.

Patch below.

Test programs work fine for me now.

..Steve

--- mpu401_uart.c.orig	Wed Jan 13 23:34:58 1999
+++ mpu401_uart.c	Wed Jan 13 23:59:56 1999
@@ -46,8 +46,10 @@
 	while (max-- > 0) {
 		snd_spin_lock(mpu, input, &flags);
 		status = inb(MPU401C(mpu));
-		if (status == 0xff)
+		if (status == 0xff) {
+			snd_spin_unlock(mpu, input, &flags);
 			break;	/* wrong value, MPU isn't connected */
+		}
 		if (!(status & 0x80)) {
 			byte = inb(MPU401D(mpu));
 #if 0


