diff options
author | Venkat Moganty <vmoganty@nvidia.com> | 2010-08-12 17:08:14 +0530 |
---|---|---|
committer | Gary King <gking@nvidia.com> | 2010-08-24 16:53:56 -0700 |
commit | 04dbd92636bdf1e4652d00d03c7a5a6ebbad8a4c (patch) | |
tree | ad5083d6272392b205c52424108d74b7515f0fbe /drivers | |
parent | 32032b17724fba088c13c2e069f42776e6ce9848 (diff) |
[tegra-ehci] Fix Usb device detection for config USB_SUSPEND
When CONFIG_USB_SUSPEND is enabled USB device detection is not working. This is
due to the wrong API called to resume the hub and HUB resume funtionality not
happening properly. Fixed this by calling the correct API to resume the HUB
driver when auto suspend is called.
Bug 713237
Bug 713966
Change-Id: Ia4d091fd29ea7ebfe5844cf5685fc5a86e66d12a
Reviewed-on: http://git-master/r/4984
Reviewed-by: Abhishek Aggarwal <aaggarwal@nvidia.com>
Tested-by: Abhishek Aggarwal <aaggarwal@nvidia.com>
Reviewed-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/host/ehci-tegra.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index f052a88ec88e..610292a01611 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -35,7 +35,6 @@ #include "nvrm_power.h" #include "nvrm_hardware_access.h" #include "nvddk_usbphy.h" -#include "../core/usb.h" #define TEGRA_USB_ID_INT_ENABLE (1 << 0) #define TEGRA_USB_ID_INT_STATUS (1 << 1) @@ -249,11 +248,9 @@ static void tegra_ehci_irq_work(struct work_struct* irq_work) } } - if (kick_rhub && hcd->rh_registered) { - hcd->poll_rh = 0; - usb_set_device_state (hcd->self.root_hub, USB_STATE_ADDRESS); - hcd->state = HC_STATE_RUNNING; - usb_kick_khubd (hcd->self.root_hub); + if (kick_rhub) { + hcd->state = HC_STATE_SUSPENDED; + usb_hcd_resume_root_hub(hcd); } } @@ -364,6 +361,9 @@ static int tegra_ehci_bus_suspend(struct usb_hcd *hcd) if (ehci->transceiver->state != OTG_STATE_A_HOST) { /* we are not in host mode, return */ return 0; + } else { + ehci->transceiver->state = OTG_STATE_A_SUSPEND; + ehci->host_reinited = 0; } } #endif |