From owner-svn-src-all@FreeBSD.ORG Sat May 18 07:16:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 32630482; Sat, 18 May 2013 07:16:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 24EEE393; Sat, 18 May 2013 07:16:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4I7GLLr036332; Sat, 18 May 2013 07:16:21 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4I7GLVY036331; Sat, 18 May 2013 07:16:21 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201305180716.r4I7GLVY036331@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 18 May 2013 07:16:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250765 - head/sys/dev/sound/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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, 18 May 2013 07:16:21 -0000 Author: hselasky Date: Sat May 18 07:16:20 2013 New Revision: 250765 URL: http://svnweb.freebsd.org/changeset/base/250765 Log: Don't clear stall at first time use of USB MIDI endpoints. Most likely some non-USB compliant devices will choke on it sooner or later. Clear stall is strictly speaking not needed. If the first MIDI command sent or transmitted is lost, this is not a big problem for us. MFC after: 1 week Modified: head/sys/dev/sound/usb/uaudio.c Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Sat May 18 07:10:22 2013 (r250764) +++ head/sys/dev/sound/usb/uaudio.c Sat May 18 07:16:20 2013 (r250765) @@ -5592,7 +5592,6 @@ umidi_open(struct usb_fifo *fifo, int ff } /* clear stall first */ mtx_lock(&chan->mtx); - usbd_xfer_set_stall(chan->xfer[UMIDI_TX_TRANSFER]); chan->write_open_refcount++; sub->write_open = 1; @@ -5691,9 +5690,6 @@ umidi_probe(device_t dev) mtx_lock(&chan->mtx); - /* clear stall first */ - usbd_xfer_set_stall(chan->xfer[UMIDI_RX_TRANSFER]); - /* * NOTE: At least one device will not work properly unless the * BULK IN pipe is open all the time. This might have to do @@ -5798,8 +5794,11 @@ tr_setup: break; default: /* Error */ + + DPRINTF("error=%s\n", usbd_errstr(error)); + if (error != USB_ERR_CANCELLED) { - /* try clear stall first */ + /* try to clear stall first */ usbd_xfer_set_stall(xfer); goto tr_setup; }