From patchwork Thu Apr 10 10:28:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 3962001 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 144CCBFF02 for ; Thu, 10 Apr 2014 10:29:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 51F2E20611 for ; Thu, 10 Apr 2014 10:29:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 277BA204F6 for ; Thu, 10 Apr 2014 10:29:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935238AbaDJK2O (ORCPT ); Thu, 10 Apr 2014 06:28:14 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:56038 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934403AbaDJK2L (ORCPT ); Thu, 10 Apr 2014 06:28:11 -0400 Received: by mail-pd0-f177.google.com with SMTP id y10so3655305pdj.8 for ; Thu, 10 Apr 2014 03:28:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=lGB4RChUifLmCaj01ytFRf2cQ8FqElH1qSpr1QECcrE=; b=ht5xPmS7K6Ksd5HfaPZgEml+532N7ysRwf12HjEDqJF80cTa0AsLIUwKmcTDEMJ5Le 8mcr6hkCvIoLi7mBZBdIoMMpZzqefjt7Oumn0aV3G7UB19Z8a7kc5SXuUV2M3yZPyxIX sbW5nXPy5+JJx+fyUFbyaG3csrdSCEY2f6Y/56zvXt7peS7PqWX0KwfbyEe4/hyiorhK 1dTERSni7ZPXza2ExP/g2CYSh81JyNPkpHOSteEXO1MRsC9ZxBbOhfbYMGik0qPpox4C Y4Km9VmxZTwRLC0Iq0qn8Pzv64igsB0kevrDn61YAI8Wm9phGWqhsQrkTY0xxeQAFPk2 ovdQ== X-Received: by 10.66.189.226 with SMTP id gl2mr18611168pac.65.1397125690410; Thu, 10 Apr 2014 03:28:10 -0700 (PDT) Received: from vivek-linuxpc.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id ph1sm18644652pac.14.2014.04.10.03.28.07 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Apr 2014 03:28:09 -0700 (PDT) From: Vivek Gautam To: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, kgene.kim@samsung.com, jg1.han@samsung.com, Alan Stern Subject: [PATCH v2 1/2] usb: ehci-exynos: Return immediately from suspend if ehci_suspend fails Date: Thu, 10 Apr 2014 15:58:01 +0530 Message-Id: <1397125682-4955-1-git-send-email-gautam.vivek@samsung.com> X-Mailer: git-send-email 1.7.10.4 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Patch 'b8efdaf USB: EHCI: add check for wakeup/suspend race' adds a check for possible race between suspend and wakeup interrupt, and thereby it returns -EBUSY as error code if there's a wakeup interrupt. So the platform host controller should not proceed further with its suspend callback, rather should return immediately to avoid powering down the essential things, like phy. Signed-off-by: Vivek Gautam Acked-by: Jingoo Han Cc: Alan Stern Acked-by: Alan Stern --- Changes from v1: -- Removed unnecessary change 'return 0' drivers/usb/host/ehci-exynos.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c index d1d8c47..7f425ac 100644 --- a/drivers/usb/host/ehci-exynos.c +++ b/drivers/usb/host/ehci-exynos.c @@ -212,6 +212,8 @@ static int exynos_ehci_suspend(struct device *dev) int rc; rc = ehci_suspend(hcd, do_wakeup); + if (rc) + return rc; if (exynos_ehci->otg) exynos_ehci->otg->set_host(exynos_ehci->otg, &hcd->self);