Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp525519rdh; Thu, 23 Nov 2023 10:17:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IELedV3Qr6AMK4z44QAjCbi34d6xiBpM7eMXeRXsgzmaufpKIvEmys7zGTZlrhzMy1SfpcX X-Received: by 2002:a05:6a21:7891:b0:18b:950d:de3b with SMTP id bf17-20020a056a21789100b0018b950dde3bmr463995pzc.38.1700763438958; Thu, 23 Nov 2023 10:17:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700763438; cv=none; d=google.com; s=arc-20160816; b=TnnbBWjFb2ZW2+kriC4gCxN+8NuC59p4TocsOiQcTW4EjPvFjHU4qrWRUpMUWnz+E9 YZdFP6xx8sDKqK6BY9H0ZdM+34TtJoCyDDGPVuDwDgclpz3AzDC7a9Kng8tkqtnG8uU3 zCJzvSGObMe7iF3RPgAbheXkGIHR39GMhcyFjAskbugfIMLFjOcbnP5fiD3thJ6pQCaO KzSr/zuZ50J0HEWNWIAT686RghQ6s9DJQyXkF9U0+y7ecUsXOYVXbxGloNl0WA0brp9W lsjYqc37lwC+Jo2jqoYSQiSKJrZdsAtlspOE4MrCJRp9z6QziZjvZMW0WSPOiD+yW1qm +o2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=6EVb/udW2/gU0qIc72twKwyvKAVZu9dtVutpy0SD6UI=; fh=B1+HaWECtt05SJ7V1ti3R6kGt1iDmLXPWex110Q561A=; b=QddwkWdzpVh5nK9J29R7l2ipNVqFMeYaTW1ewGuk2EzDSi0EFbgNf8DQqv6tCWOimM 4PcUQSFkY0qhJxAS1ChI/NFWBMRuTholGfSSdb4xgYlHmpbZlP5IDaC6dc3PbrlezuEB c3lBXcUS3TitrZHnQTIezlzqG9X2VjxLtBS5zClCQHKr6HyYBxD6ZODaRqwRrtb4Ho52 2BCmwuWtXB3teFiYbGlwVh2s1qlDquSxsYjE1s+1w+grkj2A7YpuGbZfQVCJi9ijF+Wz VFo7HjMsW+FknvVhzKLGDegV3SZSJFMcwKgNFLB/vv4KHw5F39i16Ln0EosnVvF0G2Nb PDpA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id y192-20020a638ac9000000b0059bdf5a4ecfsi1743031pgd.247.2023.11.23.10.17.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 10:17:18 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 7A6728069C74; Thu, 23 Nov 2023 10:17:16 -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 S230015AbjKWSRC (ORCPT + 99 others); Thu, 23 Nov 2023 13:17:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbjKWSRB (ORCPT ); Thu, 23 Nov 2023 13:17:01 -0500 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id D05E3B9 for ; Thu, 23 Nov 2023 10:17:05 -0800 (PST) Received: (qmail 9883 invoked by uid 1000); 23 Nov 2023 13:17:03 -0500 Date: Thu, 23 Nov 2023 13:17:03 -0500 From: Alan Stern To: Hardik Gajjar Cc: gregkh@linuxfoundation.org, corbet@lwn.net, tj@kernel.org, rdunlap@infradead.org, paulmck@kernel.org, linux-doc@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, erosca@de.adit-jv.com, Martin.Mueller5@de.bosch.com Subject: Re: [PATCH] usb: hubs: Decrease IN-endpoint poll interval for Microchip USB491x hub Message-ID: <988f4311-a726-4a7e-b0bf-6aeec13d8f23@rowland.harvard.edu> References: <20231123081948.58776-1-hgajjar@de.adit-jv.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231123081948.58776-1-hgajjar@de.adit-jv.com> 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]); Thu, 23 Nov 2023 10:17:16 -0800 (PST) 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? > 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