Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1176329rdh; Fri, 24 Nov 2023 06:50:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IFnoUg7bEbHWa9PvVgB4rzLcyO+M109SV3yh1Bzmf2VZPBQglHrLkWd8ugv+CE1NgwKv9ws X-Received: by 2002:a05:6a20:7da0:b0:159:c07d:66f0 with SMTP id v32-20020a056a207da000b00159c07d66f0mr4262689pzj.6.1700837429229; Fri, 24 Nov 2023 06:50:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700837429; cv=none; d=google.com; s=arc-20160816; b=wYD8ZKpTL1hlnnYf4f0A2l9Nq+vnBK0aLVIBt7DtmF40pjox9D8rGsdc6IntGTkOCb 4Clc9mcd30ZmFPT7GlTv0GoO0azvd2UdFL6q33h3eURnl1u898HTw/xSgwI46rzSan09 nU7DH6AcZk/gD3u4y2cxOQBVzPoU3z1yjHF7yKUuzqqBguzw4LctYhzRft4KIp6Z0qgU VuS360avFLXPEYxrUcziXmfoDaeRcDgsM19FzaM/wHE04GInKKeK4Q0cchRB7JjkIvrG v8lcJ7xexyC7M5Wi8K1jOgQQt5iKzKhgnpZ0j/+Iy0sCoc60z9dpqGJLn4e52+w/rr7U xHOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=KGRT6EiWIOUnWefuszDw6F2KHQBovdfgrTlwkadsDqo=; fh=LY+WTaPFnpG1+5FZeXKdcbPxx9EOXJu2fmPwcYnkcSc=; b=yx4s9aGEf2Oe+aTlEdWPg1Xpwy5htiEdJEpi4piCYM1re+NQT5wvYTB3N/ITJpmy2X EXdJ9/0W4oy+T43Zc2lX9wyhcTgENwOWuq6JDRRUgmAoeg1ELc41R1l485ln0xRCAqHe Xo9PbvUxtUf9xjPCMiDRDA7WeM8zojGNGe/oAKH32ut8SOpObgiafjXXGem+NTJmPGLP qnSoBuft6xnGY/QipVmxtX7JbbK2P4IaLpxvQ5LxqZErWXmY/szRVoETu3p5VosPilrT H/KGZDKcGP1NbgidcyXnH6BlRFilVVk6McilVtCXLnt8Boupijhnxccm/0BsPYRb5FDw ZtjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id d13-20020a056a00244d00b006bf0f06c31dsi3705381pfj.166.2023.11.24.06.50.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 06:50:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 4E2A280B1E76; Fri, 24 Nov 2023 06:50:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231194AbjKXOuI (ORCPT + 99 others); Fri, 24 Nov 2023 09:50:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbjKXOuH (ORCPT ); Fri, 24 Nov 2023 09:50:07 -0500 Received: from hi1smtp01.de.adit-jv.com (smtp1.de.adit-jv.com [93.241.18.167]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF6ECD60; Fri, 24 Nov 2023 06:50:12 -0800 (PST) Received: from hi2exch02.adit-jv.com (hi2exch02.adit-jv.com [10.72.92.28]) by hi1smtp01.de.adit-jv.com (Postfix) with ESMTP id 17D2C5201D5; Fri, 24 Nov 2023 15:50:11 +0100 (CET) Received: from vmlxhi-118.adit-jv.com (10.72.93.77) by hi2exch02.adit-jv.com (10.72.92.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Fri, 24 Nov 2023 15:50:10 +0100 Date: Fri, 24 Nov 2023 15:50:05 +0100 From: Hardik Gajjar To: Alan Stern CC: Hardik Gajjar , , , , , , , , , , Subject: Re: [PATCH] usb: hubs: Decrease IN-endpoint poll interval for Microchip USB491x hub Message-ID: <20231124145005.GA72525@vmlxhi-118.adit-jv.com> References: <20231123081948.58776-1-hgajjar@de.adit-jv.com> <988f4311-a726-4a7e-b0bf-6aeec13d8f23@rowland.harvard.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <988f4311-a726-4a7e-b0bf-6aeec13d8f23@rowland.harvard.edu> User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [10.72.93.77] X-ClientProxiedBy: hi2exch02.adit-jv.com (10.72.92.28) To hi2exch02.adit-jv.com (10.72.92.28) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 24 Nov 2023 06:50:24 -0800 (PST) On Thu, Nov 23, 2023 at 01:17:03PM -0500, Alan Stern wrote: > On Thu, Nov 23, 2023 at 09:19:48AM +0100, Hardik Gajjar wrote: > > There is a potential delay in announcing downstream USB bus activity to > > Linux USB drivers due to the default interrupt endpoint having a poll > > interval of 256ms. > > > > Microchip has recommended ignoring the device descriptor and reducing > > that value to 32ms, as it was too late to modify it in silicon. > > > > This patch aims to speed up the USB enumeration process, facilitating > > the successful completion of Apple CarPlay certifications and enhancing > > user experience when utilizing USB devices through the Microchip Multihost > > Hub. > > > > A new quirk, USB_QUIRK_REDUCE_FRAME_INTR_BINTERVAL, accelerates the > > notification process by changing the Endpoint interrupt poll interval > > from 256ms to 32ms. > > But this is meant to apply only to hubs, right? So shouldn't it be a > HUB_QUIRK_32_MS_INTR_INTERVAL macro, used in hub.c's hub_id_table, > rather than a general USB quirk? Thank you, Alan, for the feedback. To confirm my understanding, are you suggesting moving all implementations to hub.c, adding the hub-specific quirk, and using the same quirk to update the bInterval value parsed by usb_get_configuration() in usb_enumerate_device()?" > > > Signed-off-by: Hardik Gajjar > > --- > > Documentation/admin-guide/kernel-parameters.txt | 4 ++++ > > drivers/usb/core/config.c | 8 ++++++++ > > drivers/usb/core/quirks.c | 11 +++++++++++ > > include/linux/usb/quirks.h | 5 +++++ > > 4 files changed, 28 insertions(+) > > > > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt > > index 65731b060e3f..6b0a66f0e6bf 100644 > > --- a/Documentation/admin-guide/kernel-parameters.txt > > +++ b/Documentation/admin-guide/kernel-parameters.txt > > @@ -6908,6 +6908,10 @@ > > pause after every control message); > > o = USB_QUIRK_HUB_SLOW_RESET (Hub needs extra > > delay after resetting its port); > > + p = USB_QUIRK_REDUCE_FRAME_INTR_BINTERVAL (Set > > + bInterval to a Maximum of 9 to Reduce > > + default Poll Rate from 256 ms to > > + 32 ms); > > 256 ms and 32 ms are _periods_ (or intervals), not _rates_. > > bInterval=9 corresponds to 32 ms only for High Speed and SuperSpeed* > devices. For Low and Full Speed it corresponds to 9 ms. Explanatory > comments should strive not to be misleading. > > Alan Stern