linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	USB list <linux-usb@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: RE: rcar_gen3_phy_usb2: unbalanced disables for USB20_VBUS0
Date: Wed, 5 Jun 2019 04:06:44 +0000	[thread overview]
Message-ID: <OSAPR01MB30890E4B76F9605F3726C676D8160@OSAPR01MB3089.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <CAMuHMdUObtKUVDohLT501TarPRC6eDnxBqqB5Tj_Tb+-4fwbkw@mail.gmail.com>

Hi Geert-san,

Thank you very much for your report!

> From: Geert Uytterhoeven, Sent: Wednesday, June 5, 2019 3:06 AM
> 
> Hi Shimoda-san,
> 
> Using a tree based on renesas-drivers-2019-06-04-v5.2-rc3, I started seeing
> the following warning during a second system suspend (s2idle):
<snip>
> So far I've seen this on Salvator-X with R-Car H3 ES1.0 or M3-W, and
> on Salvator-XS with R-Car M3-N, but not (yet?) on H3 ES2.0.

I could reproduce this issue on R-Car H3 ES3.0 with Suspend-to-RAM.
# I'm silly but I could not use s2idle that didn't wake up by ravb.
# https://elinux.org/R-Car/Boards/Salvator-X#Suspend-to-Idle

> Unfortunately the issue seems to be fairly timing-sensitive, so I failed
> to bisect it.
> 
> I have added some debug.  While this didn't help me finding the cause
> of the above warning, it did discover another imbalance:

Thank you for trying it. I have investigated this issue and then I found the root cause.

After the following patch was applied, multiple phy devices are generated.
https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git/commit/drivers/phy/renesas/phy-rcar-gen3-usb2.c?h=renesas-drivers-2019-06-04-v5.2-rc3&id=549b6b55b00558183cef4af2c2bb61d4f2ffe508

But, on the power_on function, it should set the "powered" flag for any other phys anyway.
Otherwise, such a strange imbalance behavior happened.
The powered flag is needed to avoid multiple "PLL_RST" register setting.
# I think regulator_{en,dis}able() don't need such a condition though.

I'll submit a bugfix patch with your Reported-by tag later.

Best regards,
Yoshihiro Shimoda


  reply	other threads:[~2019-06-05  4:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04 18:06 rcar_gen3_phy_usb2: unbalanced disables for USB20_VBUS0 Geert Uytterhoeven
2019-06-05  4:06 ` Yoshihiro Shimoda [this message]
2019-06-05  7:03   ` Geert Uytterhoeven
2019-06-05 12:09     ` Yoshihiro Shimoda

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=OSAPR01MB30890E4B76F9605F3726C676D8160@OSAPR01MB3089.jpnprd01.prod.outlook.com \
    --to=yoshihiro.shimoda.uh@renesas.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-usb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).