summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorVenkat Moganty <vmoganty@nvidia.com>2010-04-15 11:06:12 +0530
committerGary King <gking@nvidia.com>2010-04-15 14:06:37 -0700
commit111d4f4aa9a176187a00ec619481bcbab1eeb1c0 (patch)
tree1ba9c09b84ce7b394ac69e8358c900993bf4797a /drivers
parent189f352462e8963d9decb872f2acdfb45f7d29c2 (diff)
fsl udc:Fix USB disconnect notification in OTG
In OTG mode, when USB cable is removed cable disconnect notification is not sent to the client driver. Hence at application layer, UI shows up USB cable connection notification even USB cable is removed. With this fix disconnect notification is going to the client driver and UI removes the USB notification on USB cable removal. Tested on android/whistler Bug 668692: USB cable is removed, but does not appear in notification. Change-Id: I06d5a288873a2a8d7d109c5109b9dfd0c08fd1ee Reviewed-on: http://git-master/r/1112 Reviewed-by: Gary King <gking@nvidia.com> Tested-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'drivers')
-rwxr-xr-xdrivers/usb/gadget/fsl_udc_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c
index 48dcbd19cae1..23429f576199 100755
--- a/drivers/usb/gadget/fsl_udc_core.c
+++ b/drivers/usb/gadget/fsl_udc_core.c
@@ -1819,8 +1819,6 @@ static void fsl_udc_restart(struct fsl_udc *udc)
{
/* setup the controller in the device mode */
dr_controller_setup(udc);
- /* Reset all internal used Queues */
- reset_queues(udc);
/* setup EP0 for setup packet */
ep0_setup(udc);
/* start the controller */
@@ -1865,6 +1863,8 @@ static irqreturn_t fsl_udc_irq(int irq, void *_udc)
if (udc->vbus_active) {
/* If cable disconnected, cancel any delayed work */
cancel_delayed_work(&udc->work);
+ /* Reset all internal Queues and inform client driver */
+ reset_queues(udc);
/* stop the controller and turn off the clocks */
dr_controller_stop(udc);
platform_udc_clk_suspend();