From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8137A54EED4; Mon, 31 Aug 2026 13:46:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788184008; cv=none; b=QIwFwuaUU0wP/sSf+sOKOtvxObAGIULKzo+B4LVCAntrBHSdA0fjQT5osiABMJOANRndcvXMypSaIXL3V2hzMDK8wVEM/noOAzdYY6EyvFKJESXD0X7K6v4HkFXsLO0w8mjzX1LU1TkUrb1416cqLL0IQQ8eVhSXdnOqv6SNbs4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788184008; c=relaxed/simple; bh=t8Hc2qqgEx5NUl5hSrdIlB0fs0uOzGySwErLSYD+2Xo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lC37NV954GgufFlG18CvMXdVRrbd+9agsNa3myE1jBfw+T5dW727Z4d3R86XznDuS08OJsI6pyQ02FDRD4Jh+aygoFwAp3JzIep11E8Mg7gw+kySbTcgUM3hVu3Y3en3u79PwBiWjAj8KwxNRmYBW7ovWx8/X8Wk9yYNhX7TQVY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vTwTvyPf; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="vTwTvyPf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A66011F00ACA; Mon, 31 Aug 2026 13:46:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1788184005; bh=754ZCbTBhrh4ZPe9u+AUbSjsW8tVU4/RDfphdAxQqdc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=vTwTvyPf4fYQpbuFM8unyNsNOxd5RF5jln1sw0ogewGzXSeYFEWVTaDiRICzfhj6Z OYZknQ7DVbiUrTpMf/NOsGaXbqKlwABFxwTIpbVBLuZTGEVnAY9scRA6Y7y6JaD70B QqpVeOjKysjzWgWaroG4uotvY8HZ05vuUFwgB4lY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Semih Baskan , Mathias Nyman Subject: [PATCH 6.18 33/83] usb: xhci: Handle USB3 port events when there is one roothub Date: Mon, 31 Aug 2026 15:34:09 +0200 Message-ID: <20260831133401.120758605@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260831133359.207714926@linuxfoundation.org> References: <20260831133359.207714926@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Semih Baskan commit 3e91ec3e7d80a327fb558207613c80415d3bf756 upstream. handle_port_status() drops every USB3 port event when xhci->shared_hcd is NULL. The check dates from a time when xhci-plat always created a shared hcd, so a NULL one could only mean the hcd had been removed. Since commit 4736ebd7fcaf ("usb: host: xhci-plat: omit shared hcd if either root hub has no ports") that is no longer true. A controller whose USB2 root hub has no ports gets a single roothub, the USB3 rhub is served by the main hcd, and shared_hcd stays NULL for the lifetime of the device. Every SuperSpeed port event is then thrown away as bogus behind a debug message, so devices never enumerate even though the port sees the device and its change bits stay set: 0x006a1203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: CSC WRC PRC PLC Broadcom Northstar is such a controller. USB3 works there up to 5.15 and stops working from 5.19 onwards. Ask xhci_get_usb3_hcd() instead. It returns the shared hcd when there is one, the main hcd when the USB2 root hub has no ports, and NULL once the shared hcd is gone, which keeps the original meaning of the check. Tested on an Asus RT-N18U (BCM47081), which has a single roothub. Before the change nothing enumerates on the USB3 port; after it SuperSpeed devices enumerate normally over repeated connect and disconnect cycles, the change bits shown above clear, and USB2 is unaffected on both ports. Fixes: 4736ebd7fcaf ("usb: host: xhci-plat: omit shared hcd if either root hub has no ports") Cc: stable@vger.kernel.org Signed-off-by: Semih Baskan Signed-off-by: Mathias Nyman Link: https://patch.msgid.link/20260806142113.2436238-17-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/xhci-ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -2026,7 +2026,7 @@ static void handle_port_status(struct xh vdev = xhci->devs[port->slot_id]; /* We might get interrupts after shared_hcd is removed */ - if (port->rhub == &xhci->usb3_rhub && xhci->shared_hcd == NULL) { + if (port->rhub == &xhci->usb3_rhub && xhci_get_usb3_hcd(xhci) == NULL) { xhci_dbg(xhci, "ignore port event for removed USB3 hcd\n"); bogus_port_status = true; goto cleanup;