Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Dec 2025 10:18:55 +0000
From:      Tom Jones <thj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 234351604252 - main - xhci: Correct name of HCCPARAMS Register
Message-ID:  <6932b18f.35dd2.7be6b72d@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by thj:

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

commit 234351604252cec485992cb7f5e76aa98c0a4380
Author:     Tom Jones <thj@FreeBSD.org>
AuthorDate: 2025-12-05 10:07:46 +0000
Commit:     Tom Jones <thj@FreeBSD.org>
CommitDate: 2025-12-05 10:17:45 +0000

    xhci: Correct name of HCCPARAMS Register
    
    On inital import the name of HCCPARAMS1 was misnamed as HCSPARAMS0.
    HCCPARAMS1 is defined in section 5.3.6 of xHCI Specification 1.2b (April
    2023).
    
    Reviewed by:    adrian
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D53895
---
 sys/dev/pci/pci.c                 | 2 +-
 sys/dev/usb/controller/xhci.c     | 6 +++---
 sys/dev/usb/controller/xhci_pci.c | 2 +-
 sys/dev/usb/controller/xhcireg.h  | 2 +-
 usr.sbin/bhyve/pci_xhci.c         | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index cde98cb62cef..ac6c9259b135 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -3764,7 +3764,7 @@ xhci_early_takeover(device_t self)
 	if (res == NULL)
 		return;
 
-	cparams = bus_read_4(res, XHCI_HCSPARAMS0);
+	cparams = bus_read_4(res, XHCI_HCCPARAMS1);
 
 	eec = -1;
 
diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c
index 788b2b718062..3dad0985b39d 100644
--- a/sys/dev/usb/controller/xhci.c
+++ b/sys/dev/usb/controller/xhci.c
@@ -549,7 +549,7 @@ xhci_init(struct xhci_softc *sc, device_t self, uint8_t dma32)
 		return (ENXIO);
 	}
 
-	temp = XREAD4(sc, capa, XHCI_HCSPARAMS0);
+	temp = XREAD4(sc, capa, XHCI_HCCPARAMS1);
 
 	DPRINTF("HCS0 = 0x%08x\n", temp);
 
@@ -665,7 +665,7 @@ xhci_get_xecp(struct xhci_softc *sc)
 	uint32_t eecp;
 	bool first = true;
 
-	hccp1 = XREAD4(sc, capa, XHCI_HCSPARAMS0);
+	hccp1 = XREAD4(sc, capa, XHCI_HCCPARAMS1);
 
 	if (XHCI_HCS0_XECP(hccp1) == 0)  {
 		device_printf(sc->sc_bus.parent,
@@ -3511,7 +3511,7 @@ xhci_roothub_exec(struct usb_device *udev,
 			goto done;
 		}
 
-		v = XREAD4(sc, capa, XHCI_HCSPARAMS0);
+		v = XREAD4(sc, capa, XHCI_HCCPARAMS1);
 
 		sc->sc_hub_desc.hubd = xhci_hubd;
 
diff --git a/sys/dev/usb/controller/xhci_pci.c b/sys/dev/usb/controller/xhci_pci.c
index e5424163baa6..d6691b616064 100644
--- a/sys/dev/usb/controller/xhci_pci.c
+++ b/sys/dev/usb/controller/xhci_pci.c
@@ -524,7 +524,7 @@ xhci_pci_take_controller(device_t self)
 	uint16_t to;
 	uint8_t bios_sem;
 
-	cparams = XREAD4(sc, capa, XHCI_HCSPARAMS0);
+	cparams = XREAD4(sc, capa, XHCI_HCCPARAMS1);
 
 	eec = -1;
 
diff --git a/sys/dev/usb/controller/xhcireg.h b/sys/dev/usb/controller/xhcireg.h
index 821897155544..3e3ad278bcba 100644
--- a/sys/dev/usb/controller/xhcireg.h
+++ b/sys/dev/usb/controller/xhcireg.h
@@ -58,7 +58,7 @@
 #define	XHCI_HCSPARAMS3		0x0C	/* RO structural parameters 3 */
 #define	XHCI_HCS3_U1_DEL(x)	((x) & 0xFF)
 #define	XHCI_HCS3_U2_DEL(x)	(((x) >> 16) & 0xFFFF)
-#define	XHCI_HCSPARAMS0		0x10	/* RO capability parameters */
+#define	XHCI_HCCPARAMS1		0x10	/* RO capability parameters */
 #define	XHCI_HCS0_AC64(x)	((x) & 0x1)		/* 64-bit capable */
 #define	XHCI_HCS0_BNC(x)	(((x) >> 1) & 0x1)	/* BW negotiation */
 #define	XHCI_HCS0_CSZ(x)	(((x) >> 2) & 0x1)	/* context size */
diff --git a/usr.sbin/bhyve/pci_xhci.c b/usr.sbin/bhyve/pci_xhci.c
index ff12e40359e2..b3c9f387cca4 100644
--- a/usr.sbin/bhyve/pci_xhci.c
+++ b/usr.sbin/bhyve/pci_xhci.c
@@ -2354,7 +2354,7 @@ pci_xhci_hostcap_read(struct pci_xhci_softc *sc, uint64_t offset)
 		value = sc->hcsparams3;
 		break;
 
-	case XHCI_HCSPARAMS0:	/* 0x10 */
+	case XHCI_HCCPARAMS1:	/* 0x10 */
 		value = sc->hccparams1;
 		break;
 


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6932b18f.35dd2.7be6b72d>