android_kernel_oneplus_msm8998/drivers
Kai-Heng Feng 80c305aeeb USB: Consolidate LPM checks to avoid enabling LPM twice
commit d7a6c0ce8d26412903c7981503bad9e1cc7c45d2 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>
2019-05-16 19:44:44 +02:00
..
accessibility
acpi ACPI / SBS: Fix GPE storm on recent MacBookPro's 2019-04-27 09:33:58 +02:00
amba
android
ata sata_rcar: fix deferred probing 2019-02-20 10:13:08 +01:00
atm atm: he: fix sign-extension overflow on large shift 2019-03-23 08:44:16 +01:00
auxdisplay
base PM / wakeup: Rework wakeup source timer cancellation 2019-03-23 08:44:39 +01:00
bcma
block block/swim3: Fix -EBUSY error when re-opening device after unmount 2019-02-20 10:13:13 +01:00
bluetooth
bus
cdrom cdrom: Fix race condition in cdrom_sysctl_register 2019-04-27 09:33:52 +02:00
char tpm/tpm_i2c_atmel: Return -E2BIG when the transfer is incomplete 2019-04-27 09:34:00 +02:00
clk clk: ingenic: Fix round_rate misbehaving with non-integer dividers 2019-03-23 08:44:36 +01:00
clocksource clocksource/drivers/exynos_mct: Clear timer interrupt when shutdown 2019-03-23 08:44:35 +01:00
connector
cpufreq cpufreq: pxa2xx: remove incorrect __init annotation 2019-03-23 08:44:36 +01:00
cpuidle cpuidle: big.LITTLE: fix refcount leak 2019-02-20 10:13:09 +01:00
crypto crypto: crypto4xx - properly set IV after de- and encrypt 2019-04-27 09:34:00 +02:00
dca
devfreq
dio
dma dmaengine: tegra: avoid overflow of byte tracking 2019-04-27 09:33:53 +02:00
dma-buf
edac
eisa
extcon extcon: usb-gpio: Don't miss event during suspend/resume 2019-04-03 06:23:18 +02:00
firewire
firmware efi: stub: define DISABLE_BRANCH_PROFILING for all architectures 2019-04-03 06:23:20 +02:00
fmc
fpga
gpio gpio: gpio-omap: fix level interrupt idling 2019-04-27 09:33:48 +02:00
gpu drm/dp/mst: Configure no_stop_bit correctly for remote i2c xfers 2019-04-27 09:33:53 +02:00
hid hid-sensor-hub.c: fix wrong do_div() usage 2019-04-03 06:23:21 +02:00
hsi
hv Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels 2019-01-13 10:05:27 +01:00
hwmon hwmon: (lm80) Fix missing unlock on error in set_fan_div() 2019-02-23 09:05:13 +01:00
hwspinlock
hwtracing coresight: etm4x: Add support to enable ETMv4.2 2019-04-27 09:33:50 +02:00
i2c i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA 2019-04-27 09:33:47 +02:00
ide ide: pmac: add of_node_put() 2018-12-21 14:09:52 +01:00
idle
iio io: accel: kxcjk1013: restore the range after resume. 2019-04-27 09:34:01 +02:00
infiniband IB/mlx4: Fix race condition between catas error reset and aliasguid flows 2019-04-27 09:33:56 +02:00
input Input: st-keyscan - fix potential zalloc NULL dereference 2019-03-23 08:44:33 +01:00
iommu iommu/dmar: Fix buffer overflow during PCI bus notification 2019-04-27 09:33:59 +02:00
ipack
irqchip irqchip/mmp: Only touch the PJ4 IRQ & FIQ bits on enable/disable 2019-03-23 08:44:27 +01:00
isdn mISDN: hfcpci: Test both vendor & device ID for Digium HFC4S 2019-04-03 06:23:25 +02:00
leds leds: lp55xx: fix null deref on firmware load failure 2019-04-27 09:33:51 +02:00
lguest
lightnvm
macintosh
mailbox
mcb
md bcache: improve sysfs_strtoul_clamp() 2019-04-27 09:33:51 +02:00
media media: s5p-jpeg: Check for fmt_ver_flag when doing fmt enumeration 2019-04-27 09:33:53 +02:00
memory
memstick memstick: Prevent memstick host from getting runtime suspended during card detection 2019-02-20 10:13:09 +01:00
message
mfd mfd: mc13xxx: Fix a missing check of a register-read failure 2019-03-23 08:44:16 +01:00
misc misc: vexpress: Off by one in vexpress_syscfg_exec() 2019-02-20 10:13:18 +01:00
mmc mmc: davinci: remove extraneous __init annotation 2019-04-27 09:33:56 +02:00
mtd mtd: rawnand: gpmi: fix MX28 bus master lockup problem 2019-02-20 10:13:17 +01:00
net bonding: fix event handling for stacked bonds 2019-04-27 09:33:59 +02:00
nfc NFC: nxp-nci: Include unaligned.h instead of access_ok.h 2019-02-20 10:13:20 +01:00
ntb
nubus
nvdimm
nvme
nvmem
of
oprofile
parisc
parport parport_pc: fix find_superio io compare code, should use equal test. 2019-03-23 08:44:37 +01:00
pci PCI: Add function 1 DMA alias quirk for Marvell 9170 SATA controller 2019-04-27 09:33:56 +02:00
pcmcia
perf
phy
pinctrl pinctrl: meson: meson8b: fix the sdxc_a data 1..3 pins 2019-03-23 08:44:33 +01:00
platform platform/x86: Fix unmet dependency warning for SAMSUNG_Q10 2019-03-23 08:44:26 +01:00
pnp
power power: supply: olpc_battery: correct the temperature units 2019-01-13 10:05:34 +01:00
powercap
pps
ps3
ptp ptp: check gettime64 return code in PTP_SYS_OFFSET ioctl 2019-02-20 10:13:05 +01:00
pwm
rapidio
ras
regulator regulator: act8865: Fix act8600_sudcdc_voltage_ranges setting 2019-04-27 09:33:53 +02:00
remoteproc
reset
rpmsg
rtc rtc: Fix overflow when converting time64_t to rtc_time 2019-04-03 06:23:19 +02:00
s390 scsi: zfcp: fix scsi_eh host reset with port_forced ERP for non-NPIV FCP devices 2019-04-03 06:23:27 +02:00
sbus drivers/sbus/char: add of_node_put() 2018-12-21 14:09:52 +01:00
scsi scsi: megaraid_sas: return error when create DMA pool failed 2019-04-27 09:33:50 +02:00
sfi
sh
sn
soc soc/tegra: fuse: Fix illegal free of IO base address 2019-04-27 09:33:52 +02:00
spi spi: bcm2835: Unbreak the build of esoteric configs 2019-01-13 10:05:31 +01:00
spmi
ssb
staging staging: comedi: ni_usb6501: Fix possible double-free of ->usb_rx_buf 2019-04-27 09:34:01 +02:00
target scsi: target/iscsi: Avoid iscsit_release_commands_from_conn() deadlock 2019-03-23 08:44:35 +01:00
tc
thermal thermal/int340x_thermal: fix mode setting 2019-04-27 09:33:57 +02:00
thunderbolt
tty serial: uartps: console_setup() can't be placed to init section 2019-04-27 09:33:58 +02:00
uio
usb USB: Consolidate LPM checks to avoid enabling LPM twice 2019-05-16 19:44:44 +02:00
uwb
vfio
vhost vhost: make sure used idx is seen before log in vhost_add_used_n() 2019-01-13 10:05:28 +01:00
video fbdev: fbmem: fix memory access if logo is bigger than the screen 2019-04-27 09:33:51 +02:00
virt mm: replace get_user_pages() write/force parameters with gup_flags 2018-12-17 21:55:16 +01:00
virtio
vlynq
vme
w1
watchdog
xen xen: xlate_mmu: add missing header to fix 'W=1' warning 2018-12-17 21:55:11 +01:00
zorro
Kconfig
Makefile