From: Simon Horman <simon.horman@corigine.com>
To: Sarath Babu Naidu Gaddam <sarath.babu.naidu.gaddam@amd.com>
Cc: richardcochran@gmail.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, vincent.cheng.xh@renesas.com,
harini.katakam@amd.com, git@amd.com
Subject: Re: [PATCH] ptp: clockmatrix: Add Defer probe if firmware load fails
Date: Mon, 12 Jun 2023 15:16:19 +0200 [thread overview]
Message-ID: <ZIcao8a7Yqf6McGw@corigine.com> (raw)
In-Reply-To: <20230612100044.979281-1-sarath.babu.naidu.gaddam@amd.com>
On Mon, Jun 12, 2023 at 03:30:44PM +0530, Sarath Babu Naidu Gaddam wrote:
> Clock matrix driver can be probed before the rootfs containing
> firmware/initialization .bin is available. The current driver
> throws a warning and proceeds to execute probe even when firmware
> is not ready. Instead, defer probe and wait for the .bin file to
> be available.
>
> Signed-off-by: Sarath Babu Naidu Gaddam <sarath.babu.naidu.gaddam@amd.com>
> ---
> drivers/ptp/ptp_clockmatrix.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/ptp/ptp_clockmatrix.c b/drivers/ptp/ptp_clockmatrix.c
> index c9d451bf89e2..96328dfb7e55 100644
> --- a/drivers/ptp/ptp_clockmatrix.c
> +++ b/drivers/ptp/ptp_clockmatrix.c
> @@ -2424,9 +2424,13 @@ static int idtcm_probe(struct platform_device *pdev)
>
> err = idtcm_load_firmware(idtcm, &pdev->dev);
>
> - if (err)
> + if (err) {
> dev_warn(idtcm->dev, "loading firmware failed with %d", err);
>
> + if (err == -ENOENT)
> + return -EPROBE_DEFER;
Hi Sarath,
Smatch reports that idtcm->lock is leaked here.
> + }
> +
> wait_for_chip_ready(idtcm);
>
> if (idtcm->tod_mask) {
> --
> 2.25.1
>
>
next prev parent reply other threads:[~2023-06-12 13:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 10:00 Sarath Babu Naidu Gaddam
2023-06-12 13:16 ` Simon Horman [this message]
2023-06-12 14:22 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZIcao8a7Yqf6McGw@corigine.com \
--to=simon.horman@corigine.com \
--cc=git@amd.com \
--cc=harini.katakam@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=sarath.babu.naidu.gaddam@amd.com \
--cc=vincent.cheng.xh@renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®