linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: core: hub: limit HUB_QUIRK_DISABLE_AUTOSUSPEND to USB5534B
@ 2020-05-14 22:02 Eugeniu Rosca
  2020-05-15  2:30 ` Kai-Heng Feng
  0 siblings, 1 reply; 2+ messages in thread
From: Eugeniu Rosca @ 2020-05-14 22:02 UTC (permalink / raw)
  To: Alan Stern, Greg Kroah-Hartman
  Cc: linux-kernel, Eugeniu Rosca, stable, Hardik Gajjar,
	linux-renesas-soc, linux-usb, Kai-Heng Feng

On Tue, May 12, 2020 at 09:36:07PM +0800, Kai-Heng Feng wrote [1]:
> This patch prevents my Raven Ridge xHCI from getting runtime suspend.

The problem described in v5.6 commit 1208f9e1d758c9 ("USB: hub: Fix the
broken detection of USB3 device in SMSC hub") applies solely to the
USB5534B hub [2] present on the Kingfisher Infotainment Carrier Board,
manufactured by Shimafuji Electric Inc [3].

Despite that, the aforementioned commit applied the quirk to _all_ hubs
carrying vendor ID 0x424 (i.e. SMSC), of which there are more [4] than
initially expected. Consequently, the quirk is now enabled on platforms
carrying SMSC/Microchip hub models which potentially don't exhibit the
original issue.

To avoid reports like [1], further limit the quirk's scope to
USB5534B [2], by employing both Vendor and Product ID checks.

Tested on H3ULCB + Kingfisher rev. M05.

[1] https://lore.kernel.org/linux-renesas-soc/73933975-6F0E-40F5-9584-D2B8F615C0F3@canonical.com/
[2] https://www.microchip.com/wwwproducts/en/USB5534B
[3] http://www.shimafuji.co.jp/wp/wp-content/uploads/2018/08/SBEV-RCAR-KF-M06Board_HWSpecificationEN_Rev130.pdf
[4] https://devicehunt.com/search/type/usb/vendor/0424/device/any

Fixes: 1208f9e1d758c9 ("USB: hub: Fix the broken detection of USB3 device in SMSC hub")
Cc: stable@vger.kernel.org # v4.14+
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Hardik Gajjar <hgajjar@de.adit-jv.com>
Cc: linux-renesas-soc@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Reported-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
---
 drivers/usb/core/hub.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 2b6565c06c23..fc748c731832 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -39,6 +39,7 @@
 
 #define USB_VENDOR_GENESYS_LOGIC		0x05e3
 #define USB_VENDOR_SMSC				0x0424
+#define USB_PRODUCT_USB5534B			0x5534
 #define HUB_QUIRK_CHECK_PORT_AUTOSUSPEND	0x01
 #define HUB_QUIRK_DISABLE_AUTOSUSPEND		0x02
 
@@ -5621,8 +5622,11 @@ static void hub_event(struct work_struct *work)
 }
 
 static const struct usb_device_id hub_id_table[] = {
-    { .match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_INT_CLASS,
+    { .match_flags = USB_DEVICE_ID_MATCH_VENDOR
+                   | USB_DEVICE_ID_MATCH_PRODUCT
+                   | USB_DEVICE_ID_MATCH_INT_CLASS,
       .idVendor = USB_VENDOR_SMSC,
+      .idProduct = USB_PRODUCT_USB5534B,
       .bInterfaceClass = USB_CLASS_HUB,
       .driver_info = HUB_QUIRK_DISABLE_AUTOSUSPEND},
     { .match_flags = USB_DEVICE_ID_MATCH_VENDOR
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: core: hub: limit HUB_QUIRK_DISABLE_AUTOSUSPEND to USB5534B
  2020-05-14 22:02 [PATCH] usb: core: hub: limit HUB_QUIRK_DISABLE_AUTOSUSPEND to USB5534B Eugeniu Rosca
@ 2020-05-15  2:30 ` Kai-Heng Feng
  0 siblings, 0 replies; 2+ messages in thread
From: Kai-Heng Feng @ 2020-05-15  2:30 UTC (permalink / raw)
  To: Eugeniu Rosca
  Cc: Alan Stern, Greg Kroah-Hartman, open list, linux-stable,
	Hardik Gajjar, linux-renesas-soc, linux-usb



> On May 15, 2020, at 06:02, Eugeniu Rosca <erosca@de.adit-jv.com> wrote:
> 
> On Tue, May 12, 2020 at 09:36:07PM +0800, Kai-Heng Feng wrote [1]:
>> This patch prevents my Raven Ridge xHCI from getting runtime suspend.
> 
> The problem described in v5.6 commit 1208f9e1d758c9 ("USB: hub: Fix the
> broken detection of USB3 device in SMSC hub") applies solely to the
> USB5534B hub [2] present on the Kingfisher Infotainment Carrier Board,
> manufactured by Shimafuji Electric Inc [3].
> 
> Despite that, the aforementioned commit applied the quirk to _all_ hubs
> carrying vendor ID 0x424 (i.e. SMSC), of which there are more [4] than
> initially expected. Consequently, the quirk is now enabled on platforms
> carrying SMSC/Microchip hub models which potentially don't exhibit the
> original issue.
> 
> To avoid reports like [1], further limit the quirk's scope to
> USB5534B [2], by employing both Vendor and Product ID checks.
> 
> Tested on H3ULCB + Kingfisher rev. M05.
> 
> [1] https://lore.kernel.org/linux-renesas-soc/73933975-6F0E-40F5-9584-D2B8F615C0F3@canonical.com/
> [2] https://www.microchip.com/wwwproducts/en/USB5534B
> [3] http://www.shimafuji.co.jp/wp/wp-content/uploads/2018/08/SBEV-RCAR-KF-M06Board_HWSpecificationEN_Rev130.pdf
> [4] https://devicehunt.com/search/type/usb/vendor/0424/device/any
> 
> Fixes: 1208f9e1d758c9 ("USB: hub: Fix the broken detection of USB3 device in SMSC hub")
> Cc: stable@vger.kernel.org # v4.14+
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Alan Stern <stern@rowland.harvard.edu>
> Cc: Hardik Gajjar <hgajjar@de.adit-jv.com>
> Cc: linux-renesas-soc@vger.kernel.org
> Cc: linux-usb@vger.kernel.org
> Reported-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>

Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>

> ---
> drivers/usb/core/hub.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index 2b6565c06c23..fc748c731832 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -39,6 +39,7 @@
> 
> #define USB_VENDOR_GENESYS_LOGIC		0x05e3
> #define USB_VENDOR_SMSC				0x0424
> +#define USB_PRODUCT_USB5534B			0x5534
> #define HUB_QUIRK_CHECK_PORT_AUTOSUSPEND	0x01
> #define HUB_QUIRK_DISABLE_AUTOSUSPEND		0x02
> 
> @@ -5621,8 +5622,11 @@ static void hub_event(struct work_struct *work)
> }
> 
> static const struct usb_device_id hub_id_table[] = {
> -    { .match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_INT_CLASS,
> +    { .match_flags = USB_DEVICE_ID_MATCH_VENDOR
> +                   | USB_DEVICE_ID_MATCH_PRODUCT
> +                   | USB_DEVICE_ID_MATCH_INT_CLASS,
>       .idVendor = USB_VENDOR_SMSC,
> +      .idProduct = USB_PRODUCT_USB5534B,
>       .bInterfaceClass = USB_CLASS_HUB,
>       .driver_info = HUB_QUIRK_DISABLE_AUTOSUSPEND},
>     { .match_flags = USB_DEVICE_ID_MATCH_VENDOR
> -- 
> 2.26.2
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-15  2:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-14 22:02 [PATCH] usb: core: hub: limit HUB_QUIRK_DISABLE_AUTOSUSPEND to USB5534B Eugeniu Rosca
2020-05-15  2:30 ` Kai-Heng Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).