From patchwork Fri Oct 17 17:10:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 38916 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2ABA2202DB for ; Fri, 17 Oct 2014 17:10:56 +0000 (UTC) Received: by mail-wi0-f200.google.com with SMTP id h11sf809987wiw.7 for ; Fri, 17 Oct 2014 10:10:55 -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=oWqNC0SQ1Mw5KYBGR3rAhrKJLRFXquHyOwpC2as4Ks8=; b=UanryB3v6T636OJAqWA4eN7AZM8T4ESD3EzgK93essQQ5zwtGMoCjF7bLrfBquD3+9 aYelpCMlApFL73yGiSkc54ntX6bDyLKuPjaCHzjm9XY0xdjDzOzb3RxFK5VkpZXNABl5 da2MoN6uyx73HLb7x8uw47pPd72ytiZTw0tLARZoBiTeYrv2m66D6ju2jwFAfp7/vY4P FvJ755mHyhMzgrb9XO6JBqj/aE2FL4tEApJfXwoZfMSv8B8pPkJiPRE9PyR/ZTsa6Uq9 LzZtKZA8TMokMerjTSN0DCRLxqDX3Px2PvHCdy5P+xcjdEg6waZZOMxYrmE2Nlmaf6r4 0oug== X-Gm-Message-State: ALoCoQnnGRCeEjQ99UbqyQcV15RPq4szCIZN4qIeZ1EW4838pp47sATqp8zxwpuoICLn8hfZiRrZ X-Received: by 10.112.26.82 with SMTP id j18mr67692lbg.16.1413565855346; Fri, 17 Oct 2014 10:10:55 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.206.99 with SMTP id ln3ls74540lac.22.gmail; Fri, 17 Oct 2014 10:10:55 -0700 (PDT) X-Received: by 10.152.179.164 with SMTP id dh4mr10123444lac.55.1413565855112; Fri, 17 Oct 2014 10:10:55 -0700 (PDT) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id bf9si2922027lab.114.2014.10.17.10.10.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Oct 2014 10:10:55 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by mail-lb0-f179.google.com with SMTP id l4so1036943lbv.10 for ; Fri, 17 Oct 2014 10:10:55 -0700 (PDT) X-Received: by 10.152.6.228 with SMTP id e4mr10114201laa.71.1413565855029; Fri, 17 Oct 2014 10:10:55 -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 c5csp266779lbz; Fri, 17 Oct 2014 10:10:54 -0700 (PDT) X-Received: by 10.66.216.232 with SMTP id ot8mr9334933pac.19.1413565852881; Fri, 17 Oct 2014 10:10:52 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z12si1717871pdi.23.2014.10.17.10.10.52 for ; Fri, 17 Oct 2014 10:10:52 -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 S1753617AbaJQRKu (ORCPT + 1 other); Fri, 17 Oct 2014 13:10:50 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:44012 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753590AbaJQRKr (ORCPT ); Fri, 17 Oct 2014 13:10:47 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9HHAf5O007499; Fri, 17 Oct 2014 12:10:41 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9HHAfSJ027906; Fri, 17 Oct 2014 12:10:41 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Fri, 17 Oct 2014 12:10:41 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9HHAeKA021933; Fri, 17 Oct 2014 12:10:41 -0500 From: Felipe Balbi To: Linux USB Mailing List CC: Sebastian Andrzej Siewior , , Felipe Balbi Subject: [PATCH 26/28] usb: musb: dsps: start OTG timer on resume again Date: Fri, 17 Oct 2014 12:10:02 -0500 Message-ID: <1413565804-13061-27-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: 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: 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.217.179 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: Sebastian Andrzej Siewior Commit 468bcc2a2ca ("usb: musb: dsps: kill OTG timer on suspend") stopped the timer in suspend path but forgot the re-enable it in the resume path. This patch fixes the behaviour. Cc: # v3.14+ Fixes 468bcc2a2ca "usb: musb: dsps: kill OTG timer on suspend" Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_dsps.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 154bcf1..b18f8d5 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -896,7 +896,9 @@ static int dsps_resume(struct device *dev) dsps_writel(mbase, wrp->mode, glue->context.mode); dsps_writel(mbase, wrp->tx_mode, glue->context.tx_mode); dsps_writel(mbase, wrp->rx_mode, glue->context.rx_mode); - setup_timer(&glue->timer, otg_timer, (unsigned long) musb); + if (musb->xceiv->state == OTG_STATE_B_IDLE && + musb->port_mode == MUSB_PORT_MODE_DUAL_ROLE) + mod_timer(&glue->timer, jiffies + wrp->poll_seconds * HZ); return 0; }