Message ID | 20231201144705.97385-1-hgajjar@de.adit-jv.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp1172734vqy; Fri, 1 Dec 2023 06:47:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IFFXnBBh1N/mle+igxSIQtAeE1w1AWL+sOLEEe21R9ILKtD0NCNPll+qko1JY4u/rTNJFIV X-Received: by 2002:a17:90b:1804:b0:286:531b:a012 with SMTP id lw4-20020a17090b180400b00286531ba012mr3496545pjb.17.1701442047678; Fri, 01 Dec 2023 06:47:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701442047; cv=none; d=google.com; s=arc-20160816; b=F5qAgf5ZvB4cLHTfO2+V+T9/G/D5Ic9I3ISRfxkdiHgmtl1SsNwzgRela2rxqu2vQG 1/PQGOpLznuvUGXl+sK3Mur65qVPnxQiRMVj1O1zxQkHjGz6I+QmhhFoQAlrK2gcD4mc xQYcouE7RtRCaDgv45fGxAHVIxuBz+m/6wLK7xd/tSOq1dMiPjVyGFyV4kuBlMZi49gt 752kNf1wiCJGGVUXa12K0tbfMMFPZSn/H1lDyXcammJMAmOysDnAduxh4XeNuGlyoZoF NnP/FdLCOCZ0BtbA2yQpypNv+yfC5V4C++63cM3M00WiqWqEX1kMi+ptY89dQMrVrrYL 5Hbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=cjz1MCbCxAj0ULyXJ754YyIW2vVxcTm14b2gcpVuuaQ=; fh=4g3cd4RM+YweIDbfrjYz4rUwslbbBUIy1rrG5jFTReQ=; b=I4hrC3u6crsN3a58cnY6zZOCREhwQ7XIZTn3Rgf9MQcA5Fte6555Mvw9IPZbo23X2S l5pJLYe0nEP/Xan3dLhRhCxrNElq/CtbOxM7zxhkUPpN0yaBV/2BFe+SGAX0mmJNXoeC YJdrNeUsA8lzrG+22gQs1d5xGsTGd+YZJG+6WlxRvpslbfCVOA8TNENYpDYRSMZhohP+ d25w9b5OlPCxioBRX9+3L+/yksNhindVHGJjDwsPAP7CmgHfKRbW90CKWBoFM46riU+u cmKDTnkGCNX/82YY8AkJkO4gAAsmnlqQjpXRSzwGmLPN4XYF5o9aswdwXeAcq8XUE+os 4JwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id t20-20020a17090ae51400b0028649cc70b2si2503453pjy.14.2023.12.01.06.47.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 06:47:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 007FA84AB832; Fri, 1 Dec 2023 06:47:20 -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 S1379234AbjLAOrL (ORCPT <rfc822;ruipengqi7@gmail.com> + 99 others); Fri, 1 Dec 2023 09:47:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379221AbjLAOrK (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 1 Dec 2023 09:47:10 -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 37ACF10F4; Fri, 1 Dec 2023 06:47:15 -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 4EB9D520123; Fri, 1 Dec 2023 15:47:13 +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.35; Fri, 1 Dec 2023 15:47:13 +0100 From: Hardik Gajjar <hgajjar@de.adit-jv.com> To: <gregkh@linuxfoundation.org>, <stern@rowland.harvard.edu>, <corbet@lwn.net> CC: <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <erosca@de.adit-jv.com>, <hgajjar@de.adit-jv.com>, <tj@kernel.org>, <paulmck@kernel.org>, <Martin.Mueller5@de.bosch.com> Subject: [PATCH v3] usb: hub: Add quirk to decrease IN-ep poll interval for Microchip USB491x hub Date: Fri, 1 Dec 2023 15:47:05 +0100 Message-ID: <20231201144705.97385-1-hgajjar@de.adit-jv.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain 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: <linux-kernel.vger.kernel.org> 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, 01 Dec 2023 06:47:21 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784091296678554137 X-GMAIL-MSGID: 1784091296678554137 |
Series |
[v3] usb: hub: Add quirk to decrease IN-ep poll interval for Microchip USB491x hub
|
|
Commit Message
Hardik Gajjar
Dec. 1, 2023, 2:47 p.m. UTC
There is a potential delay in notifying Linux USB drivers of downstream
USB bus activity when connecting a high-speed or superSpeed device via the
Microchip USB491x hub. This delay is due to the fixed bInterval value of
12 in the silicon of the Microchip USB491x hub.
Microchip requested to ignore the device descriptor and decrease that
value to 9 as it was too late to modify that in silicon.
This patch speeds up the USB enummeration process that helps to pass
Apple Carplay certifications and improve the User experience when utilizing
the USB device via Microchip Multihost USB491x Hub.
A new hub quirk HUB_QUIRK_REDUCE_FRAME_INTR_BINTERVAL speeds up
the notification process for Microchip USB491x hub by limiting
the maximum bInterval value to 9.
Signed-off-by: Hardik Gajjar <hgajjar@de.adit-jv.com>
---
changes since version 1:
- Move implementation from config.c and quirk.c to hub.c as this is hub
specific changes.
- Improve commit message.
- Link to v1 - https://lore.kernel.org/all/20231123081948.58776-1-hgajjar@de.adit-jv.com/
changes since version 2:
- Call usb_set_interface after updating the bInterval to Tell the HCD about modification
- Link to v2 - https://lore.kernel.org/all/20231130084855.119937-1-hgajjar@de.adit-jv.com/
---
drivers/usb/core/hub.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
Comments
On Fri, Dec 01, 2023 at 03:47:05PM +0100, Hardik Gajjar wrote: > There is a potential delay in notifying Linux USB drivers of downstream > USB bus activity when connecting a high-speed or superSpeed device via the > Microchip USB491x hub. This delay is due to the fixed bInterval value of > 12 in the silicon of the Microchip USB491x hub. > > Microchip requested to ignore the device descriptor and decrease that > value to 9 as it was too late to modify that in silicon. > > This patch speeds up the USB enummeration process that helps to pass > Apple Carplay certifications and improve the User experience when utilizing > the USB device via Microchip Multihost USB491x Hub. > > A new hub quirk HUB_QUIRK_REDUCE_FRAME_INTR_BINTERVAL speeds up > the notification process for Microchip USB491x hub by limiting > the maximum bInterval value to 9. > > Signed-off-by: Hardik Gajjar <hgajjar@de.adit-jv.com> > --- > changes since version 1: > - Move implementation from config.c and quirk.c to hub.c as this is hub > specific changes. > - Improve commit message. > - Link to v1 - https://lore.kernel.org/all/20231123081948.58776-1-hgajjar@de.adit-jv.com/ > > changes since version 2: > - Call usb_set_interface after updating the bInterval to Tell the HCD about modification > - Link to v2 - https://lore.kernel.org/all/20231130084855.119937-1-hgajjar@de.adit-jv.com/ > --- > drivers/usb/core/hub.c | 27 +++++++++++++++++++++++++++ > 1 file changed, 27 insertions(+) > > diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c > index b4584a0cd484..b5ac29c5f016 100644 > --- a/drivers/usb/core/hub.c > +++ b/drivers/usb/core/hub.c > @@ -47,12 +47,18 @@ > #define USB_VENDOR_TEXAS_INSTRUMENTS 0x0451 > #define USB_PRODUCT_TUSB8041_USB3 0x8140 > #define USB_PRODUCT_TUSB8041_USB2 0x8142 > +#define USB_VENDOR_MICROCHIP 0x0424 > +#define USB_PRODUCT_USB4913 0x4913 > +#define USB_PRODUCT_USB4914 0x4914 > +#define USB_PRODUCT_USB4915 0x4915 > #define HUB_QUIRK_CHECK_PORT_AUTOSUSPEND 0x01 > #define HUB_QUIRK_DISABLE_AUTOSUSPEND 0x02 > +#define HUB_QUIRK_REDUCE_FRAME_INTR_BINTERVAL 0x08 Why use 0x08 instead of 0x04? Alan Stern
On Fri, Dec 01, 2023 at 11:13:53AM -0500, Alan Stern wrote: > On Fri, Dec 01, 2023 at 03:47:05PM +0100, Hardik Gajjar wrote: > > There is a potential delay in notifying Linux USB drivers of downstream > > USB bus activity when connecting a high-speed or superSpeed device via the > > Microchip USB491x hub. This delay is due to the fixed bInterval value of > > 12 in the silicon of the Microchip USB491x hub. > > > > Microchip requested to ignore the device descriptor and decrease that > > value to 9 as it was too late to modify that in silicon. > > > > This patch speeds up the USB enummeration process that helps to pass > > Apple Carplay certifications and improve the User experience when utilizing > > the USB device via Microchip Multihost USB491x Hub. > > > > A new hub quirk HUB_QUIRK_REDUCE_FRAME_INTR_BINTERVAL speeds up > > the notification process for Microchip USB491x hub by limiting > > the maximum bInterval value to 9. > > > > Signed-off-by: Hardik Gajjar <hgajjar@de.adit-jv.com> > > --- > > changes since version 1: > > - Move implementation from config.c and quirk.c to hub.c as this is hub > > specific changes. > > - Improve commit message. > > - Link to v1 - https://lore.kernel.org/all/20231123081948.58776-1-hgajjar@de.adit-jv.com/ > > > > changes since version 2: > > - Call usb_set_interface after updating the bInterval to Tell the HCD about modification > > - Link to v2 - https://lore.kernel.org/all/20231130084855.119937-1-hgajjar@de.adit-jv.com/ > > --- > > drivers/usb/core/hub.c | 27 +++++++++++++++++++++++++++ > > 1 file changed, 27 insertions(+) > > > > diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c > > index b4584a0cd484..b5ac29c5f016 100644 > > --- a/drivers/usb/core/hub.c > > +++ b/drivers/usb/core/hub.c > > @@ -47,12 +47,18 @@ > > #define USB_VENDOR_TEXAS_INSTRUMENTS 0x0451 > > #define USB_PRODUCT_TUSB8041_USB3 0x8140 > > #define USB_PRODUCT_TUSB8041_USB2 0x8142 > > +#define USB_VENDOR_MICROCHIP 0x0424 > > +#define USB_PRODUCT_USB4913 0x4913 > > +#define USB_PRODUCT_USB4914 0x4914 > > +#define USB_PRODUCT_USB4915 0x4915 > > #define HUB_QUIRK_CHECK_PORT_AUTOSUSPEND 0x01 > > #define HUB_QUIRK_DISABLE_AUTOSUSPEND 0x02 > > +#define HUB_QUIRK_REDUCE_FRAME_INTR_BINTERVAL 0x08 > > Why use 0x08 instead of 0x04? And why not use BIT() as that's what these are. thanks, greg k-h
On Fri, Dec 01, 2023 at 11:13:53AM -0500, Alan Stern wrote: > On Fri, Dec 01, 2023 at 03:47:05PM +0100, Hardik Gajjar wrote: > > There is a potential delay in notifying Linux USB drivers of downstream > > USB bus activity when connecting a high-speed or superSpeed device via the > > Microchip USB491x hub. This delay is due to the fixed bInterval value of > > 12 in the silicon of the Microchip USB491x hub. > > > > Microchip requested to ignore the device descriptor and decrease that > > value to 9 as it was too late to modify that in silicon. > > > > This patch speeds up the USB enummeration process that helps to pass > > Apple Carplay certifications and improve the User experience when utilizing > > the USB device via Microchip Multihost USB491x Hub. > > > > A new hub quirk HUB_QUIRK_REDUCE_FRAME_INTR_BINTERVAL speeds up > > the notification process for Microchip USB491x hub by limiting > > the maximum bInterval value to 9. > > > > Signed-off-by: Hardik Gajjar <hgajjar@de.adit-jv.com> > > --- > > changes since version 1: > > - Move implementation from config.c and quirk.c to hub.c as this is hub > > specific changes. > > - Improve commit message. > > - Link to v1 - https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_all_20231123081948.58776-2D1-2Dhgajjar-40de.adit-2Djv.com_&d=DwICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=QQ3QedNypxcZh4lyJ03w82T23GGGhDS9PuCb678l0L0&m=JINv_OISTxW8v8yb9tolCAxLxPiVc7UqJhl5BjTAuILGMvqrKEwJhrwzz8yj7Uqi&s=_UbxbqWhpCXaOnmryralngzR1cMrf3bKTJQKyEX1AGw&e= > > > > changes since version 2: > > - Call usb_set_interface after updating the bInterval to Tell the HCD about modification > > - Link to v2 - https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_all_20231130084855.119937-2D1-2Dhgajjar-40de.adit-2Djv.com_&d=DwICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=QQ3QedNypxcZh4lyJ03w82T23GGGhDS9PuCb678l0L0&m=JINv_OISTxW8v8yb9tolCAxLxPiVc7UqJhl5BjTAuILGMvqrKEwJhrwzz8yj7Uqi&s=Fy-O0g4cYUiedPpzRIJU7rX8zvrhvjFfjZ7xo-K19yg&e= > > --- > > drivers/usb/core/hub.c | 27 +++++++++++++++++++++++++++ > > 1 file changed, 27 insertions(+) > > > > diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c > > index b4584a0cd484..b5ac29c5f016 100644 > > --- a/drivers/usb/core/hub.c > > +++ b/drivers/usb/core/hub.c > > @@ -47,12 +47,18 @@ > > #define USB_VENDOR_TEXAS_INSTRUMENTS 0x0451 > > #define USB_PRODUCT_TUSB8041_USB3 0x8140 > > #define USB_PRODUCT_TUSB8041_USB2 0x8142 > > +#define USB_VENDOR_MICROCHIP 0x0424 > > +#define USB_PRODUCT_USB4913 0x4913 > > +#define USB_PRODUCT_USB4914 0x4914 > > +#define USB_PRODUCT_USB4915 0x4915 > > #define HUB_QUIRK_CHECK_PORT_AUTOSUSPEND 0x01 > > #define HUB_QUIRK_DISABLE_AUTOSUSPEND 0x02 > > +#define HUB_QUIRK_REDUCE_FRAME_INTR_BINTERVAL 0x08 > > Why use 0x08 instead of 0x04? > > Alan Stern Ahh, This is a mistake. Thanks for pointing out. In my vendor kernel there is already a quirk with 0x04 so started the development and testing with 0x08, but forgot to change to 0x04 when cherry-picked to mainline. Thanks, Hardik
On Mon, Dec 04, 2023 at 08:02:50AM +0100, Greg KH wrote: > On Fri, Dec 01, 2023 at 11:13:53AM -0500, Alan Stern wrote: > > On Fri, Dec 01, 2023 at 03:47:05PM +0100, Hardik Gajjar wrote: > > > There is a potential delay in notifying Linux USB drivers of downstream > > > USB bus activity when connecting a high-speed or superSpeed device via the > > > Microchip USB491x hub. This delay is due to the fixed bInterval value of > > > 12 in the silicon of the Microchip USB491x hub. > > > > > > Microchip requested to ignore the device descriptor and decrease that > > > value to 9 as it was too late to modify that in silicon. > > > > > > This patch speeds up the USB enummeration process that helps to pass > > > Apple Carplay certifications and improve the User experience when utilizing > > > the USB device via Microchip Multihost USB491x Hub. > > > > > > A new hub quirk HUB_QUIRK_REDUCE_FRAME_INTR_BINTERVAL speeds up > > > the notification process for Microchip USB491x hub by limiting > > > the maximum bInterval value to 9. > > > > > > Signed-off-by: Hardik Gajjar <hgajjar@de.adit-jv.com> > > > --- > > > changes since version 1: > > > - Move implementation from config.c and quirk.c to hub.c as this is hub > > > specific changes. > > > - Improve commit message. > > > - Link to v1 - https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_all_20231123081948.58776-2D1-2Dhgajjar-40de.adit-2Djv.com_&d=DwICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=SAhjP5GOmrADp1v_EE5jWoSuMlYCIt9gKduw-DCBPLs&m=MwlH5BZuYXKwMbYoZm0ibbRgqL9CLBFJs3W-um9OX810KDZtChbSXjDyPjCZhJDf&s=xgoOKLqU4fKUbsJMZHzIQzrWKH2W9ikdmKvGntoPcaA&e= > > > > > > changes since version 2: > > > - Call usb_set_interface after updating the bInterval to Tell the HCD about modification > > > - Link to v2 - https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_all_20231130084855.119937-2D1-2Dhgajjar-40de.adit-2Djv.com_&d=DwICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=SAhjP5GOmrADp1v_EE5jWoSuMlYCIt9gKduw-DCBPLs&m=MwlH5BZuYXKwMbYoZm0ibbRgqL9CLBFJs3W-um9OX810KDZtChbSXjDyPjCZhJDf&s=Ck2GM1MhxBKLkLrlkZd_QwoIXz07CbJGVqpVss0rSEI&e= > > > --- > > > drivers/usb/core/hub.c | 27 +++++++++++++++++++++++++++ > > > 1 file changed, 27 insertions(+) > > > > > > diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c > > > index b4584a0cd484..b5ac29c5f016 100644 > > > --- a/drivers/usb/core/hub.c > > > +++ b/drivers/usb/core/hub.c > > > @@ -47,12 +47,18 @@ > > > #define USB_VENDOR_TEXAS_INSTRUMENTS 0x0451 > > > #define USB_PRODUCT_TUSB8041_USB3 0x8140 > > > #define USB_PRODUCT_TUSB8041_USB2 0x8142 > > > +#define USB_VENDOR_MICROCHIP 0x0424 > > > +#define USB_PRODUCT_USB4913 0x4913 > > > +#define USB_PRODUCT_USB4914 0x4914 > > > +#define USB_PRODUCT_USB4915 0x4915 > > > #define HUB_QUIRK_CHECK_PORT_AUTOSUSPEND 0x01 > > > #define HUB_QUIRK_DISABLE_AUTOSUSPEND 0x02 > > > +#define HUB_QUIRK_REDUCE_FRAME_INTR_BINTERVAL 0x08 > > > > Why use 0x08 instead of 0x04? > > And why not use BIT() as that's what these are. > > thanks, > > greg k-h I am considering aligning with existing quirks. Is it advisable to use something like HUB_QUIRK_REDUCE_FRAME_INTR_BINTERVAL BIT(2)? I'm thinking to submit two patches – one to replace hard values with BIT() in existing quirks and a second patch containing my changes. Thanks, Hardik
On Mon, Dec 04, 2023 at 04:25:43PM +0100, Hardik Gajjar wrote: > On Mon, Dec 04, 2023 at 08:02:50AM +0100, Greg KH wrote: > > And why not use BIT() as that's what these are. > > > > thanks, > > > > greg k-h > > I am considering aligning with existing quirks. > Is it advisable to use something like HUB_QUIRK_REDUCE_FRAME_INTR_BINTERVAL BIT(2)? > I'm thinking to submit two patches – one to replace hard values with BIT() in existing quirks and a second patch containing my changes. That's a good idea. Alan Stern
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index b4584a0cd484..b5ac29c5f016 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -47,12 +47,18 @@ #define USB_VENDOR_TEXAS_INSTRUMENTS 0x0451 #define USB_PRODUCT_TUSB8041_USB3 0x8140 #define USB_PRODUCT_TUSB8041_USB2 0x8142 +#define USB_VENDOR_MICROCHIP 0x0424 +#define USB_PRODUCT_USB4913 0x4913 +#define USB_PRODUCT_USB4914 0x4914 +#define USB_PRODUCT_USB4915 0x4915 #define HUB_QUIRK_CHECK_PORT_AUTOSUSPEND 0x01 #define HUB_QUIRK_DISABLE_AUTOSUSPEND 0x02 +#define HUB_QUIRK_REDUCE_FRAME_INTR_BINTERVAL 0x08 #define USB_TP_TRANSMISSION_DELAY 40 /* ns */ #define USB_TP_TRANSMISSION_DELAY_MAX 65535 /* ns */ #define USB_PING_RESPONSE_TIME 400 /* ns */ +#define USB_REDUCE_FRAME_INTR_BINTERVAL 9 /* Protect struct usb_device->state and ->children members * Note: Both are also protected by ->dev.sem, except that ->state can @@ -1927,6 +1933,14 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) usb_autopm_get_interface_no_resume(intf); } + if ((id->driver_info & HUB_QUIRK_REDUCE_FRAME_INTR_BINTERVAL) && + desc->endpoint[0].desc.bInterval > USB_REDUCE_FRAME_INTR_BINTERVAL) { + desc->endpoint[0].desc.bInterval = + USB_REDUCE_FRAME_INTR_BINTERVAL; + /* Tell the HCD about the interrupt ep's new bInterval */ + usb_set_interface(hdev, 0, 0); + } + if (hub_configure(hub, &desc->endpoint[0].desc) >= 0) { onboard_hub_create_pdevs(hdev, &hub->onboard_hub_devs); @@ -5918,6 +5932,21 @@ static const struct usb_device_id hub_id_table[] = { .idVendor = USB_VENDOR_TEXAS_INSTRUMENTS, .idProduct = USB_PRODUCT_TUSB8041_USB3, .driver_info = HUB_QUIRK_DISABLE_AUTOSUSPEND}, + { .match_flags = USB_DEVICE_ID_MATCH_VENDOR + | USB_DEVICE_ID_MATCH_PRODUCT, + .idVendor = USB_VENDOR_MICROCHIP, + .idProduct = USB_PRODUCT_USB4913, + .driver_info = HUB_QUIRK_REDUCE_FRAME_INTR_BINTERVAL}, + { .match_flags = USB_DEVICE_ID_MATCH_VENDOR + | USB_DEVICE_ID_MATCH_PRODUCT, + .idVendor = USB_VENDOR_MICROCHIP, + .idProduct = USB_PRODUCT_USB4914, + .driver_info = HUB_QUIRK_REDUCE_FRAME_INTR_BINTERVAL}, + { .match_flags = USB_DEVICE_ID_MATCH_VENDOR + | USB_DEVICE_ID_MATCH_PRODUCT, + .idVendor = USB_VENDOR_MICROCHIP, + .idProduct = USB_PRODUCT_USB4915, + .driver_info = HUB_QUIRK_REDUCE_FRAME_INTR_BINTERVAL}, { .match_flags = USB_DEVICE_ID_MATCH_DEV_CLASS, .bDeviceClass = USB_CLASS_HUB}, { .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS,