From patchwork Thu Jun 13 09:16:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: manjunath.goudar@linaro.org X-Patchwork-Id: 17882 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-bk0-f71.google.com (mail-bk0-f71.google.com [209.85.214.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1FDBD25BE0 for ; Thu, 13 Jun 2013 09:17:10 +0000 (UTC) Received: by mail-bk0-f71.google.com with SMTP id ik8sf6480923bkc.10 for ; Thu, 13 Jun 2013 02:17:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=NHnZgXRYiLN/BZpG2cap3vpQM5FrALNaP4WSk0A4iiM=; b=bM1cYylFKSRc7mq3zh9sF5dsIXsrvNw+4k0KQhHr+k8xxKRQ/8BMIbXj6CDg5ZRnji QDHWi1deT1SCNGFUhWnJObsmJtDYegV79djVQyns8JIznMp86KH7IjuExbw8AH90AJmp MMBBUstKCT0hc6GBMrIGLjZ2Mfrc8/jFbRxBgcvCO5h5O+d2a9smcNoYINT6dCrDzDGT 7Ua0b5KNCOB/XpgLFLzeMI+Rz3n5/SbNrcHelP2G07dvygnPcTgjAfRl2kCAvhECyJg6 rfMbF2dHMClGUHDa4yWPc1LYJvX7hlCnNQ9jBwpKOdYcXD//a+/rT5OKpe2GLZK4da8L RXrg== X-Received: by 10.180.11.239 with SMTP id t15mr5855381wib.3.1371115029184; Thu, 13 Jun 2013 02:17:09 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.109.136 with SMTP id hs8ls383165wib.37.gmail; Thu, 13 Jun 2013 02:17:09 -0700 (PDT) X-Received: by 10.180.188.97 with SMTP id fz1mr6889756wic.34.1371115029062; Thu, 13 Jun 2013 02:17:09 -0700 (PDT) Received: from mail-ve0-x22e.google.com (mail-ve0-x22e.google.com [2607:f8b0:400c:c01::22e]) by mx.google.com with ESMTPS id fy5si8413145wib.45.2013.06.13.02.17.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Jun 2013 02:17:09 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::22e is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::22e; Received: by mail-ve0-f174.google.com with SMTP id oz10so7385384veb.19 for ; Thu, 13 Jun 2013 02:17:08 -0700 (PDT) X-Received: by 10.59.2.199 with SMTP id bq7mr10923867ved.51.1371115027981; Thu, 13 Jun 2013 02:17:07 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.191.99 with SMTP id gx3csp13736vec; Thu, 13 Jun 2013 02:17:07 -0700 (PDT) X-Received: by 10.66.117.98 with SMTP id kd2mr1841037pab.160.1371115026834; Thu, 13 Jun 2013 02:17:06 -0700 (PDT) Received: from mail-pb0-x22b.google.com (mail-pb0-x22b.google.com [2607:f8b0:400e:c01::22b]) by mx.google.com with ESMTPS id qu10si11338724pbc.222.2013.06.13.02.17.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Jun 2013 02:17:06 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400e:c01::22b is neither permitted nor denied by best guess record for domain of manjunath.goudar@linaro.org) client-ip=2607:f8b0:400e:c01::22b; Received: by mail-pb0-f43.google.com with SMTP id md12so9136983pbc.16 for ; Thu, 13 Jun 2013 02:17:06 -0700 (PDT) X-Received: by 10.66.27.3 with SMTP id p3mr1964274pag.68.1371115026433; Thu, 13 Jun 2013 02:17:06 -0700 (PDT) Received: from manjunath-Latitude-E6420.LGE.NET ([203.247.149.152]) by mx.google.com with ESMTPSA id dc3sm22602113pbc.9.2013.06.13.02.17.01 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Jun 2013 02:17:05 -0700 (PDT) From: Manjunath Goudar To: linux-usb@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, patches@linaro.org, stern@rowland.harvard.edu, arnd@linaro.org, manjunath.goudar@linaro.org, linaro-dev@lists.linaro.org, Arnd Bergmann , Greg KH Subject: [PATCH V2 05/10] USB: OHCI: Properly handle ohci-exynos suspend Date: Thu, 13 Jun 2013 14:46:24 +0530 Message-Id: <1371114989-2342-6-git-send-email-manjunath.goudar@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1371114989-2342-1-git-send-email-manjunath.goudar@linaro.org> References: <1371050918-29472-1-git-send-email-manjunath.goudar@linaro.org> <1371114989-2342-1-git-send-email-manjunath.goudar@linaro.org> X-Gm-Message-State: ALoCoQl39HaZkpHTnLa34y9kfnhIxFLY6TawHnauxa3AXH/eGeiZzqtu+4uYlRvAyKfB7Pg+Inze X-Original-Sender: manjunath.goudar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::22e is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Suspend scenario in case of ohci-exynos glue was not properly handled as it was not suspending generic part of ohci controller.Calling explicitly the ohci_suspend() routine in exynos_ohci_suspend() will ensure proper handling of suspend scenario. V2: -Incase ohci_suspend() fails, return right away without executing further. Signed-off-by: Manjunath Goudar Cc: Arnd Bergmann Cc: Alan Stern Cc: Greg KH Cc: linux-usb@vger.kernel.org --- drivers/usb/host/ohci-exynos.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c index 6ff830c..8fecb6a 100644 --- a/drivers/usb/host/ohci-exynos.c +++ b/drivers/usb/host/ohci-exynos.c @@ -203,9 +203,17 @@ static int exynos_ohci_suspend(struct device *dev) struct exynos_ohci_hcd *exynos_ohci = to_exynos_ohci(hcd); struct ohci_hcd *ohci = hcd_to_ohci(hcd); struct platform_device *pdev = to_platform_device(dev); + bool do_wakeup = device_may_wakeup(dev); unsigned long flags; int rc = 0; + rc = ohci_suspend(hcd, do_wakeup); + if (rc == 0 && do_wakeup && HCD_WAKEUP_PENDING(hcd)) { + ohci_resume(hcd, false); + rc = -EBUSY; + } + if (rc) + return rc; /* * Root hub was already suspended. Disable irq emission and * mark HW unaccessible, bail out if RH has been resumed. Use