Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177295112
D61278.1794104433.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D61278.1794104433.diff
View Options
diff --git a/sys/dev/usb/controller/xhci.h b/sys/dev/usb/controller/xhci.h
--- a/sys/dev/usb/controller/xhci.h
+++ b/sys/dev/usb/controller/xhci.h
@@ -562,6 +562,8 @@
uint8_t sc_noslot;
/* Enhanced SuperSpeed speed IDs of the controller, see XHCI_PSIV_BIT */
uint16_t sc_ss_psiv;
+ /* xHCI interface version, see XHCI_HCIVERSION_* */
+ uint16_t sc_hcversion;
/* number of ports on root HUB */
uint8_t sc_noport;
/* root HUB device configuration */
diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c
--- a/sys/dev/usb/controller/xhci.c
+++ b/sys/dev/usb/controller/xhci.c
@@ -574,7 +574,9 @@
DPRINTF("RUNTIMEOFFSET=0x%x\n", sc->sc_runt_off);
DPRINTF("DOOROFFSET=0x%x\n", sc->sc_door_off);
- DPRINTF("xHCI version = 0x%04x\n", XREAD2(sc, capa, XHCI_HCIVERSION));
+ sc->sc_hcversion = XREAD2(sc, capa, XHCI_HCIVERSION);
+
+ DPRINTF("xHCI version = 0x%04x\n", sc->sc_hcversion);
if (!(XREAD4(sc, oper, XHCI_PAGESIZE) & XHCI_PAGESIZE_4K)) {
device_printf(sc->sc_bus.parent, "Controller does "
@@ -713,7 +715,8 @@
* documented in Table 7.2 of eXtensible Host Controller Interface for
* Universal Serial Bus (xHCI) Rev 1.2b 2023.
*/
- device_printf(sc->sc_bus.parent, "xECP capabilities <");
+ device_printf(sc->sc_bus.parent, "xHCI %u.%u, xECP capabilities <",
+ sc->sc_hcversion >> 8, (sc->sc_hcversion >> 4) & 0xF);
eec = -1;
for (eecp = XHCI_HCS0_XECP(hccp1) << 2;
@@ -2764,6 +2767,10 @@
struct usb_device *adev = udev;
struct usb_device *hubdev = udev->parent_hub;
+ /* These fields have no Enhanced SuperSpeed meaning before xHCI 1.2. */
+ if (sc->sc_hcversion < XHCI_HCIVERSION_1_2)
+ return (NULL);
+
if (udev->speed >= xhci_ss_highest(sc))
return (NULL);
diff --git a/sys/dev/usb/controller/xhcireg.h b/sys/dev/usb/controller/xhcireg.h
--- a/sys/dev/usb/controller/xhcireg.h
+++ b/sys/dev/usb/controller/xhcireg.h
@@ -46,6 +46,8 @@
#define XHCI_HCIVERSION 0x02 /* RO Interface version number */
#define XHCI_HCIVERSION_0_9 0x0090 /* xHCI version 0.9 */
#define XHCI_HCIVERSION_1_0 0x0100 /* xHCI version 1.0 */
+#define XHCI_HCIVERSION_1_1 0x0110 /* xHCI version 1.1 */
+#define XHCI_HCIVERSION_1_2 0x0120 /* xHCI version 1.2 */
#define XHCI_HCSPARAMS1 0x04 /* RO structural parameters 1 */
#define XHCI_HCS1_DEVSLOT_MAX(x)((x) & 0xFF)
#define XHCI_HCS1_IRQ_MAX(x) (((x) >> 8) & 0x3FF)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 8, 2:20 AM (6 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41562635
Default Alt Text
D61278.1794104433.diff (2 KB)
Attached To
Mode
D61278: xhci: only set the slot context parent hub fields on xHCI 1.2
Attached
Detach File
Event Timeline