Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1978593imm; Thu, 24 May 2018 03:57:27 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrRDewsIZfJ7xVSMaiRi+3mUMyYACLzsrxYrD16bitgMa8eaKng2cEUhnGLxbR9dDh3rEGw X-Received: by 2002:a63:6185:: with SMTP id v127-v6mr5074424pgb.301.1527159447093; Thu, 24 May 2018 03:57:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527159447; cv=none; d=google.com; s=arc-20160816; b=N+mLe8oSXUojdPaN4qjL/00nazonRNUYZg6IXUinwyJfdmZojf50PFSisBXV3FUHbz QsxnQra7/+FpU33PkNG1UJIY5FCsje/aAZmLxBCniYdfgZSLrW5Rv8Ef0yC4Pd0gSTB1 PQAUwlfTWME2s6AeLxRehmvyWAKbu02LbTYgzsy21Xt2U3nqKsYC4RnKFU+jWtskiFEb Mu4/fzn3jTu+1b5FGV8O2DEz3UPO7Wa2LWIP/VMXIQRcx/gFJ8+Gb8o7zP2pRWOCyKX0 93JpQ3DIY44C878OYUhzOkUfR5PjNl9xqRgKZm1weWMShJgB8pMkcN7s8pFUoQpOvV+4 e8VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=2I0B3s2YYT/X2PTvo8t7AzS69c/KY1h0nGysse2VRv8=; b=ZStAY1HQra0IUW1QQZgXHzw34I6UMA6CjMrU5GJagpO0hDAs6ieeELC+OWzygp8wqG QsMELFMtYB9IAW7VWEwoghGTwy1di/Z1hVO4zjleRmw7bzQdK9K1ndt7r7s4zJXx0znr Vv+8cLQuEDWoo/oc2t25OAND8uROJ/rSXUeHAxKKQEpbqVL+hrn3evyuqO7UZlNqe487 aBBAViGArGs9CI0P5vRlonZykJSnpt4eLduYCUjvgbHEADckdGCupvzwxR09YSy9zpmR WXycuIGsUtEBcmkqpe3AesytULIE65ZUthlC1/c7WEX08+l3nqgf+G7GnooWulDoTeQl LeRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dCWQ8z5l; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h12-v6si21215637pfd.253.2018.05.24.03.57.12; Thu, 24 May 2018 03:57:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dCWQ8z5l; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032712AbeEXK41 (ORCPT + 99 others); Thu, 24 May 2018 06:56:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:36340 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030321AbeEXJ4a (ORCPT ); Thu, 24 May 2018 05:56:30 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 975032089F; Thu, 24 May 2018 09:56:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155790; bh=+EXyaqlgBt+elYjNHNjTiBK9/7VQVqjD/VI51uFfB6E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dCWQ8z5lYKJRnp8J8rQhZN7oCpdBrAcNoKk6Z2b2ZAilXKAnOiVU3idcJuXLqITZw 05uqMW//HAlv/+P5flrFlgnEfZNARvxO+zdAfqUTt3IOesuOLbVp7xLTlLhW6FPKgq PSubD4R2THlr95Aj4F8HTlOvFoOiejhV8f7oDs6Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mathias Nyman , Sasha Levin Subject: [PATCH 4.14 084/165] xhci: Show what USB release number the xHC supports from protocol capablity Date: Thu, 24 May 2018 11:38:10 +0200 Message-Id: <20180524093625.416175685@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093621.979359379@linuxfoundation.org> References: <20180524093621.979359379@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mathias Nyman [ Upstream commit 0ee78c101425aae681c631ba59c6ac7f44b1d83a ] xhci driver displays the supported xHC USB revision in a message during driver load: "Host supports USB 3.1 Enhanced SuperSpeed" Get the USB minor revision number from the xhci protocol capability. This will show the correct supported revisions for new USB 3.2 and later hosts Don't rely on the SBRN (serial bus revision number) register, it's often showing 0x30 (USB3.0) for hosts that support USB 3.1 Signed-off-by: Mathias Nyman Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/xhci.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -4764,6 +4764,7 @@ int xhci_gen_setup(struct usb_hcd *hcd, * quirks */ struct device *dev = hcd->self.sysdev; + unsigned int minor_rev; int retval; /* Accept arbitrarily long scatter-gather lists */ @@ -4791,12 +4792,19 @@ int xhci_gen_setup(struct usb_hcd *hcd, */ hcd->has_tt = 1; } else { - /* Some 3.1 hosts return sbrn 0x30, can't rely on sbrn alone */ - if (xhci->sbrn == 0x31 || xhci->usb3_rhub.min_rev >= 1) { - xhci_info(xhci, "Host supports USB 3.1 Enhanced SuperSpeed\n"); + /* + * Some 3.1 hosts return sbrn 0x30, use xhci supported protocol + * minor revision instead of sbrn + */ + minor_rev = xhci->usb3_rhub.min_rev; + if (minor_rev) { hcd->speed = HCD_USB31; hcd->self.root_hub->speed = USB_SPEED_SUPER_PLUS; } + xhci_info(xhci, "Host supports USB 3.%x %s SuperSpeed\n", + minor_rev, + minor_rev ? "Enhanced" : ""); + /* xHCI private pointer was set in xhci_pci_probe for the second * registered roothub. */