summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPreetham Chandru <pchandru@nvidia.com>2012-07-10 18:42:16 +0530
committerMatthew Pedro <mapedro@nvidia.com>2012-08-20 11:50:04 -0700
commit336961dd3cf9c39456dd9657e8f205718740c797 (patch)
treeba1bece0b9eb39e200b3a4a1dcc55ff5d721ce96
parent4a01065c582513cafa31f7da1acdeca3a6561771 (diff)
usb: gadget: tegra_udc: Enable DR IRQ in udc_starttegra-l4t-r16-rc
Currently dr_controller_run() is called only during otg state change. When we unload a gadget driver, for example g_mass_storage gadget driver, dr_controller_stop() is called but when it is loaded back dr_controller_run() won't get called becasue of the if condition failure. i.e if (!udc->transceiver) { dr_controller_run(udc); } So when the gadget driver is loaded for the second time without removing the cable (i.e without otg state change), the device won't get enumerated on the host because DR IRQs are not enabled. This CL fixes the above issue. Bug 1012787 Signed-off-by: Preetham Chandru <pchandru@nvidia.com> Change-Id: Ia127630e24dbe4c1e418163c2b858efb3baa8e45 Reviewed-on: http://git-master/r/114592 (cherry picked from commit be3e9def273181d1b44c1891de8602faebd719a8) Reviewed-on: http://git-master/r/124283 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
-rw-r--r--drivers/usb/gadget/tegra_udc.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/usb/gadget/tegra_udc.c b/drivers/usb/gadget/tegra_udc.c
index 47e2e97984a4..aad99a6cd66e 100644
--- a/drivers/usb/gadget/tegra_udc.c
+++ b/drivers/usb/gadget/tegra_udc.c
@@ -2274,13 +2274,11 @@ static int tegra_udc_start(struct usb_gadget_driver *driver,
/* Enable DR IRQ reg and Set usbcmd reg Run bit */
- if (!udc->transceiver) {
- dr_controller_run(udc);
- udc->usb_state = USB_STATE_ATTACHED;
- udc->ep0_state = WAIT_FOR_SETUP;
- udc->ep0_dir = 0;
- udc->vbus_active = vbus_enabled(udc);
- }
+ dr_controller_run(udc);
+ udc->usb_state = USB_STATE_ATTACHED;
+ udc->ep0_state = WAIT_FOR_SETUP;
+ udc->ep0_dir = 0;
+ udc->vbus_active = vbus_enabled(udc);
printk(KERN_INFO "%s: bind to driver %s\n",
udc->gadget.name, driver->driver.name);