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] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <TYCPR01MB110407080D95D7EE14CFDC5A5D8B42@TYCPR01MB11040.jpnprd01.prod.outlook.com>
Date: Wed, 9 Apr 2025 01:10:28 +0000
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
CC: Prabhakar <prabhakar.csengg@...il.com>, Greg Kroah-Hartman
	<gregkh@...uxfoundation.org>, Kuninori Morimoto
	<kuninori.morimoto.gx@...esas.com>, "linux-usb@...r.kernel.org"
	<linux-usb@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "linux-renesas-soc@...r.kernel.org"
	<linux-renesas-soc@...r.kernel.org>, Biju Das <biju.das.jz@...renesas.com>,
	Claudiu Beznea <claudiu.beznea.uj@...renesas.com>, Fabrizio Castro
	<fabrizio.castro.jz@...esas.com>, Prabhakar Mahadev Lad
	<prabhakar.mahadev-lad.rj@...renesas.com>
Subject: RE: [PATCH v2 3/3] usb: renesas_usbhs: Reorder clock handling and
 power management in probe

Hello Geert-san,

> From: Geert Uytterhoeven, Sent: Wednesday, April 9, 2025 12:43 AM
> 
> Hi Shimoda-san,
> 
> On Tue, 8 Apr 2025 at 12:40, Yoshihiro Shimoda
> <yoshihiro.shimoda.uh@...esas.com> wrote:
> > > From: Prabhakar, Sent: Monday, April 7, 2025 7:50 PM
> > >
> > > Reorder the initialization sequence in `usbhs_probe()` to enable runtime
> > > PM before accessing registers, preventing potential crashes due to
> > > uninitialized clocks.
> >
> > Just for a record. I don't know why, but the issue didn't occur on the original code
> > with my environment (R-Car H3). But, anyway, I understood that we need this patch for RZ/V2H.
> 
> On R-Car Gen3 and later, the firmware must trap the external abort,
> as usually no crash happens, but register reads return zero when
> the module clock is turned off.  I am wondering why RZ/V2H behaves
> differently than R-Car Gen3?

I'm guessing that:
- EHCI/OHCI drivers on R-Car Gen3 enabled both the USB clocks (EHCI/OHCI and USBHS).
- RZ/V2H didn't enable the USBHS clock only.

So, I'm also guessing that the R-Car V2H issue can be reproduced if we disable EHCI/OHCI on R-Car Gen3.
# However, for some reasons, I don't have time to test for it today. (I'll test it tomorrow or later.)

> On R-Car Gen2, you do get an external abort when accessing hardware
> registers while the module's clock is turned off.  Has anyone tested
> usbhs on R-Car Gen2 recently?

I'm afraid but, I didn't test on R-Car Gen2...

> > ----- I added some debug printk -----
> > <snip>
> > [    3.193400] usbhs_probe:706
> > [    3.196204] usbhs_probe:710
> > [    3.199012] usbhs_probe:715
> > [    3.201808] usbhs_probe:720
> > [    3.204605] usbhs_read: reg = 0
> 
> Hmm, did it read back sensible data?

This is my bad though, I should have use dev_info() instead of printk() because R-Car H3 has two USBHS modules.
I'll retest it tomorrow or later too.

Best regards,
Yoshihiro Shimoda

> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ