From patchwork Thu Jun 13 09:10:53 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: 17869 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f198.google.com (mail-ye0-f198.google.com [209.85.213.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9E60325BE0 for ; Thu, 13 Jun 2013 09:11:28 +0000 (UTC) Received: by mail-ye0-f198.google.com with SMTP id m13sf9634326yen.9 for ; Thu, 13 Jun 2013 02:11:28 -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=YcdkA2XFG9Y89zutcbeECv6jm/fRKqIXDoX8fwbWkI8=; b=Du57UWDFqNUlfVSwKZXAhmQm79kcxtn8mvmfxIe78VCZXyz9WteL2KGmnmRytZF3aV m3rh9TZmwaLp8gWsLY7/NNimdEIa78v40FUM1P5ja1B+vYTewWjW0aGgTCnpYLmIo1I5 NP4ozTkto7EP1SuMrkYcSBeJcH0qEO2BENZil/kewoDybaPuaZ0kFzqsFGW9VylE0+D0 c3nzHVkD8RFj8lbfxHIYoUsRDKhJzElB4mwjfgvrQnEg7V71X6coAt+IA9hGX2hdvD5s J+GTEQjO/XOkKkDfIlmrs9psHPRfFnfetrzxcr754/lfbVyXRkR5TIueyx3xWIrN402o Yr3w== X-Received: by 10.224.129.196 with SMTP id p4mr1153528qas.6.1371114688368; Thu, 13 Jun 2013 02:11:28 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.40.131 with SMTP id x3ls3750608qek.40.gmail; Thu, 13 Jun 2013 02:11:28 -0700 (PDT) X-Received: by 10.221.7.67 with SMTP id on3mr11011918vcb.70.1371114688220; Thu, 13 Jun 2013 02:11:28 -0700 (PDT) Received: from mail-vb0-x232.google.com (mail-vb0-x232.google.com [2607:f8b0:400c:c02::232]) by mx.google.com with ESMTPS id zt2si10107449vdb.11.2013.06.13.02.11.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Jun 2013 02:11:28 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::232 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:c02::232; Received: by mail-vb0-f50.google.com with SMTP id w16so6741957vbb.23 for ; Thu, 13 Jun 2013 02:11:28 -0700 (PDT) X-Received: by 10.58.100.234 with SMTP id fb10mr2646veb.5.1371114688100; Thu, 13 Jun 2013 02:11:28 -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 gx3csp13552vec; Thu, 13 Jun 2013 02:11:27 -0700 (PDT) X-Received: by 10.68.232.42 with SMTP id tl10mr23695352pbc.72.1371114687078; Thu, 13 Jun 2013 02:11:27 -0700 (PDT) Received: from mail-pa0-x22f.google.com (mail-pa0-x22f.google.com [2607:f8b0:400e:c03::22f]) by mx.google.com with ESMTPS id oo1si11355464pbb.59.2013.06.13.02.11.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Jun 2013 02:11:27 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400e:c03::22f is neither permitted nor denied by best guess record for domain of manjunath.goudar@linaro.org) client-ip=2607:f8b0:400e:c03::22f; Received: by mail-pa0-f47.google.com with SMTP id kl14so4527401pab.20 for ; Thu, 13 Jun 2013 02:11:26 -0700 (PDT) X-Received: by 10.68.211.73 with SMTP id na9mr24006005pbc.90.1371114686502; Thu, 13 Jun 2013 02:11:26 -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.21 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Jun 2013 02:11:25 -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 02/10] USB: OHCI: Properly handle ohci-s3c2410 suspend Date: Thu, 13 Jun 2013 14:40:53 +0530 Message-Id: <1371114661-2207-3-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: ALoCoQklq5OHZf47OljkBKZUhElOl6xr3+1klRi48XhPatBM5NEpqXDDxZpwLSvFKjbw0VPvWsJr X-Original-Sender: manjunath.goudar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::232 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-s3c2410 glue was not properly handled as it was not suspending generic part of ohci controller.Calling explicitly the ohci_suspend() routine in ohci_hcd_s3c2410_drv_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-s3c2410.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c index 8018bb1..01430f2 100644 --- a/drivers/usb/host/ohci-s3c2410.c +++ b/drivers/usb/host/ohci-s3c2410.c @@ -430,7 +430,15 @@ static int ohci_hcd_s3c2410_drv_suspend(struct device *dev) struct platform_device *pdev = to_platform_device(dev); unsigned long flags; int rc = 0; + bool do_wakeup = device_may_wakeup(dev); + 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