[PATCH v8 3/4] phy: ti-pipe3: Fix EPROBE_DEFER handling for clock resources
Manivannan Sadhasivam
mani at kernel.org
Mon Oct 12 05:59:52 PDT 2026
On Wed, Sep 09, 2026 at 08:26:29PM +0800, Hongling Zeng wrote:
> ti_pipe3_get_clk() has two issues with -EPROBE_DEFER error handling:
>
> 1. When devm_clk_get() for sysclk fails, the function returns -EINVAL
> instead of propagating the actual error code. This masks -EPROBE_DEFER
> to -EINVAL, breaking the probe deferral mechanism and causing permanent
> driver initialization failure on systems with non-deterministic probe
> ordering.
>
> 2. For SATA PHY refclk, the function ignores all errors to support older
> DTBs missing the refclk property. However, this incorrectly ignores
> -EPROBE_DEFER as well, causing the driver to proceed without waiting
> for the clock provider to become available.
>
> Fix both issues:
> - Return PTR_ERR(phy->sys_clk) instead of -EINVAL to propagate all
> error codes including -EPROBE_DEFER
> - Use devm_clk_get_optional() for SATA refclk to handle optional
> clocks while propagating -EPROBE_DEFER and other errors
>
> Fixes: a70143bbef6b ("drivers: phy: usb3/pipe3: Adapt pipe3 driver to Generic PHY Framework")
> Fixes: 7f33912d2978 ("phy: ti-pipe3: Fix SATA across suspend/resume")
> Suggested-by: Manivannan Sadhasivam <manivannan.sadhasivam at oss.qualcomm.com>
> Signed-off-by: Hongling Zeng <zenghongling at kylinos.cn>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam at oss.qualcomm.com>
- Mani
--
மணிவண்ணன் சதாசிவம்
More information about the linux-phy
mailing list