Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp810669imp; Thu, 21 Feb 2019 11:40:44 -0800 (PST) X-Google-Smtp-Source: AHgI3IZy5NrwM86QDzIkIK54suqWQ8p1wz7Iar3DZATRr3Q4R+uWMoIDbPpEQIwm8BJXxHcWhHeS X-Received: by 2002:a17:902:2865:: with SMTP id e92mr188057plb.45.1550778044849; Thu, 21 Feb 2019 11:40:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550778044; cv=none; d=google.com; s=arc-20160816; b=Us+ebxbFS7B0Wcv8fQUF/WmHFU5uPSmz57mUMACTYxTbNkPGw+MlirLd/Ih+bV2JAO LNu0uUhXSEAHyyF/3sbiA+v/89AeLDNkB8/PjYGx4F6ZltjV8W1ap16Vju7lR88xJoHa 6VLuLbeKtZ3/uUrIiR9b2BiEj1A0u6vgjb8mjAmwcTQZntGocI7sSLxS2Y4d87d2dw5n t3bZZclaYAml7irE32VXwltgqFoxJ0RHma2ZtGQi9jocNVJZvcV0qkFUd68ZcVDWcFiA hHq2L7Cdb3Pq8PJKWpGVgVg1U4Ew3OIZLGK8xTTnMrVP6CpkDTKeZGra33BOTse42AV/ EN1w== 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:dkim-signature; bh=kW4xLhEcJzI00RwBUQ6d/W9tDOTjB84nBOWGxZR23xc=; b=I7Wvx3jtHrahJJSFqaYiBrNY94UecWJjOKk7QTyTfgHCkK4lEQIQGAUgxGrUwZQVBk UA7V1nmd0BAxxB1cSuH9atwJCllFfWtuG4ag/LESON9R8PN+gpKAO5cMa+hK6MCyRMJc 01NQ6Mq6RIDeBrghx7Fc/iGuKuuUrCEziZPpPuigW8CHlrPEbimCHg94ZX4fqNnUbWz3 8iPC6PTaa/5MvVL1wEpVd6QsOUs6V5PUZbVroY5s+wQx8/A5sQFl52x9sQ1uTdCwKlOW 78T0lRvtXjfQSq0ATCR3SlWERSRNT9MhcmhNrqmIj5e+CzBxUR0ZwDr6iDDwLetOArUe BIIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=XnUhDCkj; 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 h6si16038690pll.326.2019.02.21.11.40.29; Thu, 21 Feb 2019 11:40:44 -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; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=XnUhDCkj; 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 S1726273AbfBUTkJ (ORCPT + 99 others); Thu, 21 Feb 2019 14:40:09 -0500 Received: from mail.andi.de1.cc ([85.214.239.24]:47136 "EHLO h2641619.stratoserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725932AbfBUTkI (ORCPT ); Thu, 21 Feb 2019 14:40:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20180802; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=kW4xLhEcJzI00RwBUQ6d/W9tDOTjB84nBOWGxZR23xc=; b=XnUhDCkj6gFdBkT/o6JesMSuX nJ+clYMC4ILB1tzHuFk3Yx/up1ZLkxpkbcNyfRH7+BFqtnsVpE9HHTHI1t2jjysUALhPw0CgLmdnF l9AMpLANar3D6sNwQ6iP19TEFzJvUgop96TVWsSvCBBHRCHcQXk3k0bagkaI06ohdJPAY=; Received: from pd9e2f314.dip0.t-ipconnect.de ([217.226.243.20] helo=aktux) by h2641619.stratoserver.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gwuCR-0003t6-LX; Thu, 21 Feb 2019 20:40:03 +0100 Date: Thu, 21 Feb 2019 20:39:58 +0100 From: Andreas Kemnade To: Tony Lindgren Cc: Dmitry Torokhov , kishon@ti.com, lee.jones@linaro.org, daniel.thompson@linaro.org, wsa@the-dreams.de, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Discussions about the Letux Kernel Subject: Re: [PATCH v2] phy: phy-twl4030-usb: fix denied runtime access Message-ID: <20190221203958.66d904f6@aktux> In-Reply-To: <20190221164803.GX15711@atomide.com> References: <20180922094405.4067-1-andreas@kemnade.info> <20190220223132.GV15711@atomide.com> <20190221170840.5c970def@kemnade.info> <20190221164803.GX15711@atomide.com> 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_/B8oGZk5LWhpCHH7Ii9zachb"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/B8oGZk5LWhpCHH7Ii9zachb Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 21 Feb 2019 08:48:03 -0800 Tony Lindgren wrote: > * Andreas Kemnade [190221 16:43]: > > Hi, > >=20 > > On Wed, 20 Feb 2019 14:31:32 -0800 > > Tony Lindgren wrote: > > =20 > > > * Andreas Kemnade [180922 09:48]: =20 > > > > When runtime is not enabled, pm_runtime_get_sync() returns -EACCESS, > > > > the counter will be incremented but the resume callback not called, > > > > so enumeration and charging will not start properly. > > > > To avoid that happen, disable irq on suspend and recheck on resume. > > > >=20 > > > > Practically this happens when the device is woken up from suspend by > > > > plugging in usb. > > > >=20 > > > > Signed-off-by: Andreas Kemnade > > > > --- > > > > Changes in v2: > > > > * use pm suspend/resume callback instead of delayed_work > > > > as suggested by Dmitry =20 > > >=20 > > > Hmm it just occurred to me that this issue too might be fixed with co= mmit > > > c6e2bd956936 ("i2c: omap: Use noirq system sleep pm ops to idle device > > > for suspend"). Andreas, care to check? That is if this is still an > > > issue. > > > =20 > > this one made already its way into 4.20. But for the records, I will > > build the latest 5.0-rc and revert it and will check if the problem > > still occurs. =20 >=20 > OK thanks. >=20 first of all, suspend is totally broken in v5.0-rc7. I booted with init=3D/bin/bash and just loaded gpio-twl4030 and twl4030-pwrbutton and did (rtc in compiled in) a root@(none):/# rtcwake -s 10 -m mem rtcwake: wakeup from "mem" using /dev/rtc0 at Sat Jan 1 00:05:24 2000 [ 86.434722] PM: suspend entry (deep) [ 86.438842] PM: Syncing filesystems ... done. [ 86.458770] Freezing user space processes ... (elapsed 0.003 seconds) do= ne. [ 86.470947] OOM killer disabled. [ 86.474365] Freezing remaining freezable tasks ... (elapsed 0.002 second= s) done. [ 86.485473] printk: Suspending console(s) (use no_console_suspend to deb= ug) [ 86.555572] Disabling non-boot CPUs ... [ 86.555664] Successfully put all powerdomains to target state [ 86.563720] twl: Read failed (mod 1, reg 0x01 count 1) [ 86.563751] twl4030: I2C error -13 reading PIH ISR [ 86.563812] twl: Read failed (mod 1, reg 0x01 count 1) [ 86.563812] twl4030: I2C error -13 reading PIH ISR [ 86.563873] twl: Read failed (mod 1, reg 0x01 count 1) [ 86.563903] twl4030: I2C error -13 reading PIH ISR and this goes on forever. I will try to bisect that. Regards, Andreas --Sig_/B8oGZk5LWhpCHH7Ii9zachb Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE7sDbhY5mwNpwYgrAfb1qx03ikyQFAlxu/o4ACgkQfb1qx03i kyR1ug//UkCTfM2SkawNg+4dzVcqhdb3DWPTw31wGdGWMwcssBjeidM31orpwCi8 d2HoAfZcSmO9ISUwaR1HeojXCsY3FQJNEyLxfwjQWzKq7R6bFpTDlAgY/Dw5pY0D XfbEs4LW9vH7RCCA/9qe7anj8DfIBRnzOuyMALvdSB0A6wXyTtOZxHxzAxYfGQUs WQQhfxQY2HSxVWA81+un05SeDSeAct95uj4nc5hAf8NkKqRUgLseIhjJyXXVJchZ GNFLvxDY9pOHP3V3zZlvGcyPZBaVyXbXG3iND7SecJXkXP41AVaRTbo+S9r8aCmj uyxWgEnRm4Hz+N+EhG8F2Ogfyv5n3heY6VcqP5cHjkyQXGJe3s60a19DEt28fEI6 FIluHaJFtLSoTk9nmlbkCfhfiYniAzL9jvHDmb9GT70cLwBNJnKot4U1xapmONkb Lkkj+A5TcH/cXRiG6nPoPB6hZJW0a0S0WWjwRRcuKCOsHmqns5uU/p5dWbtSJs4w lFW5zgG3wzC2BcYV0r8m9py/KrMx+XPwsBXv4ZhpDlqA38Wh67ijzf7yLG5WST8w /ktA4TAm4sk4hy+01yXSRsBeE9FgX8hsFRLz9ilcYDpBpom9EWGBD32KAYvdQeUz fNiB11pazdRc3VOV7GILfdlZGJRZQFesZ5NSJshC0nUlns3ZOcw= =hSVH -----END PGP SIGNATURE----- --Sig_/B8oGZk5LWhpCHH7Ii9zachb--