Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 May 2026 15:27:02 +0000
From:      ShengYi Hung <aokblast@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc:        Gisle Nes <gisle@gisle.net>
Subject:   git: abd66d6418b6 - stable/14 - pci: use uint32_t for eecp
Message-ID:  <6a19b046.30e45.78f4d929@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/14 has been updated by aokblast:

URL: https://cgit.FreeBSD.org/src/commit/?id=abd66d6418b60e17bcf3a822a1800d0a5dc2bcd4

commit abd66d6418b60e17bcf3a822a1800d0a5dc2bcd4
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:25:00 +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 0a1ea29180dd..58fdbe1703f1 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -3727,7 +3727,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;


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a19b046.30e45.78f4d929>