From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, T_DKIMWL_WL_HIGH,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B9FEC4321D for ; Thu, 16 Aug 2018 11:14:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 94D14208A2 for ; Thu, 16 Aug 2018 11:14:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="WVnCFtmm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 94D14208A2 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391179AbeHPOL4 (ORCPT ); Thu, 16 Aug 2018 10:11:56 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:59356 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727058AbeHPOL4 (ORCPT ); Thu, 16 Aug 2018 10:11:56 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id w7GBDouY109878; Thu, 16 Aug 2018 06:13:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1534418030; bh=svF4GYcljpqt1L9YWCIOMvkwlZOquxGgt7NlGWsflic=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=WVnCFtmmm8G8t1pg4xzPD68FcRj2Eci0meP6Oow0K2jMhfmwo2N6CD+6Ok6viFUAF 9wk5v3airQvwqJitsqjaRvZ6X30Y5PEOkMPsvEEihNWDrwSe+szCYw14VI3pgrAbjz lGrnwWl5mbkveBUopT2FWZEtl87RFiowfblEgbwQ= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w7GBDngG014296; Thu, 16 Aug 2018 06:13:49 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Thu, 16 Aug 2018 06:13:49 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Thu, 16 Aug 2018 06:13:49 -0500 Received: from [192.168.2.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w7GBDkbT023099; Thu, 16 Aug 2018 06:13:47 -0500 Subject: Re: [PATCH] usb: hub: try old enumeration scheme first for high speed devices To: "Zengtao (B)" , Alan Stern CC: "gregkh@linuxfoundation.org" , "mathias.nyman@linux.intel.com" , "drinkcat@chromium.org" , "felipe.balbi@linux.intel.com" , "drake@endlessm.com" , "mike.looijmans@topic.nl" , "joe@perches.com" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <678F3D1BB717D949B966B68EAEB446ED0C9B12B9@dggemm526-mbx.china.huawei.com> <678F3D1BB717D949B966B68EAEB446ED0C9B2CC0@dggemm526-mbx.china.huawei.com> <678F3D1BB717D949B966B68EAEB446ED0C9B33C7@dggemm526-mbx.china.huawei.com> From: Roger Quadros Openpgp: preference=signencrypt Autocrypt: addr=rogerq@ti.com; prefer-encrypt=mutual; keydata= xsFNBFT1lPYBEADZlKgOS2lxNkDRlcROza/QPsYrS+V2YAXOd4rO/sshQDt1OgU4E8DD37t0 F4zipBkMVU1nQ6ZSomg2o9w17wD7sL0wNO+QZ0j5V2yy2SJIlK70lgmz90GlL93V3T/BFJNr YdtC6FBWvczrXXz6qIKq+3s9j+gMx4CFsZX8vq35xcsaNdyWzX2J7hqMKQ+vYuLvy3u2UMIc pgkwfx5CHXHmWVr4/qWPB+O9YtN9m1ezfPLwbZ73Ea5LpnvCGO6s4IHFLl2hPpDGUCHHV/1N qg3N5ztm4bhN9C0+1qdmhuFGhkfC3O4h/ncywTUNuxqk2Tux19GX3BeWiJF7QVVJb2iXttdo Zi44vp32I7LbcMcXYifHHGYwS5GeAudx6O19RTS+D7XQ1BkSmw8weaTleLhJwApVBon2KziB NscqXsj6CdKFwLFsDPkkvYCsEpWz3C9UUn8veOna2STk8oyk1GM+iVarBad6gs0n8NFNrR2n nLjIFuZ6GIwec3HNaX5Zk3ap1z7qsZ/BVou8r95FJw7cAQU3H5vgHZkGHy9xl6LmPvAf0tWT sO1a9mbf7gcC2u4ccHJ+hTvGk62/E/+AxbtzUDQI0D2ouS9DnwO92UZDJrJhj6m3u1c8mR45 W2CFvZSVPmDSxbyWm3ADzsjfRQlhLkzsV9BoDq8uRMzWUPd8IQARAQABzTRSb2dlciBRdWFk cm9zIChLZXkgZm9yIExpbnV4IGtlcm5lbCkgPHJvZ2VycUB0aS5jb20+wsF4BBMBAgAiBQJU 9ZT2AhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRDSWmvTvnYwkwP2EACuDMmuKaYm rcMhjVcvrrWF7n1LGI4nrmVH93fAI8wZsLSpUwyHeLGNTwSOvJC6U4qLvJAejttdW/DCvU+8 cETqkeh36IQhvxNd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2DCXhmabMCcYS1YP72ZVITpLk4qRfxcrtzgx/uGfuMZDuN7JVYqCz7AI+xEQBLlQWXhL cJ8dH0d+H/3Zs9LVaJAqoc9CiYo1yz8NUH+yHGxz437ccUic8HPB2lIiL/W6C4wVhUbm2w9F 4VdByWgWCCY5Ynhe188sqNL+mFqLAaIssqyYwTBJM+Go6tOuRnP6jrkf2Va/pIwIltzf9QOW cgEAEQEAAcLBXwQYAQIACQUCVPWU9gIbDAAKCRDSWmvTvnYwk8niEACcwBAfe1tTSqCCHkRj zgIrt+NPBBfxilf9JXPGTYqfUkrcVfiNqLGFgIDZKjkLfArxiSmpmtKf1O1VYO9XDgADUKJO RvmUQM/l3Q99QC5b8yUyZOsgfSBOsV6DeqiULO30cXH/uEpR2fUcbtyYXHouiF2UNdq/BV5h HBQkGYtTf7K26NPp4wXMS+YsBm2Gbms/wywJh4KgRPP6LuA+UE/7l0xqMD3pBQ/L1KLTqOQY CItcZ0YbEvlrJc25PRkCssHf1J2c2MXV+CRqsibW8UamBmOyzKHVK/CwvIndwBmcciJrOf+4 uxegvXEnwvYPuQ3wvBSkgbJRFNJemnp5KSczANr4R/aA5cEbxhbg7peLv0FdFyTFJXCsKeuO 1gKoKtOLyxRhDocprSuEamaDWDCy3TmX+6nWaBIPYXDFT7IcHT6l6TyZ6IMjkXiHSLhynTIj f2xjSrvKPljIUxcqjhyqWe+coe/Xwbqz69DsK150xoAaoS3rbNlhmalbg15HNTipNDI/k81A fwt7ncjxvjXVJnA2nqPBDIW3mZO/ED0blLrVdaMZjf5LvS+vvsMdH7dHtrAXA50egr74sX0A NO7iW+gkmFYwap531ipMXthHPWbo5x9xfb+a48xA80ePBJLBDyw9X+cOe40+N4Ybiwy5Q2La IwrfNkJOLj3CvocMIw== Message-ID: <69b675eb-ed6a-8df3-a39f-e985f6a6df22@ti.com> Date: Thu, 16 Aug 2018 14:13:46 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <678F3D1BB717D949B966B68EAEB446ED0C9B33C7@dggemm526-mbx.china.huawei.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-GB Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/08/18 13:59, Zengtao (B) wrote: > Hi Roger: > >> -----Original Message----- >> From: Roger Quadros [mailto:rogerq@ti.com] >> Sent: Thursday, August 16, 2018 3:17 PM >> To: Zengtao (B) ; Alan Stern >> >> Cc: gregkh@linuxfoundation.org; mathias.nyman@linux.intel.com; >> drinkcat@chromium.org; felipe.balbi@linux.intel.com; >> drake@endlessm.com; mike.looijmans@topic.nl; joe@perches.com; >> linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org >> Subject: Re: [PATCH] usb: hub: try old enumeration scheme first for high >> speed devices >> >> On 16/08/18 09:21, Zengtao (B) wrote: >>> Hi alan: >>> >>>> -----Original Message----- >>>> From: Alan Stern [mailto:stern@rowland.harvard.edu] >>>> Sent: Tuesday, August 14, 2018 10:40 PM >>>> To: Zengtao (B) >>>> Cc: Roger Quadros ; gregkh@linuxfoundation.org; >>>> mathias.nyman@linux.intel.com; drinkcat@chromium.org; >>>> felipe.balbi@linux.intel.com; drake@endlessm.com; >>>> mike.looijmans@topic.nl; joe@perches.com; linux-usb@vger.kernel.org; >>>> linux-kernel@vger.kernel.org >>>> Subject: RE: [PATCH] usb: hub: try old enumeration scheme first for >>>> high speed devices >>>> >>>> On Tue, 14 Aug 2018, Zengtao (B) wrote: >>>> >>>>> Hi alan: >>>>> >>>>>> -----Original Message----- >>>>>> From: linux-usb-owner@vger.kernel.org >>>>>> [mailto:linux-usb-owner@vger.kernel.org] On Behalf Of Alan Stern >>>>>> Sent: Friday, August 10, 2018 10:20 PM >>>>>> To: Roger Quadros >>>>>> Cc: Zengtao (B) ; >>>>>> gregkh@linuxfoundation.org; mathias.nyman@linux.intel.com; >>>>>> drinkcat@chromium.org; felipe.balbi@linux.intel.com; >>>>>> drake@endlessm.com; mike.looijmans@topic.nl; joe@perches.com; >>>>>> linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org >>>>>> Subject: Re: [PATCH] usb: hub: try old enumeration scheme first for >>>>>> high speed devices >>>>>> >>>>>> On Fri, 10 Aug 2018, Roger Quadros wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> On 10/08/18 18:01, Zeng Tao wrote: >>>>>>>> The new scheme is required just to support legacy low and >>>>>>>> full-speed devices. For high speed devices, it will slower the >>>>>>>> enumeration >>>> speed. >>>>>>>> So in this patch we try the "old" enumeration scheme first for >>>>>>>> high speed devices. >>>>>>> >>>>>>> How slow does it get? Is it significant? >>>>>>> Do we risk breaking existing HS devices that work? I don't think >>>>>>> we can be sure till we run this through testing. >>>>>> >>>>>> Indeed. I am extremely skeptical about a patch like this, unless >>>>>> somebody can show that Windows uses the "old" scheme for >> high-speed >>>> devices. >>>>> >>>>> Yes, this is what the windows has done, you can refer to >>>>> >> https://blogs.msdn.microsoft.com/usbcoreblog/2013/04/11/usb-2-1-2-0- >>>>> 1- 1-device-enumeration-changes-in-windows-8/ >>>> >>>> And that blog post is 5 years old! >>>> >>>> Okay, I think we can go ahead and make this change. However, you >>>> should update the patch description to mention what Microsoft did in >>>> Windows 8 and say that the new behavior matches theirs. >>>> >>> Okay, I will update it the change log in v2. >>> >>>> Also, as Roger mentioned, you should update the documentation to say >>>> that the old_scheme_first module parameter now applies only to low- >>>> and full-speed devices, since high- and SuperSpeed devices always use >> the old scheme first. >>>> >>> >>> Since we should have dedicated enumeration flow for SS, HIGH, low and >>> full speed devices, So I think the old_scheme_first and use_both_schemes >> parameters should be removed. >>> What do you think about it? >> >> I think we should retain them as some host controllers can have issues and >> these parameters give some control to system integrators to workaround if >> required. >> >> I'm aware of one errata [1] that requires the old_scheme_first to be set in >> certain circumstances. >> >> [1] http://www.ti.com/lit/er/sprz429l/sprz429l.pdf >> Section i897 > > I 'd rather to use a quirk to workaround. > And the main idea is to keep the enumeration flow as simple as possible. The workaround isn't always required. Only in certain circumstances decided by the user. How can a user set the quirk? Now it is as easy as setting it in the kernel command line. One option would be to use the old_scheme_first_port via sysfs. /sys/bus/usb/devices/.../(hub interface)/portX/quirks But that won't work if devices are hard-wired in the system and get enumerated before user gets access to sysfs. We need a way to force one type of scheme before devices are enumerated. -- cheers, -roger Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki