Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp886933imm; Wed, 23 May 2018 07:05:34 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqGsag+grl8ipgvsMv8Yh6k+M25/O61LKgrugofpstLUERINlQ5pL2LasUdY/tlr6ePHpZM X-Received: by 2002:a17:902:7601:: with SMTP id k1-v6mr3095463pll.200.1527084334229; Wed, 23 May 2018 07:05:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527084334; cv=none; d=google.com; s=arc-20160816; b=DC3ax7wTLrSDLbrL1CK2D5yaqEJxvmGqWL+fmoBjpnVMV4MhAUSTNajMq10R1zC/xD VbKr2Gbmcc8VVG4+SIl2LY7wmlbammAJkvo1Dj1fLC7noj1yrYceynMPtsA4kSEsxNN/ xSFEwGbk7xZWX0iBRoArrj7X0VAKLnHwRyhv0i49XZKA1nk1g7Gtt8hy5t3OODYEXanD TEzzc14KHL6nKRCWzaKoncVQ49r1jnlHk1JehPiE4+p5oFUnId0Mpe/KXrO7gaeFoQkX 6SvsoLrj/aC1SH9zeSVaIKLvpnHKTFd86ayI0TCAIixrs/JiGwrPsySRYDyFYtDzUkse 9TYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date:arc-authentication-results; bh=xEo8XdlxQ8ZKFiRU75HEJJofIrjMEDJstBvxAukuDV4=; b=BDWtSmvvfaysk3fVLG+zi+4BEj2xNgBVTvgeOb+tMTiObMjI3rlDLpbIrGWA/xT3LZ h9UpouekQJ79HQ6QBVjW11rAAs7FZilxdcasAbPdbSjwGYfixkBOeC2TWtyWBSJUKkLR u4cOaEAsQ/P8cAlFowMT5MYLUYxgcdBZbgjHej/PqR56kcRk7cgNhhqJCCwEqa2psrDA r5YlZZy9ejD6roxFTzXA88LL7l6mKhHEEUygwC/DJZs1rcLS8yoCanF/yVmVCAh3Z/8A cqGez8BzL9QDOMrMOEUusW40vK8SV51zRAIOds7tExV7MXhVc41UrcaqAoSyI4bFTCN/ Jy8A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k90-v6si19526286pfh.50.2018.05.23.07.05.15; Wed, 23 May 2018 07:05:34 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933199AbeEWOD7 (ORCPT + 99 others); Wed, 23 May 2018 10:03:59 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:48558 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S933082AbeEWOD4 (ORCPT ); Wed, 23 May 2018 10:03:56 -0400 Received: (qmail 2017 invoked by uid 2102); 23 May 2018 10:03:55 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 23 May 2018 10:03:55 -0400 Date: Wed, 23 May 2018 10:03:55 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Nicolas Boichat cc: linux-usb@vger.kernel.org, Greg Kroah-Hartman , Mathias Nyman , Felipe Balbi , Eugene Korenevsky , Peter Chen , Daniel Drake , Joe Perches , Johan Hovold , Richard Leitner , , Subject: Re: [PATCH] usb: hub: Per-port setting to use old enumeration scheme In-Reply-To: <20180523021656.122455-1-drinkcat@chromium.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 23 May 2018, Nicolas Boichat wrote: > The "old" enumeration scheme is considerably faster (it takes > ~294ms instead of ~439ms to get the descriptor). > > It is currently only possible to use the old scheme globally > (/sys/module/usbcore/parameters/old_scheme_first), which is not > desirable as the new scheme was introduced to increase compatibility > with more devices. > > However, in our case, we care about time-to-active for a specific > USB device (which we make the firmware for), on a specific port > (that is pogo-pin based: not a standard USB port). This new > sysfs option makes it possible to use the old scheme on a single > port only. > > Signed-off-by: Nicolas Boichat > --- > > There are other "quirks" that we could add to reduce further > enumeration time (e.g. reduce USB debounce time, reduce TRSTRCY > to 10ms instead of 50ms as used currently), but the logic is quite > similar, so it'd be good to have this reviewed first. I'm not opposed to the idea in principle, although I don't like your implementation because it breaks the original old_scheme_first parameter. Let's see what some other people think. Yours is a rather special case, because you know exactly what device will be attached to a specific port. Still, I can see that sort of thing happening in constrained and special-purpose settings. How do you arrange to set the new quirk before the device is discovered? Alan Stern