From owner-svn-src-all@FreeBSD.ORG Sat Jun 27 21:21:11 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C30491065676; Sat, 27 Jun 2009 21:21:11 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B0B008FC21; Sat, 27 Jun 2009 21:21:11 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5RLLB7S088612; Sat, 27 Jun 2009 21:21:11 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5RLLBAq088610; Sat, 27 Jun 2009 21:21:11 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200906272121.n5RLLBAq088610@svn.freebsd.org> From: Andrew Thompson Date: Sat, 27 Jun 2009 21:21:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195120 - head/sys/dev/sound/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2009 21:21:12 -0000 Author: thompsa Date: Sat Jun 27 21:21:11 2009 New Revision: 195120 URL: http://svn.freebsd.org/changeset/base/195120 Log: Use the correct mutex in umidi_open() Submitted by: Hans Petter Selasky Approved by: re (kib) Modified: head/sys/dev/sound/usb/uaudio.c Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Sat Jun 27 21:19:09 2009 (r195119) +++ head/sys/dev/sound/usb/uaudio.c Sat Jun 27 21:21:11 2009 (r195120) @@ -3671,24 +3671,24 @@ umidi_open(struct usb_fifo *fifo, int ff 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 */ }