All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Thinh.Nguyen@synopsys.com, linux-usb@vger.kernel.org,
	chenqiwu <chenqiwu@xiaomi.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	Rikard Falkeborn <rikard.falkeborn@gmail.com>,
	Zeng Tao <prime.zeng@hisilicon.com>
Subject: [RFC PATCH 4/8] usb: core: sysfs: Check for SSP rate in speed attr
Date: Mon, 01 Feb 2021 19:42:39 -0800	[thread overview]
Message-ID: <6e416aa293fb10160767f0086daa842739c0e7de.1612237179.git.Thinh.Nguyen@synopsys.com> (raw)
In-Reply-To: <cover.1612237179.git.Thinh.Nguyen@synopsys.com>

Check for usb_device->ssp_rate to output the signaling rate for genXxY.

Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
---
 drivers/usb/core/sysfs.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c
index d85699bee671..5a168ba9fc51 100644
--- a/drivers/usb/core/sysfs.c
+++ b/drivers/usb/core/sysfs.c
@@ -167,7 +167,10 @@ static ssize_t speed_show(struct device *dev, struct device_attribute *attr,
 		speed = "5000";
 		break;
 	case USB_SPEED_SUPER_PLUS:
-		speed = "10000";
+		if (udev->ssp_rate == USB_SSP_GEN_2x2)
+			speed = "20000";
+		else
+			speed = "10000";
 		break;
 	default:
 		speed = "unknown";
-- 
2.28.0


  parent reply	other threads:[~2021-02-02  3:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02  3:42 [RFC PATCH 0/8] usb: Check for genXxY on host Thinh Nguyen
2021-02-02  3:42 ` [RFC PATCH 1/8] usb: core: Track SuperSpeed Plus GenXxY Thinh Nguyen
     [not found]   ` <3b486e82-fa5d-f39e-069e-7bae4424cb86@embeddedor.com>
2021-02-02  3:58     ` Thinh Nguyen
     [not found]       ` <e2d540a1-6bd5-da39-fa79-5e69f2279a5a@embeddedor.com>
2021-02-02  4:12         ` Thinh Nguyen
2021-02-02  3:42 ` [RFC PATCH 2/8] usb: core: hub: Remove port_speed_is_ssp() Thinh Nguyen
2021-02-02  3:42 ` [RFC PATCH 3/8] usb: core: hub: Print speed name based on ssp rate Thinh Nguyen
2021-02-02  3:42 ` Thinh Nguyen [this message]
2021-02-02  3:42 ` [RFC PATCH 5/8] usb: xhci: Init root hub SSP rate Thinh Nguyen
2021-02-02  3:42 ` [RFC PATCH 6/8] usb: xhci: Fix port minor revision Thinh Nguyen
2021-02-02  9:04   ` Sergei Shtylyov
2021-02-03  1:16     ` Thinh Nguyen
2021-02-04 10:16       ` David Laight
2021-02-05  1:31         ` Thinh Nguyen
2021-02-05  3:30           ` Thinh Nguyen
2021-02-02  3:42 ` [RFC PATCH 7/8] usb: xhci: Rewrite xhci_create_usb3_bos_desc() Thinh Nguyen
2021-02-02 12:26   ` Mathias Nyman
2021-02-03  1:20     ` Thinh Nguyen
2021-02-02  3:43 ` [RFC PATCH 8/8] usb: xhci: Remove unused function Thinh Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6e416aa293fb10160767f0086daa842739c0e7de.1612237179.git.Thinh.Nguyen@synopsys.com \
    --to=thinh.nguyen@synopsys.com \
    --cc=chenqiwu@xiaomi.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=prime.zeng@hisilicon.com \
    --cc=rikard.falkeborn@gmail.com \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.