From owner-freebsd-usb@FreeBSD.ORG Fri Apr 11 06:35:33 2014 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3722B1 for ; Fri, 11 Apr 2014 06:35:32 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7C121AAE for ; Fri, 11 Apr 2014 06:35:32 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 1D87C1FE027; Fri, 11 Apr 2014 08:35:21 +0200 (CEST) Message-ID: <53478D5B.3090205@selasky.org> Date: Fri, 11 Apr 2014 08:36:11 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Daniel O'Connor , freebsd-usb@freebsd.org Subject: Re: USB 3 devices not reliably connecting at 5Gbps References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2014 06:35:33 -0000 On 04/11/14 06:33, Daniel O'Connor wrote: > Also, when it does connect at 5Gbps the speed seems quite slow - on my laptop (with USB controller VID 0x8086 PID 0x9c31 - Lynx point I think) I get 225MB/sec using libusb. On FreeBSD I get around 92MB/sec although only after lowering(!!) the amount read per transfer. Hi, FreeBSD sets an IRQ latency of 125us, while the others use the default of 62.5us. Are you double buffering the USB transfers? The IRQ latency can be changed by editing a macro in the XHCI driver: #define XHCI_IMOD_DEFAULT 0x000003E8U /* 8000 IRQ/second */ At a rate of 225MB/s you need around 2x32Kbyte of buffer and you need to avoid short transfers. --HPS