From owner-freebsd-current@FreeBSD.ORG Thu Dec 12 07:46:03 2013 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B60ECD6; Thu, 12 Dec 2013 07:46:03 +0000 (UTC) Received: from mta05.bitpro.no (mta05.bitpro.no [92.42.64.202]) by mx1.freebsd.org (Postfix) with ESMTP id 447E81591; Thu, 12 Dec 2013 07:46:02 +0000 (UTC) Received: from mail.lockless.no (mail.lockless.no [46.29.221.38]) by mta05.bitpro.no (Postfix) with ESMTPS id 4671817FC7E; Thu, 12 Dec 2013 08:45:56 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.lockless.no (Postfix) with ESMTP id C32E98FEB19; Thu, 12 Dec 2013 08:46:35 +0100 (CET) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at lockless.no Received: from mail.lockless.no ([127.0.0.1]) by localhost (mail.lockless.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C3iWEhmbdjHv; Thu, 12 Dec 2013 08:46:34 +0100 (CET) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) by mail.lockless.no (Postfix) with ESMTPSA id B0B1B8FEB18; Thu, 12 Dec 2013 08:46:34 +0100 (CET) Message-ID: <52A969F6.3010201@bitfrost.no> Date: Thu, 12 Dec 2013 08:47:02 +0100 From: Hans Petter Selasky Organization: Bitfrost A/S User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Kohji Okuno Subject: Re: spec violation of xHCI? References: <52A85FAA.8030402@bitfrost.no> <20131211.220615.1986324315440989553.okuno.kohji@jp.panasonic.com> <52A870FA.5080803@bitfrost.no> <20131212.095958.798647707277033359.okuno.kohji@jp.panasonic.com> <52A96276.3060203@bitfrost.no> In-Reply-To: <52A96276.3060203@bitfrost.no> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org, freebsd-usb@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 07:46:03 -0000 On 12/12/13 08:15, Hans Petter Selasky wrote: > On 12/12/13 01:59, Kohji Okuno wrote: > > Hi Kohji, > > Did you check using a USB analyzer what the difference is when setting > the CHAIN bit and not setting the chain bit? > > I would guess that if you set the CHAIN-bit in this case, no ZLP will be > sent, because the TRB is associated with the previous one. > > What endpoint type is this? BULK/CONTROL/INTR/ISOC > > What direction is this? IN or OUT? > > --HPS Hi Kohji, If there is no CHAIN bit in the IN-direction, my TD chain will receive multiple short packets. This is of course not correct. This only happens if you have very large buffers above 64KByte that don't fit in a single TD. For OUT direction: There are no short packets received, though errors can happen and those will stop the endpoint. Are we sure that by setting the CHAIN bit, that the HC's will transfer ZLP's if the length of the second last "TD" is a multiple of wMaxPacketSize and the last one has a length of zero bytes? I will do some testing to verify the corner cases. Thank you! --HPS