Re: [PATCH net-next v7 4/5] ptp: clockmatrix: Fix caps.max_adj to reflect DPLL_MAX_FREQ_OFFSET[MAX_FFO]

From: Horatiu Vultur
Date: Thu May 02 2024 - 02:55:22 EST


The 05/01/2024 12:03, Min Li wrote:

Hi Min Li,

Maybe the entire patch should target net instead of net-next. As this is
fixing an issue.

> @@ -2285,6 +2301,10 @@ static int idtcm_enable_channel(struct idtcm *idtcm, u32 index)
> ppd->chan = index;
> }
>
> + err = initialize_max_adj(channel);
> + if (err)
> + return err;
> +
> err = initialize_dco_operating_mode(channel);
> if (err)
> return err;
> @@ -2437,8 +2457,13 @@ static int idtcm_probe(struct platform_device *pdev)
>
> err = idtcm_load_firmware(idtcm, &pdev->dev);
>
> - if (err)
> + if (err) {
> + if (err == -ENOENT) {
> + mutex_unlock(idtcm->lock);
> + return -EPROBE_DEFER;
> + }
> dev_warn(idtcm->dev, "loading firmware failed with %d", err);
> + }
>
> wait_for_chip_ready(idtcm);
>

Also this change should be in a separate patch as this doesn't have
anything to do with caps.max_adj but it is releasing the lock in case
firmware fails to be loaded.

--
/Horatiu