OSDN Git Service

usb: bdc: Adb shows offline after resuming from S2
authorAl Cooper <alcooperx@gmail.com>
Wed, 22 Jul 2020 17:07:43 +0000 (13:07 -0400)
committerFelipe Balbi <balbi@kernel.org>
Fri, 24 Jul 2020 13:45:14 +0000 (16:45 +0300)
commit33d1c71832b7b7e56ca82b2f19c5df31297657e6
treec4c59283b06b98dcc79f5f0b0f17e1eea0524702
parenta95bdfd22076497288868c028619bc5995f5cc7f
usb: bdc: Adb shows offline after resuming from S2

On Android systems, After temporarily putting device to S2 by
short pressing the power button on the remote, the display turns
off. Then press the power button to turn the display back up. Adb
devices would show the devices is offline. It needs a physical
disconnect of the usb cable or power cycle to bring the device
back online. The device is operational otherwise.

The problem is that during S2 resume, the ADB gadget driver could
not link back with the BDC driver because the endpoint flags were
cleared. The fix is to clear the endpoint flags for the disconnect
case only and not for S2 exit.

Signed-off-by: Al Cooper <alcooperx@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/gadget/udc/bdc/bdc_core.c