From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavankumar Kondeti Subject: [PATCH 7/7] USB: OTG: msm: Clear in_lpm flag before enabling the IRQ in resume Date: Fri, 29 Apr 2011 10:42:55 +0530 Message-ID: <1304053975-1960-7-git-send-email-pkondeti@codeaurora.org> References: <1303977501-17115-1-git-send-email-pkondeti@codeaurora.org> <1304053975-1960-1-git-send-email-pkondeti@codeaurora.org> Return-path: Received: from wolverine01.qualcomm.com ([199.106.114.254]:22807 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751674Ab1D2FNU (ORCPT ); Fri, 29 Apr 2011 01:13:20 -0400 In-Reply-To: <1304053975-1960-1-git-send-email-pkondeti@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: greg@kroah.com, linux-usb@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, Pavankumar Kondeti The current code is clearing in_lpm flag after enabling the IRQ. If IRQ comes immediately before in_lpm flag is set, it thinks that hardware is in low power mode and disables the IRQ. Fix this by clearing in_lpm flag before enabling the IRQ. Signed-off-by: Pavankumar Kondeti --- drivers/usb/otg/msm_otg.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/otg/msm_otg.c b/drivers/usb/otg/msm_otg.c index 2965986..f58b7da 100644 --- a/drivers/usb/otg/msm_otg.c +++ b/drivers/usb/otg/msm_otg.c @@ -389,14 +389,14 @@ skip_phy_resume: if (bus) set_bit(HCD_FLAG_HW_ACCESSIBLE, &(bus_to_hcd(bus))->flags); + atomic_set(&motg->in_lpm, 0); + if (motg->async_int) { motg->async_int = 0; pm_runtime_put(otg->dev); enable_irq(motg->irq); } - atomic_set(&motg->in_lpm, 0); - dev_info(otg->dev, "USB exited from low power mode\n"); return 0; -- Sent by a consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.