lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230818153509.38814-1-18500469033@163.com>
Date:   Fri, 18 Aug 2023 23:35:09 +0800
From:   Dingyan Li <18500469033@....com>
To:     gregkh@...uxfoundation.org, stern@...land.harvard.edu
Cc:     linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] USB: add new speed value to USB debugfs

Current max speed supported in USB debugfs is 10000.
Since USB 3.2 GEN_2x2 has reached 20000, it's better
to add it. The idea is borrowed from USB sysfs, with
a combination of USB_SPEED_SUPER_PLUS and
USB_SSP_GEN_2x2, the actual speed should be 20000.

Signed-off-by: Dingyan Li <18500469033@....com>
---
 drivers/usb/core/devices.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c
index a247da73f34d..78ebcb657dce 100644
--- a/drivers/usb/core/devices.c
+++ b/drivers/usb/core/devices.c
@@ -429,7 +429,11 @@ static ssize_t usb_device_dump(char __user **buffer, size_t *nbytes,
 	case USB_SPEED_SUPER:
 		speed = "5000"; break;
 	case USB_SPEED_SUPER_PLUS:
-		speed = "10000"; break;
+		if (usbdev->ssp_rate == USB_SSP_GEN_2x2)
+			speed = "20000";
+		else
+			speed = "10000";
+		break;
 	default:
 		speed = "??";
 	}
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ