Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp101840ybk; Thu, 14 May 2020 17:33:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKkgPSDJyf+kbktNd1WSO/sCbVz4r85V7WZqjnhiiF95UsiNp4R4ZieiS5KA4jRsO7/j+g X-Received: by 2002:a05:6402:296:: with SMTP id l22mr590338edv.353.1589502817831; Thu, 14 May 2020 17:33:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589502817; cv=none; d=google.com; s=arc-20160816; b=BRXLklPU40dh+5LlpscNGue3PGX4xRedg5vgYlUJ+PD0H8Gy6gJr7wnTs+KUMjhhiC p2nKwEkeukzrdz8iMoI4R4CQtBzLp+0nw0ciVY0DMYNUfGWsNTGB10WZBvUVcsaNxnCu rBuVQP89KfiZ3wjVPKFd3MtbBZC7T9Lh8J+QclOMuHKAy64AMLKmH8P0vBubgELCOBXx NoDKhEuefDSG+ajSBmuk8MriiwY2EqQDefoVKhvaUMgVHR61YBKMJlTIvz1a/xaOKzNm k7ieRWFL19aFb5EpB62utply18zrNx+QH1g+QLDBoo54x/gQcYTXt7drwhqqUyxrpWPr uS3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=lkZa2OqBrfTSydHwta77b/DrOdugj5NzLvEg0JU3pvo=; b=QOqGO8iIK6f63ssZ1T0ZB30hXjpc2zEu9p21s+1qc6zydl4+r2AKxLt8g5q7AR1xDS 4TKqU7nnZtu5/G4vpodPcqPbxWewmpkJu7hXc/T3Dd21IgqVwVRMJfAq1Zalkq8SiBr8 FCA70c66rYepWZ5dw9k/YOUbESWolVNJusF3JyEA7fqD+1eBinOGLdJ/tPhEx/RThEu0 rxDEvuXDE/fC6mmPL/fu4QzabhkodZxGfHbN2147NE5cDyXzvAFUwB1NiQJXgAVQNQv/ hxqEKSpKWNTSJhX3L61fVsrq5w1WE/0y90eYEqkoy50k3z6mALmzXwGLWa+dcqJncIgK zsiQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y9si218534edl.425.2020.05.14.17.33.10; Thu, 14 May 2020 17:33:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727867AbgENWD3 (ORCPT + 99 others); Thu, 14 May 2020 18:03:29 -0400 Received: from smtp1.de.adit-jv.com ([93.241.18.167]:50491 "EHLO smtp1.de.adit-jv.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726126AbgENWD2 (ORCPT ); Thu, 14 May 2020 18:03:28 -0400 Received: from localhost (smtp1.de.adit-jv.com [127.0.0.1]) by smtp1.de.adit-jv.com (Postfix) with ESMTP id F3A423C04C1; Fri, 15 May 2020 00:03:24 +0200 (CEST) Received: from smtp1.de.adit-jv.com ([127.0.0.1]) by localhost (smtp1.de.adit-jv.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o1TOWhpVUiKY; Fri, 15 May 2020 00:03:16 +0200 (CEST) Received: from HI2EXCH01.adit-jv.com (hi2exch01.adit-jv.com [10.72.92.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp1.de.adit-jv.com (Postfix) with ESMTPS id 9B5E93C04C0; Fri, 15 May 2020 00:03:16 +0200 (CEST) Received: from lxhi-065.adit-jv.com (10.72.94.5) by HI2EXCH01.adit-jv.com (10.72.92.24) with Microsoft SMTP Server (TLS) id 14.3.487.0; Fri, 15 May 2020 00:03:16 +0200 From: Eugeniu Rosca To: Alan Stern , Greg Kroah-Hartman CC: , Eugeniu Rosca , , Hardik Gajjar , , , Kai-Heng Feng Subject: [PATCH] usb: core: hub: limit HUB_QUIRK_DISABLE_AUTOSUSPEND to USB5534B Date: Fri, 15 May 2020 00:02:46 +0200 Message-ID: <20200514220246.13290-1-erosca@de.adit-jv.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.72.94.5] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Alan Stern Cc: Hardik Gajjar Cc: linux-renesas-soc@vger.kernel.org Cc: linux-usb@vger.kernel.org Reported-by: Kai-Heng Feng Signed-off-by: Eugeniu Rosca --- 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