Received: by 10.192.165.148 with SMTP id m20csp524742imm; Wed, 25 Apr 2018 03:39:18 -0700 (PDT) X-Google-Smtp-Source: AIpwx487bm5+P71RGmCvwk+sd35owr6E89phuJEXLzkoS18Mg2M9kBdNG194yXX6GvE0b7Le7tXP X-Received: by 10.101.70.72 with SMTP id k8mr21395749pgr.47.1524652758882; Wed, 25 Apr 2018 03:39:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524652758; cv=none; d=google.com; s=arc-20160816; b=KKf6XZEt5/bxgz3IIwDrvg1DeaXVsod7Sufc6Tdx1zKrpz31ikIrpw70Z87z9JVKzE Yh4XsB8/SvIG4nDDJboSIqYpAf0A9geQu+1bFCTbASQIjmpjSpcMsQNFhIwB4QvOZOPU re7eiOo4JKNr2UpO+1hEepeQum37Re5/jUC+CjE7udAA6W4VywUaEQNZ8FugaLqMUePt QO2+XCyY0W5pHFp2cwAJOAnK0w81EKjeDMpacpE/HBg2jdTKeHsrRodXvSlhZPcGNrQM TxRbCWtmQV2RUesZ8jtcRND3Q0hq5L6h3JEdva11LLD79h1kUrH1g92ErhU/lhaBI8ag Hysg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=tGiSdPvD9GvcfxS4JtVhpUlDaGE7AOGZYcaz2G5nGJ8=; b=HKLV8mGTXFOUiYdCNYzl6NJrzd+Z/dgVmQ+RCy+r6wETlbtB97AREY3JrsaR87PVjy 95mMci2sxsrOR2sACdyyaiCxQk6NlsXYIAJW3+6IrQEONXN+Pc0KwsTcX2kfAQ/lORRu nLKCeDRU3WRPHtomr6hjSD4i3Ozc/+aEuOWPns6H2UnuDfLqNVvwn7Cm14yfs7/izz2W +a3NjXIq8VA0kI7cu24u9fmHL39WooRDAkJLGikgK/xjFoq6sYDIEgTNV0WVl2GQh6I0 pzeyeZqBZFHQkTLCuxa3Q0d6s0RQwWPXoXrWSi1rbYWGVFhkUt4FMmcV4AHjpVV/Tb/Z sgWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 66si15771500pfm.167.2018.04.25.03.39.04; Wed, 25 Apr 2018 03:39:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753221AbeDYKhP (ORCPT + 99 others); Wed, 25 Apr 2018 06:37:15 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:51050 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753190AbeDYKhK (ORCPT ); Wed, 25 Apr 2018 06:37:10 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 057AD481; Wed, 25 Apr 2018 10:37:09 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andreas Kemnade , Tony Lindgren , Bin Liu Subject: [PATCH 4.14 012/183] usb: musb: fix enumeration after resume Date: Wed, 25 Apr 2018 12:33:52 +0200 Message-Id: <20180425103243.107585624@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180425103242.532713678@linuxfoundation.org> References: <20180425103242.532713678@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andreas Kemnade commit 17539f2f4f0b7fa906b508765c8ada07a1e45f52 upstream. On dm3730 there are enumeration problems after resume. Investigation led to the cause that the MUSB_POWER_SOFTCONN bit is not set. If it was set before suspend (because it was enabled via musb_pullup()), it is set in musb_restore_context() so the pullup is enabled. But then musb_start() is called which overwrites MUSB_POWER and therefore disables MUSB_POWER_SOFTCONN, so no pullup is enabled and the device is not enumerated. So let's do a subset of what musb_start() does in the same way as musb_suspend() does it. Platform-specific stuff it still called as there might be some phy-related stuff which needs to be enabled. Also interrupts are enabled, as it was the original idea of calling musb_start() in musb_resume() according to Commit 6fc6f4b87cb3 ("usb: musb: Disable interrupts on suspend, enable them on resume") Signed-off-by: Andreas Kemnade Tested-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman --- drivers/usb/musb/musb_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -2733,7 +2733,8 @@ static int musb_resume(struct device *de if ((devctl & mask) != (musb->context.devctl & mask)) musb->port1_status = 0; - musb_start(musb); + musb_enable_interrupts(musb); + musb_platform_enable(musb); spin_lock_irqsave(&musb->lock, flags); error = musb_run_resume_work(musb);