]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/usb/dwc2/hcd.c
usb: dwc2: skip L2 state of hcd if controller work in device mode
authorMeng Dongyang <daniel.meng@rock-chips.com>
Wed, 9 Aug 2017 02:34:09 +0000 (10:34 +0800)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 15 Aug 2017 11:18:55 +0000 (14:18 +0300)
commitf367b72c4e08aafacc5267c73299a62ca79635ec
tree206517d2184a19aea83a8efb4a04f43f93235397
parent14a8d4bfc2102f85ce097563d151370c91c1898a
usb: dwc2: skip L2 state of hcd if controller work in device mode

In the case hcd autosuspend is enabled, the hcd will enter L2 state
if no device connected. But if the controller works in otg mode, the
gadget driver still works in L0 state if connected with host. This
may result in transfer fail when gadget enqueue new request but the
hcd driver has set the global state into L2. This patch prevent the
hcd enter L2 state if the controller work in device mode.

Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/hcd.c