Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 May 2013 07:16:21 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r250765 - head/sys/dev/sound/usb
Message-ID:  <201305180716.r4I7GLVY036331@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 		}



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