Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755601AbbKRLKq (ORCPT ); Wed, 18 Nov 2015 06:10:46 -0500 Received: from mga02.intel.com ([134.134.136.20]:40877 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752420AbbKRLKo (ORCPT ); Wed, 18 Nov 2015 06:10:44 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,312,1444719600"; d="scan'208";a="853562641" Subject: Re: [PATCH v3 04/12] usb: xhci: dbc: add support for Intel xHCI dbc quirk To: Dmitry Malkin , "linux-kernel@vger.kernel.org" , "linux-usb@vger.kernel.org" References: <1447425637180.84662@ptsecurity.com> <1447428842332.88038@ptsecurity.com> <56493D02.8020204@linux.intel.com> <1447756139531.72345@ptsecurity.com> From: Lu Baolu Message-ID: <564C5CB3.8000409@linux.intel.com> Date: Wed, 18 Nov 2015 19:10:43 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1447756139531.72345@ptsecurity.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2588 Lines: 68 Hi, On 11/17/2015 06:28 PM, Dmitry Malkin wrote: > On Mon, 16 Nov 2015 10:18:42 +0800, Lu Baolu wrote: >> This quirk works as well if debug host doesn't have DBC. I didn't try a >> DBC-capable debug host yet. > Hi, > > I went through it again, with your v3 patch series on top of vanilla v4.3.0. > > Two targets, one host, all with Intel chipset (XHCI device 0:14.0 with VID:8086). > Targets DIDs are 9c31 (8-series chipset) and 9d2f (100-series chipset). > Host DID is 8c31 (8-series). > > I can only further confirm my previous observations. The host cannot > see the target (there is no debug device) at all, until I manually > re-plug a debug cable. Cable plugged in, prior to starting the target. Thank you for your time. Are you using a "USB3 debugging cable"? The internal wiring of the debug cable is crossed over. > I think that trying a Hot Reset for all disconnected USB 3.0 ports on > the debug target *just before* setting DCE bit is inherently racy. > > What if the number of disconnected ports changes or if someone will insert > a print statement or refactors your code? That might be problematic. I will put a comment there. > > Also sending TS2 to the debug host port will either: > - get dropped by its hub as unsupported upstream request, or > - get ignored due to SS.Inactive port state > > Could you explain what exactly you workaround does at the low level? What I though was that reset USB 3.0 ports on debug target before setting DCE bit will cause debug host to warm reset the port for enumeration purpose and then setting the DCE bit will take effect. This just works on my development machine, not only connecting debug target to root port of host, but also under external hubs. I realized that this quirk isn't a universal solution and it might not work with some silicons. But I thought it shouldn't do any harmless. In bad case, users could plug out and plug in the debug cable, or reset the port through the sysfs node for workaround. If this is acceptable, I will add this in the user guide and increase the timeout value in code. Thanks, -Baolu > > -- > with best regards, > Dmitry Malkin > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/