From patchwork Tue Jan 3 15:15:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Liu X-Patchwork-Id: 89675 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp8051266qgi; Tue, 3 Jan 2017 07:18:50 -0800 (PST) X-Received: by 10.99.209.81 with SMTP id c17mr116571115pgj.24.1483456730524; Tue, 03 Jan 2017 07:18:50 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q89si38121665pfj.115.2017.01.03.07.18.50; Tue, 03 Jan 2017 07:18:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758173AbdACPP5 (ORCPT + 4 others); Tue, 3 Jan 2017 10:15:57 -0500 Received: from lelnx194.ext.ti.com ([198.47.27.80]:12311 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757553AbdACPPp (ORCPT ); Tue, 3 Jan 2017 10:15:45 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id v03FFipN027159; Tue, 3 Jan 2017 09:15:44 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v03FFisE024826; Tue, 3 Jan 2017 09:15:44 -0600 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.294.0; Tue, 3 Jan 2017 09:15:44 -0600 Received: from dbdmail01.india.ti.com (dbdmail01.india.ti.com [172.24.162.206]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v03FFh1s010433; Tue, 3 Jan 2017 09:15:44 -0600 Received: from uda0271908.am.dhcp.ti.com (uda0271908.am.dhcp.ti.com [128.247.83.228]) by dbdmail01.india.ti.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id v03FFLYO027043; Tue, 3 Jan 2017 20:45:42 +0530 From: Bin Liu To: Greg KH CC: Subject: [PATCH 13/16] usb: musb: da8xx: Fix host mode suspend Date: Tue, 3 Jan 2017 09:15:18 -0600 Message-ID: <1483456521-24416-14-git-send-email-b-liu@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1483456521-24416-1-git-send-email-b-liu@ti.com> References: <1483456521-24416-1-git-send-email-b-liu@ti.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Alexandre Bailon On da8xx, VBUS is not maintained during suspend when musb is in host mode. On resume, all the connected devices will be disconnected and then will be enumerated again. This happens because MUSB_DEVCTL is cleared during suspend. Use the quirk MUSB_PRESERVE_SESSION to preseve MUSB_DEVCTL during suspend. Signed-off-by: Alexandre Bailon Signed-off-by: Bin Liu --- drivers/usb/musb/da8xx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c index 738417986398..69e3b40297c6 100644 --- a/drivers/usb/musb/da8xx.c +++ b/drivers/usb/musb/da8xx.c @@ -457,7 +457,8 @@ static inline u8 get_vbus_power(struct device *dev) } static const struct musb_platform_ops da8xx_ops = { - .quirks = MUSB_DMA_CPPI | MUSB_INDEXED_EP, + .quirks = MUSB_DMA_CPPI | MUSB_INDEXED_EP | + MUSB_PRESERVE_SESSION, .init = da8xx_musb_init, .exit = da8xx_musb_exit,