git: ff5d0d7db769 - stable/15 - pci: use uint32_t for eecp
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 29 May 2026 15:20:39 UTC
The branch stable/15 has been updated by aokblast:
URL: https://cgit.FreeBSD.org/src/commit/?id=ff5d0d7db769b7a32921ac650c0bae24afa333f7
commit ff5d0d7db769b7a32921ac650c0bae24afa333f7
Author: Gisle Nes <gisle@gisle.net>
AuthorDate: 2026-04-07 16:48:15 +0000
Commit: ShengYi Hung <aokblast@FreeBSD.org>
CommitDate: 2026-05-29 15:19:49 +0000
pci: use uint32_t for eecp
eecp holds the extended capability offset. If that offset is larger
than 0xff, storing it in uint8_t truncates it, which can make the
early EHCI/XHCI capability walk read the wrong location and loop during
boot.
Seen on AMD device 1022:151e, where HCCPARAMS1 = 0x0118ffc5 and the
first xHCI extended capability offset is 0x460. Widen eecp to uint32_t
in xhci_early_takeover(), matching xhci_pci_take_controller().
Signed-off-by: Gisle Nes <gisle@gisle.net>
Reviewed by: zlei, aokblast
MFC after: 3 days
Pull Request: https://github.com/freebsd/freebsd-src/pull/2127
Closes: https://github.com/freebsd/freebsd-src/pull/2127
(cherry picked from commit 555ffd9022de0c497881bafc413e3e1d05af10d4)
---
sys/dev/pci/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 9a1dbc5f66ed..9e4b64f03171 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -3756,7 +3756,7 @@ xhci_early_takeover(device_t self)
struct resource *res;
uint32_t cparams;
uint32_t eec;
- uint8_t eecp;
+ uint32_t eecp;
uint8_t bios_sem;
uint8_t offs;
int rid;