From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1AAB03E3D90 for ; Mon, 3 Aug 2026 11:07:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785755244; cv=none; b=c9e2ISxF2GyHZOJ7LlBJdb/kUC6FZjd7csYNRmD5/RfmKKcDWW+AvqU1qQLgsc7NOwBurlxAGpI2K2LgWDkuAF55y8GnjMGt509JnTBdmrMTVP1VcdUyFLKqwYcvozwzWhlEZaYHKbq0XukwnmH9KwwwPF1my8gjkLDPXEXJWwg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785755244; c=relaxed/simple; bh=kx7Tqf/hlHoa0pFYeuY6JbaFYF677+N66Yr9a9Y3xCw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MCqb1dwKnaf9tqqRFDXCdhC0j/rvTlg0YNRfkImO13hGtsFTlopoNtpH3y/nGuL+hU9WrU5KmUP8DrIFfaS44IVA0r6cIXx03iDaaGVAi8uurzJIC3A/d9T+6KNyBJZkPRaZtRW20BDMDJJWzUE6c0VUYDw/Eg01MD/C3jCh/qg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=qabxqPuh; arc=none smtp.client-ip=209.85.221.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qabxqPuh" Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-47fd4531020so1884765f8f.3 for ; Mon, 03 Aug 2026 04:07:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785755241; x=1786360041; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to :content-type; bh=qIuUPtqynuFa8VYYKQJcEKb8Og2XbEd8p7B0qvItkjQ=; b=qabxqPuhuRc9w6cCk1YljiiLwzMlpdPVHUYKMQedjc0zYs/Qo6PK/LhQ0/DITtwYLt PaRcYKVIewJ15Ce1uiUeBwPocb9IsEXw/MvVFG/QPjK8vGZA44BQizxk3W5tvDnSoV5c LskpQi38AbZ0xdWSmIhZxpO2jslDBrM6BCRXsABy5LFozqovLCYLwtc1IrpOZtZFZ3GU CiZlXTS+Pc1cf/iWRKxNqQkXGav+A/5KlduCARi0hdW1gcQ1UM7eyhAEVVyAcDhu7G79 6NKmTNmnU84tum/7koNjLDK9MSWK7trcO+o+a0YY7Br2eBjdxg3uNLT902zxP0pKYzb1 mmAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785755241; x=1786360041; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=qIuUPtqynuFa8VYYKQJcEKb8Og2XbEd8p7B0qvItkjQ=; b=e3bl2nlVUibtuyZOzSN2LoTehKYzcIvWsBuraTx9DMlwLDN38lJWJqLG3oA+2mUdJU lXqwKQw77ZIvIZ23Q9GYuVXG3mET61WlYdxBu+epZaEq+GiwuZ7qZoBfV5YYCTbexh9p 2H6NC3TMv0nBgzj6mYBeNzymkkGBHEbNttYRJfDXqjWhHF1+NUyTMnJxdJTBe+aypWQk 4YHLnOjvDjH20qCjNx/obz8+AbptNMAyOnGMn3alOdO0D8mP/L4YvB2TYsDlYd1xRB7A yI3LQ1VSVb2V6l/99poxv9ky7UxHoXOt0QmeZmn4eed5vjLwRo2CxHSxkBcX+rIATlcN qKzg== X-Forwarded-Encrypted: i=1; AHgh+Rq80lmgVIoHc0WiHqMX5Z8LXiRyJk1g0aixZewFKPO+gJU2jgx/p0NCQ3g2nM+UWSEMNV15ZZ89QSaWh1k=@vger.kernel.org X-Gm-Message-State: AOJu0YyqauHLAXCXt7X40OH5gK64rJUOjFNfaykjc39XS0ye0CnS3V1y ZYYmglka3c9GAbyHJPDcwZIdGDUiJP883CwQpT0bgD+JQyX5iEUeC+tT X-Gm-Gg: AR+sD13CEDGERBBuoCRVjPd0gquNxUujLiig2q356w9pZkJRsjB4J+UuCbnidUW8L9z IVUY0uDN77eWkIGiedmYSbcSGNdZvsvBT0f3vF3w5QriLo4d5Q8dZUVI/Iy3kxjiG9VT4gNibO3 WDgDXrcr6qzo6jOS1GRNkMQoF2X33k9f3uvwd8P8FwbelewMVdZ9C2GKzHopP5NEt0D9UmxgAzx CXqEJ370QzAwA4jPb3do4aNxl8kZsd7imecx2+QH4/9mesryNakNwvLzPzR1706lOnhKW+2qaTn Ww9Tujh6ZG/pmUN/ZHH07CadYMMkpLMmv3C0gjl7LuQegd1gIBUTQpjJje9rW/6SYJ1Y8uC7DFa 3f5XKcMgZ94eq691PWZb8LZEpKC6zECsY+VexeP7wNnSBCGJLJKXM3tuwvEeeeB7arrLj7n1Xcl QJkLiQWdWTHATrbuEnD41RsxiWo6PHLfupFzHuHPwleFDoqQUKNNCokqGLDQ6YK2kQNoZHAqxpP g== X-Received: by 2002:a05:6000:29c2:b0:474:530:9d with SMTP id ffacd0b85a97d-47fd72b03e1mr16772676f8f.13.1785755241100; Mon, 03 Aug 2026 04:07:21 -0700 (PDT) Received: from SVR.localdomain ([86.106.74.252]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fd4562a38sm31558064f8f.21.2026.08.03.04.07.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 04:07:20 -0700 (PDT) Sender: Semih Baskan From: Semih Baskan To: mathias.nyman@intel.com, gregkh@linuxfoundation.org, hkallweit1@gmail.com Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, mathias.nyman@linux.intel.com Subject: [PATCH] usb: xhci: Handle USB3 port events when there is one roothub Date: Mon, 3 Aug 2026 14:07:04 +0300 Message-ID: <20260803110704.381-1-strst.gs@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- drivers/usb/host/xhci-ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 4f98d8269625..829f3e8db26a 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -2025,7 +2025,7 @@ static void handle_port_status(struct xhci_hcd *xhci, union xhci_trb *event) 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;