From patchwork Fri Oct 17 17:09:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 38911 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8C462202DB for ; Fri, 17 Oct 2014 17:10:46 +0000 (UTC) Received: by mail-wi0-f198.google.com with SMTP id hi2sf787877wib.9 for ; Fri, 17 Oct 2014 10:10:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=BPSxGj5/T/Qg80LcfHT+/CTG4D8w06UwApLUChN1KQE=; b=E3GspJ3BR6xzqQTU1MWumuh4goEm4PzrfNdTVD9EjKnHvFIT6otCLsCB0PALKvoshu +w9Y7zTSlqDtuJDly4OLaC+H7BzP6TaywXN0qorn+m95kIqNsKR4L9TLwiSIEim+Fa9Q J/TPwdTrdAMv2WXUpuPtvdoux+ucR/dWoIT28IbtHCq2iZPWQUxca3KvVhd+bJurQtCQ F4khcrYMFgb4yFjfJefn+e14tNlx78CvxvtFTOCV1MqIbfJ11JcPsgozYivYLnrDAMZE D01vVU4a8tEFa5Cdr0l5JDmwu76lksOEcH0H1Nko5NBy8rNB6w+bLYv7Par1g3RfEk9l K+ZA== X-Gm-Message-State: ALoCoQmX66+Jn5CXtiM5oe48c1gPvxzh271brVM3wZ+vVMqcpx/jsyXpXQOtunSzivNIROjHiksE X-Received: by 10.180.19.198 with SMTP id h6mr45995wie.5.1413565845775; Fri, 17 Oct 2014 10:10:45 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.44.169 with SMTP id f9ls270280lam.11.gmail; Fri, 17 Oct 2014 10:10:45 -0700 (PDT) X-Received: by 10.112.134.39 with SMTP id ph7mr10162816lbb.45.1413565845613; Fri, 17 Oct 2014 10:10:45 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id be18si2922971lab.113.2014.10.17.10.10.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Oct 2014 10:10:45 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by mail-la0-f50.google.com with SMTP id s18so1086755lam.9 for ; Fri, 17 Oct 2014 10:10:45 -0700 (PDT) X-Received: by 10.152.120.200 with SMTP id le8mr9975018lab.67.1413565845522; Fri, 17 Oct 2014 10:10:45 -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 c5csp266751lbz; Fri, 17 Oct 2014 10:10:44 -0700 (PDT) X-Received: by 10.70.140.4 with SMTP id rc4mr10034145pdb.108.1413565844048; Fri, 17 Oct 2014 10:10:44 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wq7si1512337pbc.257.2014.10.17.10.10.43 for ; Fri, 17 Oct 2014 10:10:44 -0700 (PDT) Received-SPF: none (google.com: linux-usb-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 S1753566AbaJQRKj (ORCPT + 3 others); Fri, 17 Oct 2014 13:10:39 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:55466 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753553AbaJQRKh (ORCPT ); Fri, 17 Oct 2014 13:10:37 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9HHAavn011128; Fri, 17 Oct 2014 12:10:36 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9HHAaDL027872; Fri, 17 Oct 2014 12:10:36 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Fri, 17 Oct 2014 12:10:36 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9HHAZQr022821; Fri, 17 Oct 2014 12:10:36 -0500 From: Felipe Balbi To: Linux USB Mailing List CC: Roger Quadros , , George Cherian , Felipe Balbi Subject: [PATCH 21/28] Revert "usb: dwc3: dwc3-omap: Disable/Enable only wrapper interrupts in prepare/complete" Date: Fri, 17 Oct 2014 12:09:57 -0500 Message-ID: <1413565804-13061-22-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.1.0.GIT In-Reply-To: <1413565804-13061-1-git-send-email-balbi@ti.com> References: <1413565804-13061-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 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: Roger Quadros This reverts commit 02dae36aa649a66c5c6181157ddd806e7b4913fc. That commit is bogus in two ways: 1) There's no way dwc3-omap's ->suspend() can cause any effect on xhci's ->suspend(). Linux device driver model guarantees that a parent's ->suspend() will only be called after all children are suspended. dwc3-omap is the parent of the parent of xhci. 2) When implementing Deep Sleep states where context is lost, USBOTGSS_IRQ0 register, well, looses context so we _must_ rewrite it otherwise core IRQs will never be reenabled and USB will appear to be dead. Fixes: 02dae36 (usb: dwc3: dwc3-omap: Disable/Enable only wrapper interrupts in prepare/complete) Cc: # v3.17 Cc: George Cherian Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/dwc3-omap.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index 2f537d5..a0aa9f3 100644 --- a/drivers/usb/dwc3/dwc3-omap.c +++ b/drivers/usb/dwc3/dwc3-omap.c @@ -597,7 +597,7 @@ static int dwc3_omap_prepare(struct device *dev) { struct dwc3_omap *omap = dev_get_drvdata(dev); - dwc3_omap_write_irqmisc_set(omap, 0x00); + dwc3_omap_disable_irqs(omap); return 0; } @@ -605,19 +605,8 @@ static int dwc3_omap_prepare(struct device *dev) static void dwc3_omap_complete(struct device *dev) { struct dwc3_omap *omap = dev_get_drvdata(dev); - u32 reg; - reg = (USBOTGSS_IRQMISC_OEVT | - USBOTGSS_IRQMISC_DRVVBUS_RISE | - USBOTGSS_IRQMISC_CHRGVBUS_RISE | - USBOTGSS_IRQMISC_DISCHRGVBUS_RISE | - USBOTGSS_IRQMISC_IDPULLUP_RISE | - USBOTGSS_IRQMISC_DRVVBUS_FALL | - USBOTGSS_IRQMISC_CHRGVBUS_FALL | - USBOTGSS_IRQMISC_DISCHRGVBUS_FALL | - USBOTGSS_IRQMISC_IDPULLUP_FALL); - - dwc3_omap_write_irqmisc_set(omap, reg); + dwc3_omap_enable_irqs(omap); } static int dwc3_omap_suspend(struct device *dev)