From patchwork Wed Jun 12 15:28:29 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: 17840 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BF2C523903 for ; Wed, 12 Jun 2013 15:29:01 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id f73sf3385036yha.6 for ; Wed, 12 Jun 2013 08:29:01 -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=sBTk8YyVrcY6q99+9+u7f1Wvz0wNQkici9abbCr7fKI=; b=ah+K87Ggmqhbe1AXWgOgDZueQ2C3JZq9ee1KzZg8Qj5y2wnrEIuO5FfB04RQaUqLNM UYIq0cRYwTvMFVYrCs6Ru8X+ZSUlmPJUyssg2zRluob30ozL/KtCSiZ4bHSU2diHfl4O fExnsQwA+p6vjNFFxh3z6p9vSjpcDPxH+rfklMMHd5BOoysnVMZo+vVe17mWs5PzI7m6 W/2SJ0aPl5Fey4JlFs5AtCB5gYBeaocOg/5T9LsiX725yteX7xuWJm35B1NvMYqHQMnQ beeY/HV7axAyC/y++w1Fbk6bNcUtMXhzRs+oJolz12rsefAZqUnuD7wcgnLhiwErZLV/ WQtQ== X-Received: by 10.236.14.233 with SMTP id d69mr11567568yhd.51.1371050941243; Wed, 12 Jun 2013 08:29:01 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.117.231 with SMTP id kh7ls1166864qeb.26.gmail; Wed, 12 Jun 2013 08:29:00 -0700 (PDT) X-Received: by 10.220.94.1 with SMTP id x1mr9837950vcm.12.1371050940766; Wed, 12 Jun 2013 08:29:00 -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 sz6si8794164vdc.49.2013.06.12.08.29.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Jun 2013 08:29:00 -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 w16so6213234vbb.9 for ; Wed, 12 Jun 2013 08:29:00 -0700 (PDT) X-Received: by 10.220.185.136 with SMTP id co8mr9890521vcb.25.1371050940647; Wed, 12 Jun 2013 08:29:00 -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 gx3csp148656vec; Wed, 12 Jun 2013 08:29:00 -0700 (PDT) X-Received: by 10.68.136.37 with SMTP id px5mr20344075pbb.62.1371050939675; Wed, 12 Jun 2013 08:28:59 -0700 (PDT) Received: from mail-pd0-f180.google.com (mail-pd0-f180.google.com [209.85.192.180]) by mx.google.com with ESMTPS id ye10si11805723pab.299.2013.06.12.08.28.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Jun 2013 08:28:59 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.180 is neither permitted nor denied by best guess record for domain of manjunath.goudar@linaro.org) client-ip=209.85.192.180; Received: by mail-pd0-f180.google.com with SMTP id 10so10071660pdi.39 for ; Wed, 12 Jun 2013 08:28:59 -0700 (PDT) X-Received: by 10.68.200.133 with SMTP id js5mr10686379pbc.22.1371050938961; Wed, 12 Jun 2013 08:28:58 -0700 (PDT) Received: from localhost.localdomain ([223.239.143.110]) by mx.google.com with ESMTPSA id ri8sm19557052pbc.3.2013.06.12.08.28.55 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Jun 2013 08:28:58 -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 01/10] USB: OHCI: Properly handle ohci-at91 suspend Date: Wed, 12 Jun 2013 20:58:29 +0530 Message-Id: <1371050918-29472-2-git-send-email-manjunath.goudar@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1371050918-29472-1-git-send-email-manjunath.goudar@linaro.org> References: <1371050918-29472-1-git-send-email-manjunath.goudar@linaro.org> X-Gm-Message-State: ALoCoQmVaJnCOOkgu1rNmvLiTdqh9CxhZkLcp4MrqT9R62I2myBdyOE6sZw7tonRcFHg4IHmTjqN 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-at91 glue was not properly handled as it was not suspending generic part of ohci controller. Calling explicitly the ohci_suspend()routine in ohci_hcd_at91_drv_suspend() will ensure proper handling of suspend scenario. Signed-off-by: Manjunath Goudar Cc: Arnd Bergmann Cc: Alan Stern Cc: Greg KH Cc: linux-usb@vger.kernel.org --- drivers/usb/host/ohci-at91.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index fb2f127..28400a7 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c @@ -619,8 +619,12 @@ ohci_hcd_at91_drv_suspend(struct platform_device *pdev, pm_message_t mesg) { struct usb_hcd *hcd = platform_get_drvdata(pdev); struct ohci_hcd *ohci = hcd_to_ohci(hcd); + bool do_wakeup = device_may_wakeup(&pdev->dev); + int ret; - if (device_may_wakeup(&pdev->dev)) + ret = ohci_suspend(hcd, do_wakeup); + + if (do_wakeup) enable_irq_wake(hcd->irq); /* @@ -637,7 +641,7 @@ ohci_hcd_at91_drv_suspend(struct platform_device *pdev, pm_message_t mesg) at91_stop_clock(); } - return 0; + return ret; } static int ohci_hcd_at91_drv_resume(struct platform_device *pdev)