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 7546931A045; Fri, 9 Oct 2026 14:27:17 +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=1791556038; cv=none; b=gcGGX0gIW/5dwHZY/umSK8yC0sUfJnB7UJcunXurClMi60jXXthulTu64ZC5YUGoM+KMdHeOh9S15QeORS/6alZIQ5/3wT5BywgoduYsfcnG3qdsKii6nSfgYk3fs6jrthVDTKlrrdBfsirL8LHlyCrOik4H4CixbgdY6qCFIYw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791556038; c=relaxed/simple; bh=1ftZCxiVGU13WpNgT3my4PK9YJzhn48UjYx+eb1nbr0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nAlFNzJ3QaBxIEHhFwmzpMjLOi36sB/4+EqIDj8EyR+ZHDb8QZo1OmpALjmqlrYQUcYlg7vuEjeyEMANnlp26zX4ov35HQquTrnCwcMaaWkgnYZNv4TOp+3v/nhG6YQQeeRsS0XQ5sBvhu5/7cuWZq+TgPeY6hOODpOjEVfLKm4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gJsrAU2N; 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="gJsrAU2N" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CCDCF1F000FF; Fri, 9 Oct 2026 14:27:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1791556037; bh=Uv24582s15hNrLGFKPd/oVjuGBcrSQX3YoAQ/frhsE0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gJsrAU2Nro7LHT1kI8HeqAT4g2gZ7hagpLyeDdQ01eNjMZ2yG8WlTqpL16k+ptKaD MCuheal65eouzKFO18yYydnq9gPsOLx7On4n3g/mG15uAo6K0Sakp13R77TxZvUI3P JlPvCk1yFxQRuW0M6iUW3V8uB8IE/MmHW4ej4oKg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Mathieu Fluhr , stable , Lovekesh Solanki , Mathias Nyman Subject: [PATCH 6.18 164/403] usb: hub: use shorter 120ms post resume hold for SS root hubs Date: Fri, 9 Oct 2026 16:08:45 +0200 Message-ID: <20261009140955.930605257@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261009140952.119038291@linuxfoundation.org> References: <20261009140952.119038291@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: Lovekesh Solanki commit 29480b05e6e226594dc11ccf2a036fbd5cdd0e42 upstream. Holding a USB3 hub PM runtime reference for 200ms at hub resume triggers an AMD platform issue. Users running Android adb report crashes after adb has been polling and waking up the USB subsystem once a second for some time. Vendors are working on a solution. Disabling USB runtime PM is one way to prevent this issue, but it is also proven that reducing the hold time to 120ms in resume also mitigates it. See Link for more details. Reducing the hold time to 120ms for the USB3 roothub is in itself a valid change and optimization, as the current 200ms is excessive: a root hub has no upstream suspended hub whose wake propagation needs to be accounted for, but still need some time for USB3 link training to complete. Keep the 200ms hold for external hubs that commit 8f5b7e2bec1c ("usb: hub: fix detection of high tier USB3 devices behind suspended hubs") is intended for. Reported-by: Mathieu Fluhr Link: https://lore.kernel.org/all/CAPyJwA_D9qw0T72f8zwM1yKjP+To=maVANbcdsWM7yRmbBxYvw@mail.gmail.com/ Cc: stable Fixes: 8f5b7e2bec1c ("usb: hub: fix detection of high tier USB3 devices behind suspended hubs") Signed-off-by: Lovekesh Solanki Acked-by: Mathias Nyman Link: https://patch.msgid.link/20260903112903.542719-1-lovekeshsolanki00@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/hub.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -71,8 +71,11 @@ /* * Give SS hubs 200ms time after wake to train downstream links before * assuming no port activity and allowing hub to runtime suspend back. + * Root hubs have no upstream hub whose wake propagation needs to be + * accounted for, so they need less time, use 120ms for them. */ #define USB_SS_PORT_U0_WAKE_TIME 200 /* ms */ +#define USB_SS_RH_PORT_U0_WAKE_TIME 120 /* ms */ /* Protect struct usb_device->state and ->children members * Note: Both are also protected by ->dev.sem, except that ->state can @@ -1362,7 +1365,9 @@ static void hub_activate(struct usb_hub queue_delayed_work(system_power_efficient_wq, &hub->post_resume_work, - msecs_to_jiffies(USB_SS_PORT_U0_WAKE_TIME)); + msecs_to_jiffies(hdev->parent ? + USB_SS_PORT_U0_WAKE_TIME : + USB_SS_RH_PORT_U0_WAKE_TIME)); return; }