Received: by 10.223.176.5 with SMTP id f5csp1013133wra; Tue, 6 Feb 2018 11:02:12 -0800 (PST) X-Google-Smtp-Source: AH8x225ccrUyRgWTX/FDSVWDDtmnlQPazDSvLt3nrXhbTbJhw5tay6vLQUZeHTH8gUvVk3ynoTQs X-Received: by 2002:a17:902:7789:: with SMTP id o9-v6mr3370472pll.84.1517943732480; Tue, 06 Feb 2018 11:02:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517943732; cv=none; d=google.com; s=arc-20160816; b=e5UULXLeky4u6+oZuj9cs0gPkBEt7de5/HL05icoH9fGVyB5to2yRg6XCA1oIOyIBf SrPft3BUU7gvTFhnwV4T6ckT6M8MNsjpUoBjPuNS+y91QO6HPjrf+qF+OaLPdXesvDto 1knhAibK+qSEJ2JW+rflHZH6yP8dJAI7/4TXecgNXh5uS6RHeMabeyQ/xJWlm2sCdL7J k+/YbJz7p3AkBYPG+4JDVIqwuj8IBeaV6jbfeX34VIoPR0GvQxvu5nFwDISheQkI4yYF XkGKwYUB9q4rBlDa1fqrOEBWZzUSuZugEhde8q2BNr0HqE+oGWdb3Jz0wsvYs4EcJFPY TNZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=3grscKlb0FGCMg2sAl+UM4hSFdqbQL0ryxJA+tOk2Z0=; b=arAJ2qKJe06/Cb/NxaqRZDIkghPLrG8rGqxR2r4kk6ON/eG++CISGXPaf4Wy61372n evusee8OruI1LWmEpGmNAeFm1p81/coOGG8YwGHUT9TxdAdtjVATSYfckBCYlwX1KznP 5Tye1m6sa4Uu0qqNTRSae72Ad3YIdFPxzW2s95J/UueUmXBWdAJh6oMejIOa6Z533Otf aIpjx0x0laPW2SaZrqqWcMEnge5X1a1M52c43s2mwULTarZsd4rViPsgYTWUIDSeFEIS 5KBxOmDy6nj7LH2BRlgzpv7+RiLkMlvBZ4hFPWZEVpkJzTj2E3ceK/XNtkirc6eae4GE ML9Q== 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 q11si7226899pgc.617.2018.02.06.11.01.58; Tue, 06 Feb 2018 11:02:12 -0800 (PST) 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 S1753044AbeBFTAz (ORCPT + 99 others); Tue, 6 Feb 2018 14:00:55 -0500 Received: from mail.andi.de1.cc ([85.214.239.24]:36400 "EHLO h2641619.stratoserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752939AbeBFTAs (ORCPT ); Tue, 6 Feb 2018 14:00:48 -0500 Received: from p200300ccfbc503001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:fbc5:300:1a3d:a2ff:febf:d33a] helo=aktux) by h2641619.stratoserver.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ej8U1-0003AY-2p; Tue, 06 Feb 2018 20:00:45 +0100 Date: Tue, 6 Feb 2018 20:00:24 +0100 From: Andreas Kemnade To: Bin Liu Cc: , , , Tony Lindgren , Discussions about the Letux Kernel Subject: Re: [PATCH] usb: musb: fix enumeration after resume Message-ID: <20180206200024.18d40735@aktux> In-Reply-To: <20180206184605.GA3992@uda0271908> References: <20180127083403.928-1-andreas@kemnade.info> <20180206184605.GA3992@uda0271908> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/uiQa17RxlFNEvXCvVHH0J_w"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/uiQa17RxlFNEvXCvVHH0J_w Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi, On Tue, 6 Feb 2018 12:46:05 -0600 Bin Liu wrote: > Hi, >=20 > On Sat, Jan 27, 2018 at 09:34:03AM +0100, Andreas Kemnade wrote: > > 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. =20 > =20 > Do you see the issue with the v4.15? >=20 Yes. Tested without other patches.=20 It was also there in earlier kernels but I had not had motivation enough to debug. So maybe it deserves a CC: Stable > > 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") =20 >=20 > The logic in the fix makes sense, and I do see the same problem with > AM335x on v4.9 kernel, but it doesn't happen on v4.15. I haven't checked > if there is anything after musb_start() which sets MUSB_POWER_SOFTCON > bit. >=20 Well reconfiguring gadget from userspace helps. Regards, Andreas --Sig_/uiQa17RxlFNEvXCvVHH0J_w Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE7sDbhY5mwNpwYgrAfb1qx03ikyQFAlp5+0gACgkQfb1qx03i kyT3jhAApShmP7qSeGKNXBmdj/K33GgwzbTez4TZNBRkKfLI6AWeqOsEvGIHayX6 0pEmoWiQGYeYP2vXtFoOX7J83hXGamH2L0KCaSLRlHQO/6CNjTRxy7wj/0/NlB9m 3gvHw9FmaoIFUuIRENZtEOv78AtqRVU+kvPWee15sr4jk+NiVitheTxE2KfgWx3a Qg40TEj/y/bRKEZDLTTJ9XeOYY5yn9QcBtVKDQ2QaiS/co0TtaxQLV+UOrDWc9Xv owkO6f44Ve8t12AxyGO2QZBi8WuioL7zhwh5+0yTA6CgCWCeepiAdXIUtX5NguD4 GlzHNujMq3ereYoI1pvUI6gOJ7xMJQKQVYwYSZw2hFADQCaRi/4IKPlRzqmEHqsh qiE9AI0ttO/Lt52TeJoJZ/9if00/lsplHMWaLDeQnfMY+qyEJlbRNUB+ZC6G/HM3 gwnIqum9W/Cn4Lc57A3Ko7BW45liGHGD08TOA9warUd6St9VvJpv3v0FEFRy9vEv N9XtRD6J5GhupnJubis5YTuSVTL/O2B+H9EgzC5r/dvy+0REiqnGga8/0L2x00/s 8YmyIccsQJ8ZM+ypq+M97ZjCQx7133Tn/JDfbstspfZEDQnMLbaxGjI63Yi75VLY KGyAjWDrPr98JNrBc6/ZX/L2WV12rEk+OWBeGSA83u2s7FRB5O0= =UDKf -----END PGP SIGNATURE----- --Sig_/uiQa17RxlFNEvXCvVHH0J_w--