All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Luiz Carlos Ramos <lramos.prof@yahoo.com.br>
Cc: Johan Hedberg <johan.hedberg@gmail.com>, linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] ath3k: add more information to error message
Date: Thu, 27 Sep 2018 12:47:11 +0200	[thread overview]
Message-ID: <5CF8F067-C9A1-4028-847A-0B25DB00F61A@holtmann.org> (raw)
In-Reply-To: <20180907233603.GF3379@giustizia.org>

Hi Luiz,

> When there is an error in either ath3k_load_firmware() or
> ath3k_load_fwfile(), the inlined function ath3k_log_failed_loading() is
> called receiving the error returned and both the block size requested to
> load and the size actually loaded. These values are printed in an error
> message using the macro BT_ERR.
> 
> This patch creates a new function which does the same but also receives
> the "count" variable, in order to show more information when a failing
> firmware loading happens. The calls to the older function were changed
> to the new one.
> 
> This event is being monitored in a laptop with an adapter which
> identifies itself as 0cf3:0036, where sometimes there are errors in the
> firmware loading process.
> 
> Signed-off-by: Luiz Carlos Ramos <lramos.prof@yahoo.com.br>
> ---
> drivers/bluetooth/ath3k.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
> index 3a8c47efea55..ebc312cb4412 100644
> --- a/drivers/bluetooth/ath3k.c
> +++ b/drivers/bluetooth/ath3k.c
> @@ -209,6 +209,14 @@ static inline void ath3k_log_failed_loading(int err, int len, int size)
> 			err, len, size);
> }
> 
> +static inline void ath3k_log_failed_loading_2(int err, int len, int size,
> +						int count)
> +{
> +	BT_ERR("%s err = %d, len = %d, size = %d, count = %d",
> +			"Error in firmware loading",
> +			err, len, size, count);
> +}
> +

just change the the original ath3k_log_failed_loading to include the count parameter.

Regards

Marcel


  reply	other threads:[~2018-09-27 10:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-07 23:36 [PATCH] ath3k: add more information to error message Luiz Carlos Ramos
2018-09-27 10:47 ` Marcel Holtmann [this message]
2018-09-27 20:13   ` Luiz Carlos Ramos
2018-09-27 20:19 Luiz Carlos Ramos
2018-09-28 17:28 ` Marcel Holtmann

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=5CF8F067-C9A1-4028-847A-0B25DB00F61A@holtmann.org \
    --to=marcel@holtmann.org \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=lramos.prof@yahoo.com.br \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.