lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 7 Jun 2019 09:00:26 +0000
From:   Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
CC:     Kishon Vijay Abraham I <kishon@...com>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux-Renesas <linux-renesas-soc@...r.kernel.org>
Subject: RE: [PATCH] phy: renesas: rcar-gen3-usb2: fix imbalance powered flag

Hi Geert-san,

> From: Geert Uytterhoeven, Sent: Wednesday, June 5, 2019 10:08 PM
<snip>
> > > From: Geert Uytterhoeven, Sent: Wednesday, June 5, 2019 6:25 PM
> > <snip>
> > > Thank you, this seems to fix the warning, so
> > > Tested-by: Geert Uytterhoeven <geert+renesas@...der.be>
> >
> > Thank you for the testing!
> >
> > > However, the other imbalance (phy-ee080200.usb-phy.6 enabling its
> > > regulator during each system resume phase, but never touching it
> > > otherwise) is still present.
> >
> > Umm, since I'd like to investigate this,
> > would you share your debug print patch?
> 
> Attached.

Thank you for your patch. Finally, I found the other imbalance is caused by
rcar_gen3_phy_usb2_power_on(). rcar_gen3_phy_usb2_power_on() should have
own mutex lock to avoid a race condition between calls rcar_gen3_are_all_rphys_power_off()
and assign the ->powered. So, I'll submit v2 patch later.

Notes:
 - Even if the driver has such an own mutex, sometimes the different phy number
   enables the regulator. But the imbalance enabling the regulator issue disappears.

 - One of the phy channel has 4 phy devices. And the phy channel has a regulator
   so that enabling the regulator by one of the phy devices is enough.

--- Example (v5.2-rc3 on R-Car H3) ---
# ls /sys/class/phy/
phy-e65ee000.usb-phy.12  phy-ee0a0200.usb-phy.0  phy-ee0c0200.usb-phy.5
phy-ee080200.usb-phy.10  phy-ee0a0200.usb-phy.1  phy-ee0c0200.usb-phy.6
phy-ee080200.usb-phy.11  phy-ee0a0200.usb-phy.2  phy-ee0c0200.usb-phy.7
phy-ee080200.usb-phy.8   phy-ee0a0200.usb-phy.3
phy-ee080200.usb-phy.9   phy-ee0c0200.usb-phy.4

- phy-ee080200.usb-phy is one of the phy channel.
-- And the "phy-ee080200.usb-phy" phy channel has a regulator.
-- Other phy channels (phy-ee0[ac]0200.usb-phy) don't have their regulators.

- phy-ee080200.usb-phy.{8,9,10,11} are phy devices.
----

Best regards,
Yoshihiro Shimoda

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ