Re: [PATCH 5.10 000/589] 5.10.258-rc1 review

From: Claudiu Beznea

Date: Mon Jun 01 2026 - 09:53:33 EST


Hi, all,

On 6/1/26 11:47, Pavel Machek wrote:
Hi!

This is the start of the stable review cycle for the 5.10.258 release.
There are 589 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.

We see boot failures on 5.10-cip:

https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/pipelines/2564188475
https://lava.ciplatform.org/scheduler/job/1451830

This should be related to the patch:

commit 0f86a559900f
Author: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>
Date: Tue Apr 7 14:37:41 2026 +0300

phy: renesas: rcar-gen3-usb2: Lock around hardware registers and driver data

commit 55a387ebb9219cbe4edfa8ba9996ccb0e7ad4932 upstream.

The phy-rcar-gen3-usb2 driver exposes four individual PHYs that are
requested and configured by PHY users. The struct phy_ops APIs access the
same set of registers to configure all PHYs. Additionally, PHY settings can
be modified through sysfs or an IRQ handler. While some struct phy_ops APIs
are protected by a driver-wide mutex, others rely on individual
PHY-specific mutexes.

This approach can lead to various issues, including:
1/ the IRQ handler may interrupt PHY settings in progress, racing with
hardware configuration protected by a mutex lock
2/ due to msleep(20) in rcar_gen3_init_otg(), while a configuration thread
suspends to wait for the delay, another thread may try to configure
another PHY (with phy_init() + phy_power_on()); re-running the
phy_init() goes to the exact same configuration code, re-running the
same hardware configuration on the same set of registers (and bits)
which might impact the result of the msleep for the 1st configuring
thread
3/ sysfs can configure the hardware (though role_store()) and it can
still race with the phy_init()/phy_power_on() APIs calling into the
drivers struct phy_ops

To address these issues, add a spinlock to protect hardware register access
and driver private data structures (e.g., calls to
rcar_gen3_is_any_rphy_initialized()). Checking driver-specific data remains
necessary as all PHY instances share common settings. With this change,
the existing mutex protection is removed and the cleanup.h helpers are
used.

While at it, to keep the code simpler, do not skip
regulator_enable()/regulator_disable() APIs in
rcar_gen3_phy_usb2_power_on()/rcar_gen3_phy_usb2_power_off() as the
regulators enable/disable operations are reference counted anyway.

[claudiu.beznea:
- in rcar_gen3_init_otg(): fixed conflict by droppping ch->soc_no_adp_ctrl check
- in rcar_gen3_phy_usb2_irq() use spin_lock()/spin_unlock() as scoped_guard()
is not avaialable in v5.10
- in probe(): replace mutex_init() with spin_lock_init()
- rcar_gen3_phy_usb2_power_off() replaced scoped_guard() as it is not
available in v5.10
- in rcar_gen3_phy_usb2_power_on() droppped guard to avoid compilation
warning "ISO C90 forbids mixed declarations and code"]

Fixes: f3b5a8d9b50d ("phy: rcar-gen3-usb2: Add R-Car Gen3 USB2 PHY driver")
Cc: stable@xxxxxxxxxxxxxxx
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20250507125032.565017-4-claudiu.beznea.uj@xxxxxxxxxxxxxx
Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

In this backported version I failed to replaced the msleep() with mdelay() as it was in the original patch.

The following patch should fix this problem and align the v5.10 backport support with the currently upstream one: https://lore.kernel.org/all/20260501225859.504868-1-nobuhiro.iwamatsu.x90@mail.toshiba

Greg, since this fix ^ aligns v5.10 stable with the current upstream support, would there be a way to integrated it in v5.10 stable as well?

I am currently working to remove this long sleep in atomic context from upstream:
https://lore.kernel.org/all/20260528070826.478813-1-claudiu.beznea@xxxxxxxxxx


This may be related to

[PATCH v3] phy: renesas: rcar-gen3-usb2: Avoid long delay in atomic context

This is not yet integrated in upstream.

Thank you,
Claudiu


but I don't see related patches in the shortlog below. I put Renesas
people in the cc list, they should know more.

Best regards,
Pavel