From patchwork Wed Jun 12 15:28:36 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: 17847 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DDEEF23903 for ; Wed, 12 Jun 2013 15:29:29 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id jz10sf10149974veb.1 for ; Wed, 12 Jun 2013 08:29:29 -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=N3+uCY214oAT0E2fpH3T2qsRwDSd8ArRWg32v9w/VXE=; b=UZuCHgankJhKBxrdu1QcUCrCI5XzlbZAolT5FiZNWzskvlj/xI6tVU1wBybd+gllTA F00G6DGHr5d6/pTZFu/KvTQ/EF/KhUTiVb3WhG0ulEHVRhwYP1s8E88gJ/nHLlevcH4U nJcYar3McG14J3HDKBzG2TmephWlG0RTyul1iHC6ONx6NtHH8MOC6Ahc2b4HlPO3HJCh 49p3mjaUW1xw8Gy6wWpp6UOiMuuBjCWc1pUBiTA9L+tAATjeFptWnB1lMlivjgZac9no bVxj6+x9qXHui3N3BYUBk3e7yD4ZWWopIt0pnGZxzLBb7MnIDpHPO2uVz/FrxyzLGBQs ja7A== X-Received: by 10.224.53.198 with SMTP id n6mr14096901qag.2.1371050969415; Wed, 12 Jun 2013 08:29:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.110.194 with SMTP id ic2ls3747407qeb.36.gmail; Wed, 12 Jun 2013 08:29:29 -0700 (PDT) X-Received: by 10.52.97.37 with SMTP id dx5mr8360926vdb.23.1371050969069; Wed, 12 Jun 2013 08:29:29 -0700 (PDT) Received: from mail-ve0-x234.google.com (mail-ve0-x234.google.com [2607:f8b0:400c:c01::234]) by mx.google.com with ESMTPS id sz6si8800606vdc.23.2013.06.12.08.29.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Jun 2013 08:29:29 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::234 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::234; Received: by mail-ve0-f180.google.com with SMTP id pa12so6879505veb.11 for ; Wed, 12 Jun 2013 08:29:28 -0700 (PDT) X-Received: by 10.52.155.67 with SMTP id vu3mr8472989vdb.94.1371050968904; Wed, 12 Jun 2013 08:29: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 gx3csp148678vec; Wed, 12 Jun 2013 08:29:28 -0700 (PDT) X-Received: by 10.68.14.6 with SMTP id l6mr20581640pbc.202.1371050967916; Wed, 12 Jun 2013 08:29:27 -0700 (PDT) Received: from mail-pa0-x22b.google.com (mail-pa0-x22b.google.com [2607:f8b0:400e:c03::22b]) by mx.google.com with ESMTPS id qu10si9696055pbc.162.2013.06.12.08.29.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Jun 2013 08:29:27 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400e:c03::22b is neither permitted nor denied by best guess record for domain of manjunath.goudar@linaro.org) client-ip=2607:f8b0:400e:c03::22b; Received: by mail-pa0-f43.google.com with SMTP id hz11so6037396pad.16 for ; Wed, 12 Jun 2013 08:29:27 -0700 (PDT) X-Received: by 10.66.21.37 with SMTP id s5mr18001084pae.103.1371050967414; Wed, 12 Jun 2013 08:29:27 -0700 (PDT) Received: from localhost.localdomain ([223.239.143.110]) by mx.google.com with ESMTPSA id ri8sm19557052pbc.3.2013.06.12.08.29.23 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Jun 2013 08:29:26 -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 08/10] USB: OHCI: Properly handle ohci-pxa27x suspend Date: Wed, 12 Jun 2013 20:58:36 +0530 Message-Id: <1371050918-29472-9-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: ALoCoQlzadMYcRuE90jQ8Gx3xG8RVoiTXQotw6GrAnty5KrKWX7cmsiZyYgPUiWfhNGK7Ltgp02+ X-Original-Sender: manjunath.goudar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::234 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-pxa27x glue was not properly handled as it was not suspending generic part of ohci controller.Calling explicitly the ohci_suspend() routine in ohci_hcd_pxa27x_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-pxa27x.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c index 3a9c01d..9dbfeb8 100644 --- a/drivers/usb/host/ohci-pxa27x.c +++ b/drivers/usb/host/ohci-pxa27x.c @@ -564,13 +564,17 @@ static int ohci_hcd_pxa27x_drv_suspend(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); struct pxa27x_ohci *ohci = to_pxa27x_ohci(hcd); + bool do_wakeup = device_may_wakeup(dev); + int ret; if (time_before(jiffies, ohci->ohci.next_statechange)) msleep(5); ohci->ohci.next_statechange = jiffies; + ret = ohci_suspend(hcd, do_wakeup); + pxa27x_stop_hc(ohci, dev); - return 0; + return ret; } static int ohci_hcd_pxa27x_drv_resume(struct device *dev)