linux-stable/drivers/usb/core
Kai-Heng Feng 0feaa3aeea USB: Consolidate LPM checks to avoid enabling LPM twice
commit d7a6c0ce8d upstream.

USB Bluetooth controller QCA ROME (0cf3:e007) sometimes stops working
after S3:
[ 165.110742] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000302.bin
[ 168.432065] Bluetooth: hci0: Failed to send body at 4 of 1953 (-110)

After some experiments, I found that disabling LPM can workaround the
issue.

On some platforms, the USB power is cut during S3, so the driver uses
reset-resume to resume the device. During port resume, LPM gets enabled
twice, by usb_reset_and_verify_device() and usb_port_resume().

Consolidate all checks into new LPM helpers to make sure LPM only gets
enabled once.

Fixes: de68bab4fa ("usb: Don't enable USB 2.0 Link PM by default.”)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: stable <stable@vger.kernel.org> # after much soaking
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02 09:40:30 +02:00
..
buffer.c
config.c Revert "USB: core: only clean up what we allocated" 2019-04-03 06:25:21 +02:00
devices.c usb: fix some references for /proc/bus/usb 2017-04-18 16:54:19 +02:00
devio.c USB: fix the usbfs flag sanitization for control transfers 2018-11-10 07:48:36 -08:00
driver.c USB: Consolidate LPM checks to avoid enabling LPM twice 2019-05-02 09:40:30 +02:00
endpoint.c
file.c
generic.c USB:fix USB3 devices behind USB3 hubs not resuming at hibernate thaw 2018-04-24 09:36:25 +02:00
hcd-pci.c usb: Don't die twice if PCI xhci host is not responding in resume 2018-09-26 08:38:06 +02:00
hcd.c USB: Increment wakeup count on remote wakeup. 2018-05-01 12:58:11 -07:00
hub.c USB: Consolidate LPM checks to avoid enabling LPM twice 2019-05-02 09:40:30 +02:00
hub.h
Kconfig
ledtrig-usbport.c USB: ledtrig-usbport: fix of-node leak 2018-03-19 08:42:48 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
message.c USB: Consolidate LPM checks to avoid enabling LPM twice 2019-05-02 09:40:30 +02:00
notify.c
of.c USB: of: document reference taken by child-lookup helper 2017-06-13 11:07:32 +02:00
otg_whitelist.h
port.c
quirks.c USB: Add USB_QUIRK_DELAY_CTRL_MSG quirk for Corsair K70 RGB 2019-01-16 22:07:11 +01:00
sysfs.c USB: Add new USB LPM helpers 2019-05-02 09:40:30 +02:00
urb.c usb: core: Add a helper function to check the validity of EP type in URB 2018-02-25 11:07:45 +01:00
usb-acpi.c usb: optimize acpi companion search for usb port devices 2017-06-03 18:02:58 +09:00
usb.c USB: check usb_get_extra_descriptor for proper size 2018-12-13 09:18:51 +01:00
usb.h USB: Add new USB LPM helpers 2019-05-02 09:40:30 +02:00