Received: by 10.192.165.148 with SMTP id m20csp839102imm; Fri, 27 Apr 2018 08:18:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrH4nVSgOYob4goiQ+INIVjRsBWYhr8dNxveljJAy3dxqFnlHke0fMJsorrDO4mHBRADbp9 X-Received: by 2002:a17:902:bd0a:: with SMTP id p10-v6mr2695698pls.69.1524842333724; Fri, 27 Apr 2018 08:18:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524842333; cv=none; d=google.com; s=arc-20160816; b=Wl/2xg4NJuf16nwpJCwhz5c9MX4mPHHQvz3SKycOggpY7mLKAQnPDeV1+IVQ1jK9XN Hg20SN7HlVqZmmGm2h5tM3JXAPWMYoWjIcW80aRi0O3S9RCANJUiJMaqKtGaexaSmNaG VF3ghxW27EeCB7RdB4qf+CWdNSMwXnJlgxB7ATbMiCxMcN//JwIjoNYvv3m1azy4gFOX GoQ/sAasWWVchEOP0EKss3Z3lUkWfnihItKGn8Jvd3C+XaBZa4VLzzv7XSF6HinMV9NM z6Y/QAJPDXW21Wg/dcBUXNkPsfS8V6VrFtoDIwpfKo2ubE4xwTN33xU7NIe4iEWbNek5 wYyg== 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:dmarc-filter :arc-authentication-results; bh=uCINWFRzQSNWm+pvQVYs6LBbwuullYXeu0rlp1kVvoQ=; b=aSKm+JVAOCStmloUJIoF/taeEc04Tk07uguhXzzstP+k2eIu+WlAYUfseloJqkEqFE zhNN5l56sZScp3GUNltQOKkBAu7z0pMr0rpfd1WYV72MMgpYX185XF7+eoRTIApY79SL P7GXcmGSNWU5WehDfJbSS55xKUCaUtRywcb5Hg33BRLQ+mfNh8GBsZIph4giIvwefwYj gd2Zkah5qc4nJjbONqDSn0tSzXRC5Wl4Vzlos9R7zv7k91ssmgj2/3OrsOesgsR58mII U+xp0xDYGVRFke+F0GEHInY6uw4YpepCWAREg/810zQmkEXE57xosM0QwzdrtRdpGm1y zhFg== 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 z23si1380386pfn.365.2018.04.27.08.18.40; Fri, 27 Apr 2018 08:18:53 -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 S933490AbeD0ODM (ORCPT + 99 others); Fri, 27 Apr 2018 10:03:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:49772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933446AbeD0ODL (ORCPT ); Fri, 27 Apr 2018 10:03:11 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 101FE218A2; Fri, 27 Apr 2018 14:03:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 101FE218A2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=gregkh@linuxfoundation.org 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.9 08/74] usb: musb: fix enumeration after resume Date: Fri, 27 Apr 2018 15:57:58 +0200 Message-Id: <20180427135710.242461260@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427135709.899303463@linuxfoundation.org> References: <20180427135709.899303463@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.9-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 @@ -2710,7 +2710,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);