tegra: usb: host: Fix the race condition in hub control
vjagadish [Mon, 5 Mar 2012 13:44:58 +0000 (18:44 +0530)]
Fix the race condition in tegra_ehci_hub_control which
is causing the usb not to work on usb instance 1.

Bug 948702

Change-Id: I3e8c7ecc90ee1ec96642292f9a83b09c413e9400
Signed-off-by: vjagadish <vjagadish@nvidia.com>
Reviewed-on: http://git-master/r/89002
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

drivers/usb/host/ehci-tegra.c

index d1ac46c..168015d 100644 (file)
@@ -326,6 +326,7 @@ static int tegra_ehci_hub_control(
        if (tegra->phy->instance == 0 &&
           (typeReq == SetPortFeature && wValue == USB_PORT_FEAT_RESET)) {
                spin_unlock_irqrestore(&ehci->lock, flags);
+               mutex_unlock(&tegra->tegra_ehci_hcd_mutex);
                return tegra_ehci_internal_port_reset(ehci, status_reg);
        }