From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 19 01:30:24 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CA8A1065695; Fri, 19 Nov 2010 01:30:24 +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 1BF028FC1A; Fri, 19 Nov 2010 01:30:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ1UNGg051763; Fri, 19 Nov 2010 01:30:24 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ1UN9L051761; Fri, 19 Nov 2010 01:30:23 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011190130.oAJ1UN9L051761@svn.freebsd.org> From: Andrew Thompson Date: Fri, 19 Nov 2010 01:30:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215483 - stable/8/sys/dev/sound/usb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 01:30:24 -0000 Author: thompsa Date: Fri Nov 19 01:30:23 2010 New Revision: 215483 URL: http://svn.freebsd.org/changeset/base/215483 Log: MFC r209450 Reduce MIDI input buffer size to one USB packet, hence some USB devices don't properly short terminate their transfers. This fixes a problem where input appears several seconds late. Reported by: Alexander Yerenkow Submitted by: Hans Petter Selasky Modified: stable/8/sys/dev/sound/usb/uaudio.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio.c Fri Nov 19 01:29:20 2010 (r215482) +++ stable/8/sys/dev/sound/usb/uaudio.c Fri Nov 19 01:30:23 2010 (r215483) @@ -507,8 +507,8 @@ static const struct usb_config .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .bufsize = UMIDI_BULK_SIZE, - .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .bufsize = 4, /* bytes */ + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,.proxy_buffer = 1,}, .callback = &umidi_bulk_read_callback, }, @@ -3366,10 +3366,6 @@ umidi_bulk_read_callback(struct usb_xfer DPRINTF("actlen=%d bytes\n", actlen); - if (actlen == 0) { - /* should not happen */ - goto tr_error; - } pos = 0; pc = usbd_xfer_get_frame(xfer, 0); @@ -3404,8 +3400,6 @@ umidi_bulk_read_callback(struct usb_xfer return; default: -tr_error: - DPRINTF("error=%s\n", usbd_errstr(error)); if (error != USB_ERR_CANCELLED) {