android_kernel_oneplus_msm8998/drivers/usb/core
Alan Stern 1df1f73696 USB: remove LPM management from usb_driver_claim_interface()
commit c183813fcee44a249339b7c46e1ad271ca1870aa upstream.

usb_driver_claim_interface() disables and re-enables Link Power
Management, but it shouldn't do either one, for the reasons listed
below.  This patch removes the two LPM-related function calls from the
routine.

The reason for disabling LPM in the analogous function
usb_probe_interface() is so that drivers won't have to deal with
unwanted LPM transitions in their probe routine.  But
usb_driver_claim_interface() doesn't call the driver's probe routine
(or any other callbacks), so that reason doesn't apply here.

Furthermore, no driver other than usbfs will ever call
usb_driver_claim_interface() unless it is already bound to another
interface in the same device, which means disabling LPM here would be
redundant.  usbfs doesn't interact with LPM at all.

Lastly, the error return from usb_unlocked_disable_lpm() isn't handled
properly; the code doesn't clean up its earlier actions before
returning.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Fixes: 8306095fd2 ("USB: Disable USB 3.0 LPM in critical sections.")
CC: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-10 08:52:08 +02:00
..
buffer.c
config.c USB: Accept bulk endpoints with 1024-byte maxpacket 2018-05-16 10:06:49 +02:00
devices.c
devio.c USB: usbdevfs: restore warning for nonsensical flags 2018-10-10 08:52:08 +02:00
driver.c USB: remove LPM management from usb_driver_claim_interface() 2018-10-10 08:52:08 +02:00
endpoint.c
file.c
generic.c USB:fix USB3 devices behind USB3 hubs not resuming at hibernate thaw 2018-04-24 09:32:06 +02:00
hcd-pci.c usb: Don't die twice if PCI xhci host is not responding in resume 2018-09-26 08:35:07 +02:00
hcd.c USB: Increment wakeup count on remote wakeup. 2018-05-02 07:53:40 -07:00
hub.c usb: hub: Don't wait for connect state at resume for powered-off ports 2018-08-06 16:24:39 +02:00
hub.h
Kconfig
Makefile
message.c usb: Avoid use-after-free by flushing endpoints early in usb_set_interface() 2018-09-26 08:35:07 +02:00
notify.c
otg_whitelist.h
port.c
quirks.c USB: add quirk for WORLDE Controller KS49 or Prodipe MIDI 49C USB controller 2018-09-26 08:35:07 +02:00
sysfs.c
urb.c
usb-acpi.c
usb.c USB: handle NULL config in usb_find_alt_setting() 2018-10-10 08:52:07 +02:00
usb.h