All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Steinar H. Gunderson" <sgunderson@bigfoot.com>
To: linux-samsung-soc@vger.kernel.org
Cc: 823552@bugs.debian.org, broonie@kernel.org
Subject: Re: Endless "supply vcc not found, using dummy regulator"
Date: Mon, 23 May 2016 15:47:37 +0200	[thread overview]
Message-ID: <20160523134737.GA21683@sesse.net> (raw)
In-Reply-To: <20160521144308.GA13960@sesse.net>

On Sat, May 21, 2016 at 04:43:08PM +0200, Steinar H. Gunderson wrote:
> I still have this problem.
> 
> I've noticed that somehow, there's a huge amount of USB PHYs being autodetected;
> probably related to this issue.
> 
>   sesse@soldroid:~$ ls -ld /sys/devices/platform/usb_phy* | wc -l
>   4288

I've tracked this down partially. It has to do with probe deferral;
for whatever reason, the vdd33 regulator isn't available when the dwc3 driver
comes up, and this causes the probe to defer. For each and every such
deferral, these messages are printed by the regulator subsystem as part of
things attempted probed before vdd33. I don't understand entirely why
it tries 2000+ times before it succeeds, but then I don't understand probe
deferral very well to begin with. I also don't know if there's a way to avoid
these messages for each time, but it seems this is a common problem:

  https://lkml.org/lkml/2016/3/16/269

In this case, it's not just an annoyance, though; they're so many that they
keep the system from booting unless loglevel is turned down. Cc-ing Mark in
case he has any insights (I hope I have the right email address).

The reason for the huge amount of PHYs is that the driver doesn't clean them
up on failure (including probe deferral), so they leak. This is easy to fix;
I'm attaching a small fix below.

>From 6df2ebcbaae74577d49dbbc41e28d52084a124b0 Mon Sep 17 00:00:00 2001
From: "Steinar H. Gunderson" <sesse@google.com>
Date: Mon, 23 May 2016 15:44:37 +0200
Subject: [PATCH 1/1] dwc3-exynos: Clean up phys on probe failure.

Otherwise, they would leak, which is especially bad given probe deferral
(one could end up with thousands of dead phys after a normal boot)

Signed-off-by: Steinar H. Gunderson <sesse@google.com>
---
 drivers/usb/dwc3/dwc3-exynos.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c
index dd5cb55..4104ef5 100644
--- a/drivers/usb/dwc3/dwc3-exynos.c
+++ b/drivers/usb/dwc3/dwc3-exynos.c
@@ -202,6 +202,8 @@ err4:
 err3:
 	regulator_disable(exynos->vdd33);
 err2:
+	platform_device_unregister(exynos->usb2_phy);
+	platform_device_unregister(exynos->usb3_phy);
 	clk_disable_unprepare(exynos->axius_clk);
 	clk_disable_unprepare(exynos->susp_clk);
 	clk_disable_unprepare(exynos->clk);

/* Steinar */
-- 
Homepage: https://www.sesse.net/

  reply	other threads:[~2016-05-23 13:47 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20160515173900.GC21194@sesse.net>
2016-05-21 14:43 ` Endless "supply vcc not found, using dummy regulator" Steinar H. Gunderson
2016-05-23 13:47   ` Steinar H. Gunderson [this message]
2016-05-23 14:40     ` Steinar H. Gunderson
2016-05-23 16:24       ` Mark Brown
2016-05-23 17:06         ` Steinar H. Gunderson
2016-05-23 17:46           ` Steinar H. Gunderson
2016-05-23 18:56             ` Mark Brown
2016-05-23 18:44           ` Mark Brown
2016-05-24 15:06           ` Krzysztof Kozlowski
2016-05-24 15:26             ` Steinar H. Gunderson
2016-05-24 15:45               ` Mark Brown
2016-05-24 15:53               ` Krzysztof Kozlowski
2016-05-24 16:44                 ` Steinar H. Gunderson
     [not found]                 ` <574478FE.4070800-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-05-24 19:24                   ` [PATCH] " Steinar H. Gunderson
2016-05-24 18:13                     ` [PATCH v2] dwc3-exynos: Fix deferred probing storm Steinar H. Gunderson
2016-05-24 18:13                     ` [PATCH] " Steinar H. Gunderson
2016-05-25  7:54                       ` Krzysztof Kozlowski
2016-05-27  9:53                       ` Vivek Gautam
2016-05-27 11:46                         ` Steinar H. Gunderson
2016-05-27 13:13                           ` Krzysztof Kozlowski
     [not found]                             ` <5748480D.8000501-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-05-27 13:12                               ` Felipe Balbi
     [not found]                                 ` <87bn3rprtw.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-05-27 13:25                                   ` Steinar H. Gunderson
2016-05-27 13:26                                     ` Felipe Balbi
2016-05-30 17:46                                       ` Steinar H. Gunderson
2016-05-25 12:16                     ` [PATCH] Re: Endless "supply vcc not found, using dummy regulator" Anand Moon
2016-05-25 17:52                       ` Steinar H. Gunderson
2016-05-26 12:57                         ` Steinar H. Gunderson
     [not found]                           ` <20160526125757.GA23797-gdzBep0Ce9heoWH0uzbU5w@public.gmane.org>
2016-05-27  9:32                             ` Vivek Gautam
     [not found]                               ` <CAFp+6iE_QW0BDO-Z1Ce5zrUJiToWD_8UtnCFnfKLeaYyys7U8A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-05-27  9:39                                 ` Steinar H. Gunderson
     [not found]                                   ` <20160527093919.GA34987-gdzBep0Ce9heoWH0uzbU5w@public.gmane.org>
2016-05-27  9:43                                     ` Vivek Gautam
2016-05-24 15:39             ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160523134737.GA21683@sesse.net \
    --to=sgunderson@bigfoot.com \
    --cc=823552@bugs.debian.org \
    --cc=broonie@kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.