On Mon, Nov 17, 2014 at 5:14 AM, Kever Yang <kever.yang@xxxxxxxxxxxxxx> wrote:I add bus->root_hub check because the _dwc2_hcd_start check this before it
After we implement the bus_suspend/resume, auto suspend id enabled.What is bus->root_hub checking for? Is there any chance that this
The root hub will be auto suspend if there is no device connected,
we need to resume the root hub when a device connect detect.
This patch tested on rk3288.
Signed-off-by: Roy Li <roy.li@xxxxxxxxxxxxxx>
Signed-off-by: Kever Yang <kever.yang@xxxxxxxxxxxxxx>
---
drivers/usb/dwc2/hcd_intr.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/usb/dwc2/hcd_intr.c b/drivers/usb/dwc2/hcd_intr.c
index 551ba87..c8299fd 100644
--- a/drivers/usb/dwc2/hcd_intr.c
+++ b/drivers/usb/dwc2/hcd_intr.c
@@ -355,6 +355,13 @@ static void dwc2_port_intr(struct dwc2_hsotg *hsotg)
hprt0_modify |= HPRT0_CONNDET;
/*
+ * Check if root hub is in suspend state
+ * if root hub in suspend, resume it.
+ */
+ if ((bus->root_hub) && (hcd->state == HC_STATE_SUSPENDED))
could be NULL here?
Yes, this fix the problem Doug reported with my dwc2 hcd suspend/resume patch.
+ usb_hcd_resume_root_hub(hcd);Seems sensible in general. Does this actually fix the problem Doug was
+
+ /*
* The Hub driver asserts a reset when it sees port connect
* status change flag
*/
--
1.9.1
reporting?