PERFORCE change 165202 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Thu Jun 25 20:03:19 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=165202
Change 165202 by hselasky at 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 */
}
More information about the p4-projects
mailing list