Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3545675imm; Sun, 19 Aug 2018 23:59:03 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwMO+RCjzpk5Lm8yLBWGy8gdRaJDw1uQO4N5Xm49DEEY8na+dl8iOTgmzy83jft9mHZTNOx X-Received: by 2002:a17:902:59cf:: with SMTP id d15-v6mr7565289plj.184.1534748343662; Sun, 19 Aug 2018 23:59:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534748343; cv=none; d=google.com; s=arc-20160816; b=EZRmJuo7nHed+pv60oXWqqphaeMpxu/WBK4bfAYPFlH68zLEve5AsAtiFe1OybJG22 1Hl9XDClt9Cx7kycm7xjXW/53zk5I2fa7L14+BrD0/x3nIAI0Og+BUtP3FVcfo/UDyx5 wvVvEaaWFZGUjvnmv+UuzRnC17Iha0staUywUIr6DgmA5QzwoOu76yLrDs274KtE9/Wu tFSI0pRJRkLLyQ2w/m7zRD1tH1pwNgyRYCP37fmyvX4puR8iQSocU+WGOwW9fY+A+qMe wCkrbifNaDR51KXIJmOqXsr+Arys1iuOPEWeDxNromlw17cHKix/iZf0/f5VDDWZNhNu qk6w== 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:autocrypt:openpgp:from:references:cc:to:subject :dkim-signature:arc-authentication-results; bh=CdtASJdKHfkBpbwbVC3G89ZDflL2vk/1N5JiuEPShNo=; b=d2uQYEO/xLqI8ySXRhozA8UP8EEfhtRW/ytNcXZRQuN8BSnFmHY/QuhsNQYGdGeWlb W9k4zjN4nZV4K1RYOU1VyiWJ23dzjRTBZz0AqMUKAQfKNDVL/yQs6eDecIaTZW5n0whT sbvR3ydP9HFyUDi28hr6OLCBOgetHVS5Knvu8fJfAgYbcAsoZDLzn+HhhW+hTK7SJAzP eubbe+QSjjZfGc991VG1OMvIi1mL4Zy9Zazsq38hRRQ0nI6lKTnJGon50SGMGwldS4yV GKhJIfAye5zl+Hdm//pikKJbSneML1AkXF92CnLLVUok70UK+HPw1ooZ/OGCaVYEINPr 4QiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=e4F1CwBi; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w20-v6si8755211pgf.434.2018.08.19.23.58.48; Sun, 19 Aug 2018 23:59:03 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=e4F1CwBi; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726438AbeHTKK7 (ORCPT + 99 others); Mon, 20 Aug 2018 06:10:59 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:53826 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbeHTKK7 (ORCPT ); Mon, 20 Aug 2018 06:10:59 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id w7K6tt1g098629; Mon, 20 Aug 2018 01:55:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1534748155; bh=CdtASJdKHfkBpbwbVC3G89ZDflL2vk/1N5JiuEPShNo=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=e4F1CwBiL2j/2YzrxqLwvw/27Jbl8GBFxP4k95KjGSUeD9JvKI339mv93Crqw3yD5 j2h3gudWEkjkyTv/0UqADh2CbHMWjrL4nZ55lhfWMrXwq6N1I6fAqcVPBiUC5z4b0S fMvKlVmz8M0QZDLalNYOpG1OlqdZ3Mhr8ZQy/BUQ= Received: from DLEE101.ent.ti.com (dlee101.ent.ti.com [157.170.170.31]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w7K6ttTa029542; Mon, 20 Aug 2018 01:55:55 -0500 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Mon, 20 Aug 2018 01:55:54 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Mon, 20 Aug 2018 01:55:54 -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 w7K6tnpG013204; Mon, 20 Aug 2018 01:55:50 -0500 Subject: Re: [PATCH v3] usb: hub: try old enumeration scheme first for high speed devices To: Zeng Tao , , , , , , , , CC: Jonathan Corbet , Thomas Gleixner , Ingo Molnar , "Rafael J. Wysocki" , Marc Zyngier , Kai-Heng Feng , Thymo van Beers , Frederic Weisbecker , Konrad Rzeszutek Wilk , David Rientjes , Mike Looijmans , , , References: <1534759484-44744-1-git-send-email-prime.zeng@hisilicon.com> From: Roger Quadros Openpgp: preference=signencrypt Autocrypt: addr=rogerq@ti.com; prefer-encrypt=mutual; keydata= xsFNBFT1lPYBEADZlK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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: <535e6c93-4369-c01e-953c-35e7041129e8@ti.com> Date: Mon, 20 Aug 2018 09:55:49 +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: <1534759484-44744-1-git-send-email-prime.zeng@hisilicon.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-GB Content-Transfer-Encoding: 7bit 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 20/08/18 13:04, 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, and this is what Windows does since Windows 8. > > Signed-off-by: Zeng Tao You need to add Alan's Ack here. I don't think you need to resend though. Reviewed-by: Roger Quadros > --- > Changes in v2: > 1. As suggested by Alan, mention in the commit log that this change is > follow what the Window does. > 2. As suggested by Roger, update the kernel-parameter description. > > Changes in v3: > 1. Remove the blank line suggested by Alan. > 2. Tag applied. > > Acked-by: Alan Stern > Signed-off-by: Zeng Tao > --- > Documentation/admin-guide/kernel-parameters.txt | 3 ++- > drivers/usb/core/hub.c | 4 +++- > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt > index 533ff5c..95db23c 100644 > --- a/Documentation/admin-guide/kernel-parameters.txt > +++ b/Documentation/admin-guide/kernel-parameters.txt > @@ -4453,7 +4453,8 @@ > > usbcore.old_scheme_first= > [USB] Start with the old device initialization > - scheme (default 0 = off). > + scheme, applies only to low and full-speed devices > + (default 0 = off). > > usbcore.usbfs_memory_mb= > [USB] Memory limit (in MB) for buffers allocated by > diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c > index 1fb2668..003fac0 100644 > --- a/drivers/usb/core/hub.c > +++ b/drivers/usb/core/hub.c > @@ -2660,11 +2660,13 @@ static bool use_new_scheme(struct usb_device *udev, int retry, > { > int old_scheme_first_port = > port_dev->quirks & USB_PORT_QUIRK_OLD_SCHEME; > + int quick_enumeration = (udev->speed == USB_SPEED_HIGH); > > if (udev->speed >= USB_SPEED_SUPER) > return false; > > - return USE_NEW_SCHEME(retry, old_scheme_first_port || old_scheme_first); > + return USE_NEW_SCHEME(retry, old_scheme_first_port || old_scheme_first > + || quick_enumeration); > } > > /* Is a USB 3.0 port in the Inactive or Compliance Mode state? > -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki