git: 1fe552b036a5 - main - usb: Add extended port status struct
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 02 Nov 2026 03:02:49 UTC
The branch main has been updated by aokblast:
URL: https://cgit.FreeBSD.org/src/commit/?id=1fe552b036a52e13cb26c32265c418f355300360
commit 1fe552b036a52e13cb26c32265c418f355300360
Author: ShengYi Hung <aokblast@FreeBSD.org>
AuthorDate: 2026-05-22 16:31:20 +0000
Commit: ShengYi Hung <aokblast@FreeBSD.org>
CommitDate: 2026-11-02 03:02:11 +0000
usb: Add extended port status struct
Extended Port Status reports the speed and lane count of SS and SSP
links.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57200
---
sys/dev/usb/usb.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/sys/dev/usb/usb.h b/sys/dev/usb/usb.h
index 8ac2445c3c1f..8eb36a24bbcd 100644
--- a/sys/dev/usb/usb.h
+++ b/sys/dev/usb/usb.h
@@ -752,6 +752,16 @@ struct usb_port_status {
} __packed;
typedef struct usb_port_status usb_port_status_t;
+struct usb_ext_status {
+ struct usb_port_status ps;
+ uDWord dwExtPortStatus;
+#define UDS_RX_SUBLINK_SPEED_ID_BITS(x) ((x) & 0xF)
+#define UDS_TX_SUBLINK_SPEED_ID_BITS(x) (((x) >> 4) & 0xF)
+#define UDS_RX_SUBLINK_LANE_COUNT_BITS(x) (((x) >> 8) & 0xF)
+#define UDS_TX_SUBLINK_LANE_COUNT_BITS(x) (((x) >> 12) & 0xF)
+} __packed;
+typedef struct usb_ext_status usb_ext_status_t;
+
/*
* The "USB_SPEED" macros defines all the supported USB speeds.
*/