]> www.infradead.org Git - users/dwmw2/linux.git/commit
usb: dwc2: gadget: move gadget resume after the core is in L0 state
authorFabrice Gasnier <fabrice.gasnier@st.com>
Thu, 23 Apr 2020 11:55:53 +0000 (13:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:48:54 +0000 (17:48 +0200)
commit48f9d772d66d55cbda28b23d103fbf4c583af7d1
tree3bfafa87bed3f7b15a0e07df4a0939e535273598
parent05c3b2314a7141898b95b11ba8dc40038090f381
usb: dwc2: gadget: move gadget resume after the core is in L0 state

[ Upstream commit 8c935deacebb8fac8f41378701eb79d12f3c2e2d ]

When the remote wakeup interrupt is triggered, lx_state is resumed from L2
to L0 state. But when the gadget resume is called, lx_state is still L2.
This prevents the resume callback to queue any request. Any attempt
to queue a request from resume callback will result in:
- "submit request only in active state" debug message to be issued
- dwc2_hsotg_ep_queue() returns -EAGAIN

Call the gadget resume routine after the core is in L0 state.

Fixes: f81f46e1f530 ("usb: dwc2: implement hibernation during bus suspend/resume")
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/dwc2/core_intr.c