android_kernel_oneplus_msm8998/drivers/usb/musb
Daniel Glöckner 4c22010c13 usb: musb: fix remote wakeup racing with suspend
[ Upstream commit ebc3dd688cd988754a304147753b13e58de1b5a1 ]

It has been observed that writing 0xF2 to the power register while it
reads as 0xF4 results in the register having the value 0xF0, i.e. clearing
RESUME and setting SUSPENDM in one go does not work. It might also violate
the USB spec to transition directly from resume to suspend, especially
when not taking T_DRSMDN into account. But this is what happens when a
remote wakeup occurs between SetPortFeature USB_PORT_FEAT_SUSPEND on the
root hub and musb_bus_suspend being called.

This commit returns -EBUSY when musb_bus_suspend is called while remote
wakeup is signalled and thus avoids to reset the RESUME bit. Ignoring
this error when musb_port_suspend is called from musb_hub_control is ok.

Signed-off-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-03 11:21:24 +02:00
..
am35x.c
blackfin.c usb: musb: blackfin: add bfin_fifo_offset in bfin_ops 2017-01-12 11:22:47 +01:00
blackfin.h
cppi_dma.c
cppi_dma.h
da8xx.c usb: musb: da8xx: fix babble condition handling 2017-12-20 10:05:00 +01:00
davinci.c
davinci.h
jz4740.c
Kconfig usb: musb: USB_TI_CPPI41_DMA requires dmaengine support 2015-11-18 15:09:26 -06:00
Makefile
musb_am335x.c
musb_core.c usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers 2018-05-30 07:49:03 +02:00
musb_core.h usb: musb: core: add clear_ep_rxintr() to musb_platform_ops 2017-01-12 11:22:43 +01:00
musb_cppi41.c usb: musb: cppi41: don't check early-TX-interrupt for Isoch transfer 2017-03-30 09:35:17 +02:00
musb_debug.h
musb_debugfs.c
musb_dma.h
musb_dsps.c usb: musb: dsps: implement clear_ep_rxintr() callback 2017-01-12 11:22:43 +01:00
musb_gadget.c
musb_gadget.h
musb_gadget_ep0.c usb: musb: gadget: misplaced out of bounds check 2018-04-24 09:32:05 +02:00
musb_host.c usb: musb: fix remote wakeup racing with suspend 2018-07-03 11:21:24 +02:00
musb_host.h usb: musb: fix remote wakeup racing with suspend 2018-07-03 11:21:24 +02:00
musb_io.h
musb_regs.h
musb_virthub.c usb: musb: fix remote wakeup racing with suspend 2018-07-03 11:21:24 +02:00
musbhsdma.c
musbhsdma.h usb: musb: Fix trying to free already-free IRQ 4 2017-01-12 11:22:47 +01:00
omap2430.c
omap2430.h
sunxi.c usb: musb: sunxi: Explicitly release USB PHY on exit 2017-10-27 10:23:16 +02:00
tusb6010.c
tusb6010.h
tusb6010_omap.c usb: musb: tusb6010_omap: Do not reset the other direction's packet size 2017-05-25 14:30:12 +02:00
ux500.c usb: musb: ux500: Fix NULL pointer dereference at system PM 2018-01-17 09:35:28 +01:00
ux500_dma.c usb: musb/ux500: remove duplicate check for dma_is_compatible 2018-02-25 11:03:45 +01:00