Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1181331rdh; Fri, 24 Nov 2023 06:57:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IGD7wrXmAEg6KqcF0eU0tzfwIfFqBpcAhpkeqsELBGsNKt5W3xUjNJWr8fntAkPDqecpJm9 X-Received: by 2002:a05:6a20:3c91:b0:187:3643:ecce with SMTP id b17-20020a056a203c9100b001873643eccemr3857344pzj.56.1700837848211; Fri, 24 Nov 2023 06:57:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700837848; cv=none; d=google.com; s=arc-20160816; b=HBNNwIjeQjm9BSEtI0bHQ5SWqWs+YNBFgFfXXvoDmTxCUnbkp38TToXkaU5WtCSyk+ BuGiRuGSs5vzfgWaBm7mF7Pm0BOvhy7QhIjtmVtZl3NHhVteBNcFs8RI9Xvv0qKsyZjS FgCkW55RisKcaShz45j+T5M+1qvuQ2CnS+U+Eb8YMzJ0upg/GbuyfmfHK7TswO/tS7VS HWJ17ylxC3uonxWuyfUWQp6wjn0KwdWJiXfYR0knl0pxOXwYyw4RYdhoxqQNtovhrrOR p/48SgFtg/FLRj0IPeseo53SWuvpqFNu/3xWQ9125DYttDwfoNEJ/O/RTNRnHU4+1fmD XFXA== 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=XMVdTC9e2HogXpZA69KE1hKLeToLLa7plNlEBskZ6Zc=; fh=B1+HaWECtt05SJ7V1ti3R6kGt1iDmLXPWex110Q561A=; b=LVtEwKQptkvP2irwJtNnDcr73GAak9YmnyIjLOz610oOmMcISAIY41JvCRY151bhCa k6X7qEjRr/d1O5SKzGNUi1usDtPipK2pKCshpbC4WBmlndVs0J4bds9GGkibsMTj9EI2 cRwx90MU9p0Q1FqhHNUWRg8+XITFPMdePIsYDh6j+NZwtsLoImNHDEO8rt0tsDcSyUaW mgDs9lnFS9OmIvyYJeuZuwjw+Uj0PVPB7zigAWlp7Yis9LV+qPyp4awU65QU+ZzR50j0 uyVECH9RbC/JPAiiB9QU18SgbQdXV1J8PVygBd2porUFHfcX3XRnFspc+uYJudm7rmMO C0OQ== 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 jx4-20020a17090b46c400b002839e721d0dsi3732739pjb.77.2023.11.24.06.57.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 06:57:28 -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 5B02F80B1E72; Fri, 24 Nov 2023 06:57:25 -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 S231254AbjKXO5K (ORCPT + 99 others); Fri, 24 Nov 2023 09:57:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229659AbjKXO5J (ORCPT ); Fri, 24 Nov 2023 09:57:09 -0500 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 3E3BED72 for ; Fri, 24 Nov 2023 06:57:15 -0800 (PST) Received: (qmail 33955 invoked by uid 1000); 24 Nov 2023 09:57:14 -0500 Date: Fri, 24 Nov 2023 09:57:14 -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: <66137982-c6a4-48c8-860f-c87cc6e01101@rowland.harvard.edu> References: <20231123081948.58776-1-hgajjar@de.adit-jv.com> <988f4311-a726-4a7e-b0bf-6aeec13d8f23@rowland.harvard.edu> <20231124145005.GA72525@vmlxhi-118.adit-jv.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231124145005.GA72525@vmlxhi-118.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]); Fri, 24 Nov 2023 06:57:25 -0800 (PST) On Fri, Nov 24, 2023 at 03:50:05PM +0100, Hardik Gajjar wrote: > 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()?" Basically, yes. The update should be performed in the hub_probe() routine if the quirk flag is set, before hub_configure() is called. It might be necessary to add a usb_set_interface() call as well, in case the old bInterval value has already been cached by the host controller driver. Alan Stern