usb: hub: Fail fast in USB3 link power management enable path
authorMathias Nyman <mathias.nyman@linux.intel.com>
Fri, 14 Mar 2025 14:20:00 +0000 (16:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Apr 2025 14:08:34 +0000 (16:08 +0200)
commita02dcd3b616ac481993efebde1bebb8529eea10c
treea9174582c3a0ffc9ebd90f0ac42a9f6b60ab3f4b
parentbf11662f71dc4af6ad4eb402542ad377898b5ac7
usb: hub: Fail fast in USB3 link power management enable path

Enabling LPM is done in hub workqueue, often in paths handling possible
link issues. So fail immediately on USB3 LPM issues and avoid hub wq
from unnecessary blocking, thus allowing it to handle other port events
faster.

Detect errors when enabling U1/U2 link states, and return immediately
if there is an issue.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20250314142000.93090-6-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hub.c