Commit 57edd462 authored by Mathias Nyman's avatar Mathias Nyman Committed by Greg Kroah-Hartman

usb: Don't disable Latency tolerance Messaging (LTM) before port reset

Disabing Latency Tolerance Messaging before port reset is unnecessary.
LTM is automatically disabled at port reset.

If host can't communicate with the device the LTM message will fail, and
the hub driver will unnecessarily do a logical disconnect.
Broken communication is ofter the reason for a reset in the first place.

Additionally we can't guarantee device is in a configured state,
epecially in reset-resume case when root hub lost power.
LTM can't be modified unless device is in a configured state.

Just remove LTM disabling before port reset.

Details about LTM and port reset in USB 3 specification:

USB 3 spec section 9.4.5
"The LTM Enable field can be modified by the SetFeature() and
ClearFeature() requests using the LTM_ENABLE feature selector.
This field is reset to zero when the device is reset."

USB 3 spec section 9.4.1
"The device shall process a Clear Feature (U1_Enable or U2_Enable or
LTM_Enable) only if the device is in the configured state."
Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 687ca639
...@@ -5505,21 +5505,15 @@ static int usb_reset_and_verify_device(struct usb_device *udev) ...@@ -5505,21 +5505,15 @@ static int usb_reset_and_verify_device(struct usb_device *udev)
if (udev->usb2_hw_lpm_enabled == 1) if (udev->usb2_hw_lpm_enabled == 1)
usb_set_usb2_hardware_lpm(udev, 0); usb_set_usb2_hardware_lpm(udev, 0);
/* Disable LPM and LTM while we reset the device and reinstall the alt /* Disable LPM while we reset the device and reinstall the alt settings.
* settings. Device-initiated LPM settings, and system exit latency * Device-initiated LPM, and system exit latency settings are cleared
* settings are cleared when the device is reset, so we have to set * when the device is reset, so we have to set them up again.
* them up again.
*/ */
ret = usb_unlocked_disable_lpm(udev); ret = usb_unlocked_disable_lpm(udev);
if (ret) { if (ret) {
dev_err(&udev->dev, "%s Failed to disable LPM\n", __func__); dev_err(&udev->dev, "%s Failed to disable LPM\n", __func__);
goto re_enumerate_no_bos; goto re_enumerate_no_bos;
} }
ret = usb_disable_ltm(udev);
if (ret) {
dev_err(&udev->dev, "%s Failed to disable LTM\n", __func__);
goto re_enumerate_no_bos;
}
bos = udev->bos; bos = udev->bos;
udev->bos = NULL; udev->bos = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment