patch "xhci: Prevent device initiated U1/U2 link pm if exit latency is too" added to usb-linus
Subsystems (3)
This is a note to let you know that I've just added the patch titled
xhci: Prevent device initiated U1/U2 link pm if exit latency is too
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From cd9d9491e835a845c1a98b8471f88d26285e0bb9 Mon Sep 17 00:00:00 2001
From: Mathias Nyman <[email protected]>
Date: Fri, 4 Oct 2019 14:59:27 +0300
Subject: xhci: Prevent device initiated U1/U2 link pm if exit latency is too
long
If host/hub initiated link pm is prevented by a driver flag we still must ensure that periodic endpoints have longer service intervals than link pm exit latency before allowing device initiated link pm.
Fix this by continue walking and checking endpoint service interval if xhci_get_timeout_no_hub_lpm() returns anything else than USB3_LPM_DISABLED
While at it fix the split line error message
--- drivers/usb/host/xhci.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/usb/host/xhci.c +6 -4
@@ -4790,10 +4790,12 @@ static u16 xhci_calculate_lpm_timeout(struct usb_hcd *hcd,if (intf->dev.driver) { driver =to_usb_driver (intf->dev.driver);if (driver && driver->disable_hub_initiated_lpm) { -dev_dbg (&udev->dev,"Hub-initiated %s disabled " -"at request of driver %s\n" , - state_name, driver->name); -return xhci_get_timeout_no_hub_lpm (udev, state); +dev_dbg (&udev->dev,"Hub-initiated %s disabled at request of driver %s\n" , + state_name, driver->name); + timeout =xhci_get_timeout_no_hub_lpm (udev, + state); +if (timeout ==USB3_LPM_DISABLED ) +return timeout; } }
Signature · 1 line
2.23.0