summaryrefslogtreecommitdiff
path: root/config/grub/xhci/patches/0023-xhci-workaround-z790-non-root-hub-speed-detection.patch
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-01-14 20:24:00 +0000
committerLeah Rowe <leah@libreboot.org>2025-01-14 20:34:16 +0000
commit64d3c7b5150c8556361cede3d12b4fd6a6ff546e (patch)
tree4c5263f5c10aa495bbe475ae3d7a3cce882d5f61 /config/grub/xhci/patches/0023-xhci-workaround-z790-non-root-hub-speed-detection.patch
parent7bf0d4c2ed5a6efe0a09cbd7ea75962e7a618095 (diff)
grub/xhci: Add xHCI non-root-hub fixes from NitrokeyHEADmaster
See: https://github.com/Nitrokey/nethsm-grub/commits/nethsm-z790?since=2025-01-13&until=2025-01-13 And more generally, see branch: https://github.com/Nitrokey/nethsm-grub/commits/nethsm-z790 This brings in a few minor fixes, and also a not-so-minor fix: Add TT (transaction translation) handling for non-SuperSpeed devices in xhci.c More generally, this patchset will improve non-root hub support in the xHCI code. There is also a patch to work around a quirk on the MSI Z790-P mainboard, which I'm planning to add to Libreboot at a later date. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'config/grub/xhci/patches/0023-xhci-workaround-z790-non-root-hub-speed-detection.patch')
-rw-r--r--config/grub/xhci/patches/0023-xhci-workaround-z790-non-root-hub-speed-detection.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/config/grub/xhci/patches/0023-xhci-workaround-z790-non-root-hub-speed-detection.patch b/config/grub/xhci/patches/0023-xhci-workaround-z790-non-root-hub-speed-detection.patch
new file mode 100644
index 00000000..0181f3bd
--- /dev/null
+++ b/config/grub/xhci/patches/0023-xhci-workaround-z790-non-root-hub-speed-detection.patch
@@ -0,0 +1,28 @@
+From b033ef3b4b2384df4165ae7829155cafd4ee3488 Mon Sep 17 00:00:00 2001
+From: Sven Anderson <sven@anderson.de>
+Date: Mon, 13 Jan 2025 19:55:15 +0100
+Subject: [PATCH 23/26] xhci: workaround z790 non-root-hub speed detection
+
+---
+ grub-core/bus/usb/xhci.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/grub-core/bus/usb/xhci.c b/grub-core/bus/usb/xhci.c
+index dc89b9619..d13a7c39d 100644
+--- a/grub-core/bus/usb/xhci.c
++++ b/grub-core/bus/usb/xhci.c
+@@ -2285,6 +2285,11 @@ grub_xhci_detect_dev (grub_usb_controller_t dev, int port, int *changed)
+ if (!(portsc & GRUB_XHCI_PORTSC_CCS))
+ return GRUB_USB_SPEED_NONE;
+
++ if (port == 4 || port == 12 && speed < XHCI_USB_HIGHSPEED) { // inital hub speed detection on Z790 is too low
++ grub_dprintf("xhci", "%s: setting internal hub speed to high\n", __func__);
++ return GRUB_USB_SPEED_HIGH;
++ }
++
+ for (grub_uint8_t i = 0; i < 16 && x->psids[port].psids[i].id > 0; i++)
+ {
+ if (x->psids[port].psids[i].id == speed)
+--
+2.39.5
+