Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jun 2009 20:03:17 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 165202 for review
Message-ID:  <200906252003.n5PK3HLK077092@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=165202

Change 165202 by hselasky@hselasky_laptop001 on 2009/06/25 20:02:42

	
	USB sound:
	 - fix recent regression issue. umidi is not Giant locked.

Affected files ...

.. //depot/projects/usb/src/sys/dev/sound/usb/uaudio.c#50 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/sound/usb/uaudio.c#50 (text+ko) ====

@@ -3671,24 +3671,24 @@
 		if (usb_fifo_alloc_buffer(fifo, 4, (1024 / 4))) {
 			return (ENOMEM);
 		}
-		mtx_lock(&Giant);
+		mtx_lock(&chan->mtx);
 		chan->read_open_refcount++;
 		sub->read_open = 1;
-		mtx_unlock(&Giant);
+		mtx_unlock(&chan->mtx);
 	}
 	if (fflags & FWRITE) {
 		if (usb_fifo_alloc_buffer(fifo, 32, (1024 / 32))) {
 			return (ENOMEM);
 		}
 		/* clear stall first */
-		mtx_lock(&Giant);
+		mtx_lock(&chan->mtx);
 		chan->flags |= UMIDI_FLAG_WRITE_STALL;
 		chan->write_open_refcount++;
 		sub->write_open = 1;
 
 		/* reset */
 		sub->state = UMIDI_ST_UNKNOWN;
-		mtx_unlock(&Giant);
+		mtx_unlock(&chan->mtx);
 	}
 	return (0);			/* success */
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906252003.n5PK3HLK077092>