Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1946488imm; Thu, 24 May 2018 03:24:24 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoXydb61eIBup9cMVny2yIhDQkAppJO1Y/DZGHBrdYqvi+ufw8p7OWL21pABOm1rCZ06VP9 X-Received: by 2002:a17:902:bb92:: with SMTP id m18-v6mr6843303pls.46.1527157464862; Thu, 24 May 2018 03:24:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527157464; cv=none; d=google.com; s=arc-20160816; b=htDTJq7DrGGgfV9ERDc4bFGJgCve+m9KUYj82QVRwjIWvcPw8DbMLulxdTervt0pWl DBFjVcT2b1MZHf6f4jbVJcSZ6NGGK1gNZrxOsnCPVwLxkWljhw+mgfuYWGGZTj2PrQMP rSVmKOagsG8WMm4dY7U7zHlAHLlwq8E6Di6eM9bC/8hpqJiqwBDZkukTbyZZhf8b+SfR eIt4hTtPQZN+ssrjBUbU1cDzQ47cxvMHVA+BnGSlRHptgy2JvoE7G118SNhoVg3YnQeI VUgboC22BzGynALA2eKE/sa3J93P9Er3Dsb5NZtYYvu8BTcWUml6k2HF1iP2f8AsraBH TFQw== 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=0mXDSZBTtYOmqpKIXj+v392COcqYWwF0ShjztECMpuY=; b=ol89lb58GdTwktJLS/uusmud460aN3GjN3duS+/FMDqxtepeLNdUrJG4fjlw3hbXJA bBTce4+dzFFOCbOvs1Bgusa9CETOBxaIIZ/YA8BmUFMfjyhinD6XOrn6YPaA5SoCZsKk lAyvzVjAv7vK/OdnMiMeO790c4JRQ2i3QfJ2FOtDmeOZH//u5N8AEn6Ne1A9ctDt9s4I l/+A7SnglMeL5i7OVJ5a+g5KoPeqjkKLZapx5L85Pfw+CgdFz05FYk13pbl7jSW67ozU 4Rpcnw8Qn7XGtWWuNt9utRoBcxo/tp5n7Qf1L+Jx+xRS7ggqNGKbim18E58OgfjORq9w /AXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dJ/rxFyz; 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 z14-v6si3128512pgz.284.2018.05.24.03.24.10; Thu, 24 May 2018 03:24:24 -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=dJ/rxFyz; 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 S1031962AbeEXKXb (ORCPT + 99 others); Thu, 24 May 2018 06:23:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:50218 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030748AbeEXKCi (ORCPT ); Thu, 24 May 2018 06:02:38 -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 909E520870; Thu, 24 May 2018 10:02:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527156158; bh=7jBvEK/LRouwCGENHdzwVcBgrJK8eQUDtPNDuZUZcF4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dJ/rxFyzTwmjEF/lsnqPXNvO+zX7Ge2eACCx4u9J66m9Ggpf4XdaTK5SZmuhLKzoi s1f5qgnq0VuQx1JGiXnFTeH2HO1+ecQ/QXv+GwXaDxPNC+ALbhmbfkKQO+HF6Q7NV+ v2mXX54cwOjB9s3wjqQlrNUKCRaLYCwoHI62UKZg= 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.16 084/161] xhci: Show what USB release number the xHC supports from protocol capablity Date: Thu, 24 May 2018 11:38:29 +0200 Message-Id: <20180524093028.551719646@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093018.331893860@linuxfoundation.org> References: <20180524093018.331893860@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.16-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: Greg Kroah-Hartman 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 @@ -4769,6 +4769,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 */ @@ -4796,12 +4797,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. */