From patchwork Thu Feb 4 04:10:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thinh Nguyen X-Patchwork-Id: 12066281 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78C70C433E0 for ; Thu, 4 Feb 2021 04:11:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 37A7964F50 for ; Thu, 4 Feb 2021 04:11:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231712AbhBDELw (ORCPT ); Wed, 3 Feb 2021 23:11:52 -0500 Received: from smtprelay-out1.synopsys.com ([149.117.73.133]:43664 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231499AbhBDELv (ORCPT ); Wed, 3 Feb 2021 23:11:51 -0500 Received: from mailhost.synopsys.com (sv2-mailhost2.synopsys.com [10.205.2.134]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 6F1CB40871; Thu, 4 Feb 2021 04:10:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1612411851; bh=AD9hgEk+PcQQoc0KnNzGzI+2X7CeXR3b0ecWqglm19E=; h=Date:In-Reply-To:References:From:Subject:To:From; b=W8bpAXPP+A4G9CLmETwou+Rk1siGJuL8aaaaUvy3jCye2TG34SV4qAfvhCqgJ3fvu VXg18SC1TbSom7f5FeACc5kvjrOJzw+g+52JVASKib5/5TL1t52c9s0QnFUJ8uEpyZ 81DuQYcMikYBUztRIhNKPjLo2KsBc6/HqCusMohBQ1BSAF9FPsM1eqNgtJDnFXdRBn 2+Kz4ckC4vYeT+OMOLveffsVKh6tH6Uaz8zcg+cx7faYqyBUSpcD484d78kelZcZqY iCG8ux1+QWeAF8IGcxTcasQ0S0c7ZDrzvqZNe7LShDsJ27KIbHG4LDgcdyv6+Jq954 1E1BSOvNnXAUA== Received: from te-lab16 (unknown [10.10.52.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mailhost.synopsys.com (Postfix) with ESMTPSA id 28B91A0099; Thu, 4 Feb 2021 04:10:48 +0000 (UTC) Received: by te-lab16 (sSMTP sendmail emulation); Wed, 03 Feb 2021 20:10:48 -0800 Date: Wed, 03 Feb 2021 20:10:48 -0800 Message-Id: In-Reply-To: References: X-SNPS-Relay: synopsys.com From: Thinh Nguyen Subject: [PATCH v2 3/8] usb: core: hub: Print speed name based on ssp rate To: Greg Kroah-Hartman , Thinh.Nguyen@synopsys.com, linux-usb@vger.kernel.org, Alan Stern , Eugeniu Rosca , Hardik Gajjar , "Gustavo A. R. Silva" , Oliver Neukum Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Check for usb_device->ssp_rate to print the SuperSpeed Plus signaling rate generation and lane count. Signed-off-by: Thinh Nguyen --- Changes in v2: - None drivers/usb/core/hub.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 823470607d58..6dc4e7385e75 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -4830,9 +4830,13 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, "%s SuperSpeed%s%s USB device number %d using %s\n", (udev->config) ? "reset" : "new", (udev->speed == USB_SPEED_SUPER_PLUS) ? - "Plus Gen 2" : " Gen 1", - (udev->rx_lanes == 2 && udev->tx_lanes == 2) ? - "x2" : "", + " Plus" : "", + (udev->ssp_rate == USB_SSP_GEN_2x2) ? + " gen2x2" : + (udev->ssp_rate == USB_SSP_GEN_2x1) ? + " gen2x1" : + (udev->ssp_rate == USB_SSP_GEN_1x2) ? + " gen1x2" : "", devnum, driver_name); }