linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Bjorn Andersson <andersson@kernel.org>,
	linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] remoteproc: report firmware name on load failures
Date: Wed, 7 Sep 2022 10:23:23 +0200	[thread overview]
Message-ID: <e3367f73-c2da-3f6d-59a4-209efb114d9e@linaro.org> (raw)
In-Reply-To: <20220906194622.GB64477@p14s>

On 06/09/2022 21:46, Mathieu Poirier wrote:
> On Wed, Aug 31, 2022 at 07:17:36PM +0300, Krzysztof Kozlowski wrote:
>> remoteproc error messages like:
>>   remoteproc remoteproc0: request_firmware failed: -2
>>   remoteproc remoteproc1: request_firmware failed: -2
>> are difficult to debug as one actually have no clue which device
>> reported it and which firmware is missing.  Be verbose and print the
>> name of the failed firmware.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>>  drivers/remoteproc/remoteproc_core.c | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
>> index e5279ed9a8d7..71cd7ed7a970 100644
>> --- a/drivers/remoteproc/remoteproc_core.c
>> +++ b/drivers/remoteproc/remoteproc_core.c
>> @@ -1923,7 +1923,8 @@ int rproc_trigger_recovery(struct rproc *rproc)
>>  	/* load firmware */
>>  	ret = request_firmware(&firmware_p, rproc->firmware, dev);
>>  	if (ret < 0) {
>> -		dev_err(dev, "request_firmware failed: %d\n", ret);
>> +		dev_err(dev, "request_firmware %s failed: %d\n",
>> +			rproc->firmware, ret);
>>  		goto unlock_mutex;
>>  	}
>>  
>> @@ -2023,7 +2024,8 @@ int rproc_boot(struct rproc *rproc)
>>  		/* load firmware */
>>  		ret = request_firmware(&firmware_p, rproc->firmware, dev);
>>  		if (ret < 0) {
>> -			dev_err(dev, "request_firmware failed: %d\n", ret);
>> +			dev_err(dev, "request_firmware %s failed: %d\n",
>> +				rproc->firmware, ret);
> 
> That information is already available in sysfs 

Hm, it's not in deferred probe reasons, so where can I find it in sysfs?

> but if you are really keen on it
> please do the same for rproc_trigger_auto_boot().
Sure.

Best regards,
Krzysztof

      reply	other threads:[~2022-09-07  8:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-31 16:17 [PATCH] remoteproc: report firmware name on load failures Krzysztof Kozlowski
2022-09-01  8:55 ` Mukesh Ojha
2022-09-06 19:46 ` Mathieu Poirier
2022-09-07  8:23   ` Krzysztof Kozlowski [this message]

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=e3367f73-c2da-3f6d-59a4-209efb114d9e@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=andersson@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).