From: Anand Gadiyar <gadiyar@ti.com>
Date: Sat, 21 Feb 2009 23:31:40 +0000 (-0800)
Subject: USB: musb: resume suspended root hub on disconnect
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5c23c9078f8e3476982409b1075b54c8cd65e82c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git

USB: musb: resume suspended root hub on disconnect

If this is not done, khubd will not be informed of the disconnect
and will assume the device is still there.

Easily seen when a hub is connected with no device attached to it;
it will autosuspend.  When the hub is disconnected, it still shows
up in /proc/bus/usb/devices

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index b120fdcd8894..60cbaec1aa41 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -767,6 +767,7 @@ static irqreturn_t musb_stage2_irq(struct musb *musb, u8 int_usb,
 #ifdef CONFIG_USB_MUSB_HDRC_HCD
 		case OTG_STATE_A_HOST:
 		case OTG_STATE_A_SUSPEND:
+			usb_hcd_resume_root_hub(musb_to_hcd(musb));
 			musb_root_disconnect(musb);
 			if (musb->a_wait_bcon != 0)
 				musb_platform_try_idle(musb, jiffies