From patchwork Thu Jun 13 09:10:56 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: 17872 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f200.google.com (mail-qc0-f200.google.com [209.85.216.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BE97625BE0 for ; Thu, 13 Jun 2013 09:11:43 +0000 (UTC) Received: by mail-qc0-f200.google.com with SMTP id n1sf4103858qcx.3 for ; Thu, 13 Jun 2013 02:11:43 -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=Dnk8kDDxl7v8M/ljDVeLr6f1UXN0OOcE5PUg/BrszunucaSmdIdA7sZWRM5RkBwPvt tu66j/S8Kc0dqFJBULD7U3G5x+9mLuZ3plmWFcnkVexfEeAzTm9F9sKyGA6Y1P3CaGt/ sypJuU/g3bZFsTNUyb6S+nPrfrwr406IzmPgnXMMQ80bXFVV+SFNBvARDtNLhj70gR7W W8lGJt4/9QgPOt+6xZGkHNiaqWWpz4OZJheqtZoiIAJVL9R/cYGFjBUqh4DBa0fseDTB p3nthKg7TrW7Vvg/5iCSxTkLM5n7ah8n012DXf2w+8VMH+JCDZXw5UI0JBVYhWVFhi3d 0/sA== X-Received: by 10.224.86.200 with SMTP id t8mr1163815qal.0.1371114703567; Thu, 13 Jun 2013 02:11:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.82.74 with SMTP id g10ls2719308qey.60.gmail; Thu, 13 Jun 2013 02:11:43 -0700 (PDT) X-Received: by 10.52.165.99 with SMTP id yx3mr9428530vdb.34.1371114703421; Thu, 13 Jun 2013 02:11:43 -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 p8si10102640vdv.31.2013.06.13.02.11.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Jun 2013 02:11:43 -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 oz10so7381797veb.19 for ; Thu, 13 Jun 2013 02:11:43 -0700 (PDT) X-Received: by 10.52.36.115 with SMTP id p19mr2818vdj.8.1371114703307; Thu, 13 Jun 2013 02:11:43 -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 gx3csp13564vec; Thu, 13 Jun 2013 02:11:42 -0700 (PDT) X-Received: by 10.68.106.196 with SMTP id gw4mr23637400pbb.126.1371114702151; Thu, 13 Jun 2013 02:11:42 -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 cy3si11325225pbb.248.2013.06.13.02.11.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Jun 2013 02:11:42 -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 md12so9075607pbc.2 for ; Thu, 13 Jun 2013 02:11:41 -0700 (PDT) X-Received: by 10.68.8.68 with SMTP id p4mr24047274pba.168.1371114701762; Thu, 13 Jun 2013 02:11:41 -0700 (PDT) Received: from manjunath-Latitude-E6420.LGE.NET ([203.247.149.152]) by mx.google.com with ESMTPSA id p2sm28451974pag.22.2013.06.13.02.11.36 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Jun 2013 02:11:41 -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 05/10] USB: OHCI: Properly handle ohci-exynos suspend Date: Thu, 13 Jun 2013 14:40:56 +0530 Message-Id: <1371114661-2207-6-git-send-email-manjunath.goudar@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1371114661-2207-1-git-send-email-manjunath.goudar@linaro.org> References: <1371050918-29472-1-git-send-email-manjunath.goudar@linaro.org> <1371114661-2207-1-git-send-email-manjunath.goudar@linaro.org> X-Gm-Message-State: ALoCoQncIJTGil5psIdwUHJ+eSqx/z7aWw4C5LWu5FPala7RQBTxVWmXg3B3jn9smqBYW9O3i7ZJ 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