From patchwork Fri Oct 17 08:10:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 38845 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 90EB520C5D for ; Fri, 17 Oct 2014 08:14:36 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id d1sf257404wiv.2 for ; Fri, 17 Oct 2014 01:14:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=eZCgvfAQqYTS1jvFnZ0TUyner/28X53aH56Tt9Roi08=; b=K2qoPGxF2NqbuWtn5D9EXlhjjSkn8m5Gohq0eVzWedULFsn/QTVwwV0T4aXHAHnMTP 2vQX0zCHLvwTSBxDWMcIWVQhKzMGYf2hOIWWu/JQLD30UIbpa+ClrU1bHQCxFQYq+j/J oGqdAz4BFdVFKZiGvG+mo5uzD4XpvXWy9zb61hOW9W6wbdsXYITwREJzKCmSVMTUJ1Hs xyEDiqmJ1khBDubYu9UC5yQWRQTh/T+M5mwuUTQNMxuCgTCxh4Rbv371P5SiRs7S00oG V6eLPhMuQGFzdYr1iaEXw3ce5vTl7KMA+XQWpYHLrJd8l8HBz6ghxpbIQua+M3ha77gy jK5g== X-Gm-Message-State: ALoCoQlNavijBBmi0BnDPMajXFTXKjNuksajpMtMUpfL6wO4lbxak7iwsTAV6P++yGN+IFvi79F9 X-Received: by 10.152.26.72 with SMTP id j8mr1109352lag.3.1413533675809; Fri, 17 Oct 2014 01:14:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.197.34 with SMTP id ir2ls241164lac.7.gmail; Fri, 17 Oct 2014 01:14:35 -0700 (PDT) X-Received: by 10.152.20.98 with SMTP id m2mr7081057lae.59.1413533675700; Fri, 17 Oct 2014 01:14:35 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id i9si839403lag.115.2014.10.17.01.14.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Oct 2014 01:14:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by mail-lb0-f182.google.com with SMTP id z11so263267lbi.13 for ; Fri, 17 Oct 2014 01:14:35 -0700 (PDT) X-Received: by 10.152.120.200 with SMTP id le8mr6836676lab.67.1413533675623; Fri, 17 Oct 2014 01:14:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp184370lbz; Fri, 17 Oct 2014 01:14:34 -0700 (PDT) X-Received: by 10.70.63.9 with SMTP id c9mr6985428pds.104.1413533628688; Fri, 17 Oct 2014 01:13:48 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1si482018pdp.169.2014.10.17.01.13.48 for ; Fri, 17 Oct 2014 01:13:48 -0700 (PDT) Received-SPF: none (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753484AbaJQIN1 (ORCPT + 1 other); Fri, 17 Oct 2014 04:13:27 -0400 Received: from cantor2.suse.de ([195.135.220.15]:36352 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753703AbaJQINC (ORCPT ); Fri, 17 Oct 2014 04:13:02 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BD72FADF5; Fri, 17 Oct 2014 08:11:57 +0000 (UTC) Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.83) (envelope-from ) id 1Xf2dg-0000IW-06; Fri, 17 Oct 2014 10:11:56 +0200 From: Jiri Slaby To: stable@vger.kernel.org Cc: Felipe Balbi , Jiri Slaby Subject: [PATCH 3.12 122/197] usb: dwc3: core: fix ordering for PHY suspend Date: Fri, 17 Oct 2014 10:10:38 +0200 Message-Id: <3a6e005e366f8b2e0f52e31e0b0a10ddbcc28d11.1413533329.git.jslaby@suse.cz> X-Mailer: git-send-email 2.1.1 In-Reply-To: <7d97f39bc813aa9f11fe03d602885f81de07007c.1413533329.git.jslaby@suse.cz> References: <7d97f39bc813aa9f11fe03d602885f81de07007c.1413533329.git.jslaby@suse.cz> In-Reply-To: References: Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Felipe Balbi 3.12-stable review patch. If anyone has any objections, please let me know. =============== commit dc99f16f076559235c92d3eb66d03d1310faea08 upstream. We can't suspend the PHYs before dwc3_core_exit_mode() has been called, that's because the host and/or device sides might still need to communicate with the far end link partner. Fixes: 8ba007a (usb: dwc3: core: enable the USB2 and USB3 phy in probe) Suggested-by: Alan Stern Signed-off-by: Felipe Balbi Signed-off-by: Jiri Slaby --- drivers/usb/dwc3/core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 3ff8bba6503b..6adf845fe3a0 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -581,9 +581,6 @@ static int dwc3_remove(struct platform_device *pdev) { struct dwc3 *dwc = platform_get_drvdata(pdev); - usb_phy_set_suspend(dwc->usb2_phy, 1); - usb_phy_set_suspend(dwc->usb3_phy, 1); - dwc3_debugfs_exit(dwc); switch (dwc->dr_mode) { @@ -604,6 +601,10 @@ static int dwc3_remove(struct platform_device *pdev) dwc3_event_buffers_cleanup(dwc); dwc3_free_event_buffers(dwc); + + usb_phy_set_suspend(dwc->usb2_phy, 1); + usb_phy_set_suspend(dwc->usb3_phy, 1); + dwc3_core_exit(dwc); pm_runtime_put_sync(&pdev->dev);