Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4087183ybi; Mon, 3 Jun 2019 05:35:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEBXDTiXSQY5frnKgaXWvIzRtYpV6JjCl0PbptE0hRsZb1292WKX7+wYobrrUolPk+VLcp X-Received: by 2002:a17:90a:8a8e:: with SMTP id x14mr1917145pjn.103.1559565300794; Mon, 03 Jun 2019 05:35:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559565300; cv=none; d=google.com; s=arc-20160816; b=ODMFtXUNCyfuXwsCAQL0Qd0yAALmUdLZEiDfeky+gt/gXcGPvZWi4oh/It3pq8LhBG AYvyeTsIpiArdRvgFNv/svMUztr3g1TV+EE1jtdZMcqdrDai1K0/OEhzkXAaita4KpqV GlgOk6vSns57vyRqbwAjnmdlbUT+6481LeUeShQZDdY6zVYsYaIG6ViVZIOxqUCRU/Xf jH6PNhRpkcv4mXerYfKUOCnBVG5Wlfx+UcLDJb7UhX79mu2sWDgUcKKYO/Nj1D4BTz9p b/IpXKTBDywhxMfphKDbf4htnPIISxGa+Xby89lORvZjMOg95JbwlHpnxHqvXMdbrP0m Pluw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=zEn/464ZPXyOu4iNLxwBtJCwhgblDfpRcO69iAtglTQ=; b=sdPGaOG5KNyt8Dimnf3iJaKFWrjzmDZJ0e76fR5C6Id+x9IplTB4d4KUsFmiuCrt7B Xuvq4hVv3U7I63tDPHjrOLDcAzFY9u1V85W62Wtx4Y8Kc/cwe4MB0reSDbtzoURvb3nf nvd3v6snCrfBWz8rrPFkygc4PRbb4y1H/k3kiI5pGhnVbSPZvCe4o7na1Op//nBkAILJ CbgGFp60TIOV1m7UrXmfBbABfNzUQ8P7I1Fab87bcKfkRCh5HDecGZtA2JbNuGwVXHLn wMS74Phzinjs+9V5O/eZWe2rXFri3ZKSKW6EbbKdkxwIbKWkShISuee6jE4y4HHawroX xTgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k2si18112670pje.26.2019.06.03.05.34.42; Mon, 03 Jun 2019 05:35:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727159AbfFCMc1 (ORCPT + 99 others); Mon, 3 Jun 2019 08:32:27 -0400 Received: from mga11.intel.com ([192.55.52.93]:60756 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726270AbfFCMc0 (ORCPT ); Mon, 3 Jun 2019 08:32:26 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jun 2019 05:32:26 -0700 X-ExtLoop1: 1 Received: from mattu-haswell.fi.intel.com (HELO [10.237.72.164]) ([10.237.72.164]) by orsmga007.jf.intel.com with ESMTP; 03 Jun 2019 05:32:23 -0700 Subject: Re: [PATCH v11 2/2] usb: xhci: Add Clear_TT_Buffer To: Jim Lin , gregkh@linuxfoundation.org, mathias.nyman@intel.com, stern@rowland.harvard.edu, kai.heng.feng@canonical.com, drinkcat@chromium.org, Thinh.Nguyen@synopsys.com, nsaenzjulienne@suse.de, jflat@chromium.org, malat@debian.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <1559559224-9845-1-git-send-email-jilin@nvidia.com> <1559559224-9845-3-git-send-email-jilin@nvidia.com> From: Mathias Nyman Message-ID: <10d35c94-5938-aa47-0f12-7ce1143caa41@linux.intel.com> Date: Mon, 3 Jun 2019 15:35:09 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <1559559224-9845-3-git-send-email-jilin@nvidia.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3.6.2019 13.53, Jim Lin wrote: > USB 2.0 specification chapter 11.17.5 says "as part of endpoint halt > processing for full-/low-speed endpoints connected via a TT, the host > software must use the Clear_TT_Buffer request to the TT to ensure > that the buffer is not in the busy state". > > In our case, a full-speed speaker (ConferenceCam) is behind a high- > speed hub (ConferenceCam Connect), sometimes once we get STALL on a > request we may continue to get STALL with the folllowing requests, > like Set_Interface. > > Here we invoke usb_hub_clear_tt_buffer() to send Clear_TT_Buffer > request to the hub of the device for the following Set_Interface > requests to the device to get ACK successfully. > > Signed-off-by: Jim Lin > --- > v2: xhci_clear_tt_buffer_complete: add static, shorter indentation > , remove its claiming in xhci.h > v3: Add description for clearing_tt (xhci.h) > v4: Remove clearing_tt flag because hub_tt_work has hub->tt.lock > to protect for Clear_TT_Buffer to be run serially. > Remove xhci_clear_tt_buffer_complete as it's not necessary. > Same reason as the above. > Extend usb_hub_clear_tt_buffer parameter > v5: Not extending usb_hub_clear_tt_buffer parameter > Add description. > v6: Remove unused parameter slot_id from xhci_clear_hub_tt_buffer > v7: Add devaddr field in "struct usb_device" > v8: split as two patches > v9: no change flag > v10: Add EP_CLEARING_TT flag > v11: Add spin_lock/unlock in xhci_clear_tt_buffer_complete > > > drivers/usb/host/xhci-ring.c | 27 ++++++++++++++++++++++++++- > drivers/usb/host/xhci.c | 21 +++++++++++++++++++++ > drivers/usb/host/xhci.h | 5 +++++ > 3 files changed, 52 insertions(+), 1 deletion(-) > xhci parts look good to me, In case Greg wants to pick up both the core changes (1/2) and the xhci changes (2/2) at the same time: Acked-by: Mathias Nyman