From nobody Sat Nov 07 09:56:21 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jMBJk1FVCz6ylfk for ; Sat, 07 Nov 2026 09:56:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jMBJk0WKrz4dgs for ; Sat, 07 Nov 2026 09:56:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794045382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nz+6kzV9wYqqlkeXM9oRHGlO9wNcze9XBdLiZYBWe7s=; b=VhE6f7rwFHBN2jNLdRA30QLLSfSLK7UhDmxt7CJAhMLVVCxnkjG8VoowH6UaMLySBn57Kd P+7P6KiK7wGwzyxPdRXHPDbFHvZ8rUlec8OUg5IFXq6zV99jSx0YoEqximKTBKASGlSYK9 8we8NUNMsxKyJyWfS0xwt8mJIVcjf0iAlm8bkL51ieSD0fOQLIt/zg2PcOpXs20JES+dxa tENzCiOIGAq3ARtoz6evuPa4K3bJb7xzvsR+EGHfoioYsdWiBpWGRVzz9jSncwP7vCeJLd /Js4z2gVS4PUsjPxNVDDOAOamiBgZuLBqhf2MuDl1GfcxgbUd5WLuJHLDyKkpw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794045382; b=QB2uLDF6fPH8tI3UqJ9KduGAuTonCSfNnFgn9xEXrNvMvh2i5g+ymofH4XE162N3a/92RR sLOm0F1/9J/qpVZYTSf6nHrC0h++CFV8Lo1yebtDEcjBWU3Upbsd0+eSvXwkpuT/4cMQ2G YlY38eDFRcHUogwbwVHSAD/1MATM1PVk8fOB5vD0J6n7yxL5J8WK3I1H1b/hBsqYud29Ck JhdPcK7XerOak/805hdxBNYnQ/BFV15AabpOxQYW0Z5artokt47k3FI7KKNT/5LfyQ2WDk ov0ugW1COjpee8MWHx9l6AdE7/KqsFPjFt4BaBf+MkQygeYT9CmL2NNhZvIpUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794045382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nz+6kzV9wYqqlkeXM9oRHGlO9wNcze9XBdLiZYBWe7s=; b=sh5mfdZ8a616n4ASn3wIGeID3t2qRciefJ+XkoqEiJtAKibP46hc/pLUiC6mr2bhVrgoiC 9KoFH6mf11FwlpYc5xhDJaCWm1xd6UwwbiaaS301gmhee+S0nuE9jG37GymOwEMCfnO/lw UO/bhSZHq+1DpSR7Iw+In9gxrM9LIk83+e4KSjQeQ6Y9eA55o4P6e8yQo8uZStkvhXp8D6 kXHZ5vWBpTnAR0QBdp4kL1tI9QzDTgUb+tVrRQNMDzanC77YJn/uKl97PxYbNsIRVIaTfA COW14nsFJiQmGo3TTCWa+xppABopeX5ZBk5Yf1TUOEVNguFTS5nEBi6QZNKHFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jMBJj71HrzHtg for ; Sat, 07 Nov 2026 09:56:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3746b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 07 Nov 2026 09:56:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Abdelkader Boudih Subject: git: 6d5c80aee3ae - main - xhci: only set the slot context parent hub fields on xHCI 1.2 List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: seuros X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d5c80aee3ae8b16a0b08b25852430fb076fed37 Auto-Submitted: auto-generated Date: Sat, 07 Nov 2026 09:56:21 +0000 Message-Id: <6aeef5c5.3746b.687ece7c@gitrepo.freebsd.org> The branch main has been updated by seuros: URL: https://cgit.FreeBSD.org/src/commit/?id=6d5c80aee3ae8b16a0b08b25852430fb076fed37 commit 6d5c80aee3ae8b16a0b08b25852430fb076fed37 Author: Abdelkader Boudih AuthorDate: 2026-11-07 09:56:13 +0000 Commit: Abdelkader Boudih CommitDate: 2026-11-07 09:56:13 +0000 xhci: only set the slot context parent hub fields on xHCI 1.2 The Enhanced SuperSpeed meaning of the slot context parent hub slot ID and port number fields was introduced in xHCI 1.2. Controllers built to an earlier revision define them only for a Low- or Full-speed device behind a High-speed hub. A SuperSpeed device behind a USB 3.2 hub on an Intel Alpine Ridge controller, an xHCI 1.1 part, stops responding to Address Device and loops in uhub_reattach_port until the port is disabled. Fixes: 20b19982545e ("usb: support SSP and SSPx2 xHCI") Reviewed by: aokblast, ngie, adrian Differential Revision: https://reviews.freebsd.org/D61278 --- sys/dev/usb/controller/xhci.c | 11 +++++++++-- sys/dev/usb/controller/xhci.h | 2 ++ sys/dev/usb/controller/xhcireg.h | 2 ++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c index 3f3ab299647b..894cd159c281 100644 --- a/sys/dev/usb/controller/xhci.c +++ b/sys/dev/usb/controller/xhci.c @@ -574,7 +574,9 @@ xhci_init(struct xhci_softc *sc, device_t self, uint8_t dma32) DPRINTF("RUNTIMEOFFSET=0x%x\n", sc->sc_runt_off); DPRINTF("DOOROFFSET=0x%x\n", sc->sc_door_off); - DPRINTF("xHCI version = 0x%04x\n", XREAD2(sc, capa, XHCI_HCIVERSION)); + sc->sc_hcversion = XREAD2(sc, capa, XHCI_HCIVERSION); + + DPRINTF("xHCI version = 0x%04x\n", sc->sc_hcversion); if (!(XREAD4(sc, oper, XHCI_PAGESIZE) & XHCI_PAGESIZE_4K)) { device_printf(sc->sc_bus.parent, "Controller does " @@ -713,7 +715,8 @@ xhci_get_xecp(struct xhci_softc *sc) * documented in Table 7.2 of eXtensible Host Controller Interface for * Universal Serial Bus (xHCI) Rev 1.2b 2023. */ - device_printf(sc->sc_bus.parent, "xECP capabilities <"); + device_printf(sc->sc_bus.parent, "xHCI %u.%u, xECP capabilities <", + sc->sc_hcversion >> 8, (sc->sc_hcversion >> 4) & 0xF); eec = -1; for (eecp = XHCI_HCS0_XECP(hccp1) << 2; @@ -2764,6 +2767,10 @@ xhci_ss_parent_hub(struct xhci_softc *sc, struct usb_device *udev, struct usb_device *adev = udev; struct usb_device *hubdev = udev->parent_hub; + /* These fields have no Enhanced SuperSpeed meaning before xHCI 1.2. */ + if (sc->sc_hcversion < XHCI_HCIVERSION_1_2) + return (NULL); + if (udev->speed >= xhci_ss_highest(sc)) return (NULL); diff --git a/sys/dev/usb/controller/xhci.h b/sys/dev/usb/controller/xhci.h index 9a84243eb8f5..e54ac6c66bbd 100644 --- a/sys/dev/usb/controller/xhci.h +++ b/sys/dev/usb/controller/xhci.h @@ -562,6 +562,8 @@ struct xhci_softc { uint8_t sc_noslot; /* Enhanced SuperSpeed speed IDs of the controller, see XHCI_PSIV_BIT */ uint16_t sc_ss_psiv; + /* xHCI interface version, see XHCI_HCIVERSION_* */ + uint16_t sc_hcversion; /* number of ports on root HUB */ uint8_t sc_noport; /* root HUB device configuration */ diff --git a/sys/dev/usb/controller/xhcireg.h b/sys/dev/usb/controller/xhcireg.h index ac6c7393ab49..ddcab112b941 100644 --- a/sys/dev/usb/controller/xhcireg.h +++ b/sys/dev/usb/controller/xhcireg.h @@ -46,6 +46,8 @@ #define XHCI_HCIVERSION 0x02 /* RO Interface version number */ #define XHCI_HCIVERSION_0_9 0x0090 /* xHCI version 0.9 */ #define XHCI_HCIVERSION_1_0 0x0100 /* xHCI version 1.0 */ +#define XHCI_HCIVERSION_1_1 0x0110 /* xHCI version 1.1 */ +#define XHCI_HCIVERSION_1_2 0x0120 /* xHCI version 1.2 */ #define XHCI_HCSPARAMS1 0x04 /* RO structural parameters 1 */ #define XHCI_HCS1_DEVSLOT_MAX(x)((x) & 0xFF) #define XHCI_HCS1_IRQ_MAX(x) (((x) >> 8) & 0x3FF)