From owner-p4-projects@FreeBSD.ORG Thu Jun 25 20:03:18 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 500381065673; Thu, 25 Jun 2009 20:03:18 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 100B0106564A for ; Thu, 25 Jun 2009 20:03:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id F22CF8FC12 for ; Thu, 25 Jun 2009 20:03:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n5PK3H7M077094 for ; Thu, 25 Jun 2009 20:03:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n5PK3HLK077092 for perforce@freebsd.org; Thu, 25 Jun 2009 20:03:17 GMT (envelope-from hselasky@FreeBSD.org) Date: Thu, 25 Jun 2009 20:03:17 GMT Message-Id: <200906252003.n5PK3HLK077092@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 165202 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2009 20:03:19 -0000 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 */ }