From owner-freebsd-current@FreeBSD.ORG Mon Sep 22 06:31:33 2014 Return-Path: Delivered-To: freebsd-current@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 751FCA5E; Mon, 22 Sep 2014 06:31:33 +0000 (UTC) Received: from smtp.mei.co.jp (smtp.mei.co.jp [133.183.100.20]) by mx1.freebsd.org (Postfix) with ESMTP id 135521BF; Mon, 22 Sep 2014 06:31:32 +0000 (UTC) Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile14) with ESMTP id s8M6VMXl011826; Mon, 22 Sep 2014 15:31:22 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili11) with ESMTP id s8M6VMR08258; Mon, 22 Sep 2014 15:31:22 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi12) id s8M6VMFP001495; Mon, 22 Sep 2014 15:31:22 +0900 Received: from localhost by lomi12.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id s8M6VMge001475; Mon, 22 Sep 2014 15:31:22 +0900 Date: Mon, 22 Sep 2014 15:31:22 +0900 (JST) Message-Id: <20140922.153122.2173639902447525862.okuno.kohji@jp.panasonic.com> To: hps@selasky.org Subject: Re: Does the xHCI driver has a spec violation? From: Kohji Okuno In-Reply-To: <541FBB84.6050508@selasky.org> References: <20140922.135800.1954695532570247771.okuno.kohji@jp.panasonic.com> <541FBB84.6050508@selasky.org> Organization: Panasonic Corporation X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, okuno.kohji@jp.panasonic.com, freebsd-usb@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 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: Mon, 22 Sep 2014 06:31:33 -0000 Hi HPS, Could you refer to the following document (4.6.6 Configure Endpoint:P.99)? This document shows: If the Drop Context flag is `1' and the Add Context flag is `1', the xHC shall: o Release the current Resources and Bandwidth allocated to the endpoint and assign the new Resources and Bandwidth requested for the endpoint. Regards, Kohji Okuno. > On 09/22/14 06:58, Kohji Okuno wrote: >> Hi, >> >> I encountered a issue for USB mic. >> >> In fist time, my host controller (xHCI) sends single IN-tokens every >> 8-SOFs. This is expected action. But, after I open, close and open, my >> host controller sends plural IN-tokens between SOF and SOF. >> >> In Intel Lynx Point, I could not reproduce this issue. >> I'm sorry. Unfortunately, I can't explain details about my proprietary >> host controler. >> >> I found the following explanation in the xHCI 1.1 specification >> http://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/extensible-host-controler-interface-usb-xhci.pdf >> >> In 4.8.3 Endpoint Context State, >> 6. The Configure Endpoint Command (Add (A) = `1' and Drop (D) =`1') >> shall transition an endpoint, except the Default Control >> Endpoint, from the Stopped to the Running state.' >> >> >> So, I modify as the following, then I can run expectedly. >> What do you think about this change? > > Hi, > > I think we should issue the context drop separately. Are we certain that if > both drop and add bits are set at the same time, that the drop bit will be > processed before the add? > > This might be a bug in your hardware, which apparently doesn't check if the > context has already been added or not. I'll be glad to make a workaround for > it once we have settled on a solution. > > Can you test the attached patch using both your hardware and the Lynx Point. > > Thank you! > > --HPS > >> >> Best regards, >> Kohji Okuno >