Files
lbmk/config/grub/xhci_nvme/patches/0016-xhci-fix-port-indexing.patch
T
Leah Rowe d22f7f9633 update grub to 2.14
This brings these extra changes:

* eaa3b8f0f Bump version to 2.15
* d38d6a1a9 Release 2.14
* 35bfd6c47 build: Add grub-core/tests/crypto_cipher_mode_vectors.h file to EXTRA_DIST
* ac042f3f5 configure: Print a more helpful error if autoconf-archive is not installed
* e37d02158 kern/ieee1275/openfw: Add a check for invalid partition number
* f94eae0f8 grub-mkimage: Do not generate empty SBAT metadata
* 1aa0dd0c0 configure: Defer check for -mcmodel=large until PIC/PIE checks are done
* ff1edd975 util/grub-mkimagexx: Stop generating unaligned appended signatures
* 51ebc6f67 tests: Add functional tests for ecb/cbc helpers
* caaf50b9a osdep/aros/hostdisk: Fix use-after-free bug during MsgPort deletion
* 18f08826f kern/efi/sb: Enable loading GRUB_FILE_TYPE_CRYPTODISK_ENCRYPTION_KEY and GRUB_FILE_TYPE_CRYPTODISK_DETACHED_HEADER

NOTE: This patch was reversed:

* ac042f3f5 configure: Print a more helpful error if autoconf-archive is not installed

Because it quite unhelpfully broke the build.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-01-19 16:03:51 +00:00

44 lines
1.6 KiB
Diff

From 3db55ea63bc2c4fb41f7489a77a42c821256bbf5 Mon Sep 17 00:00:00 2001
From: Sven Anderson <sven@anderson.de>
Date: Mon, 13 Jan 2025 19:51:41 +0100
Subject: [PATCH 16/21] xhci: fix port indexing
---
grub-core/bus/usb/xhci.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/grub-core/bus/usb/xhci.c b/grub-core/bus/usb/xhci.c
index f4591ffb5..dc89b9619 100644
--- a/grub-core/bus/usb/xhci.c
+++ b/grub-core/bus/usb/xhci.c
@@ -2250,7 +2250,7 @@ grub_xhci_detect_dev (grub_usb_controller_t dev, int port, int *changed)
*changed = 0;
grub_dprintf("xhci", "%s: dev=%p USB%d_%d port %d\n", __func__, dev,
- x->psids[port-1].major, x->psids[port-1].minor, port);
+ x->psids[port].major, x->psids[port].minor, port);
/* On shutdown advertise all ports as disconnected. This will trigger
* a gracefull detatch. */
@@ -2285,13 +2285,13 @@ grub_xhci_detect_dev (grub_usb_controller_t dev, int port, int *changed)
if (!(portsc & GRUB_XHCI_PORTSC_CCS))
return GRUB_USB_SPEED_NONE;
- for (grub_uint8_t i = 0; i < 16 && x->psids[port-1].psids[i].id > 0; i++)
+ for (grub_uint8_t i = 0; i < 16 && x->psids[port].psids[i].id > 0; i++)
{
- if (x->psids[port-1].psids[i].id == speed)
+ if (x->psids[port].psids[i].id == speed)
{
grub_dprintf("xhci", "%s: grub_usb_speed = %d\n", __func__,
- x->psids[port-1].psids[i].grub_usb_speed );
- return x->psids[port-1].psids[i].grub_usb_speed;
+ x->psids[port].psids[i].grub_usb_speed );
+ return x->psids[port].psids[i].grub_usb_speed;
}
}
--
2.47.3