Bluetooth: ath3k: add more information to error message
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 changes that function in order to print the variable "count" as well, to show more information when a failing firmware loading operation 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> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
385613506a
commit
d6b372f6f3
|
@ -203,10 +203,11 @@ static const struct usb_device_id ath3k_blist_tbl[] = {
|
||||||
{ } /* Terminating entry */
|
{ } /* Terminating entry */
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline void ath3k_log_failed_loading(int err, int len, int size)
|
static inline void ath3k_log_failed_loading(int err, int len, int size,
|
||||||
|
int count)
|
||||||
{
|
{
|
||||||
BT_ERR("Error in firmware loading err = %d, len = %d, size = %d",
|
BT_ERR("Firmware loading err = %d, len = %d, size = %d, count = %d",
|
||||||
err, len, size);
|
err, len, size, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define USB_REQ_DFU_DNLOAD 1
|
#define USB_REQ_DFU_DNLOAD 1
|
||||||
|
@ -257,7 +258,7 @@ static int ath3k_load_firmware(struct usb_device *udev,
|
||||||
&len, 3000);
|
&len, 3000);
|
||||||
|
|
||||||
if (err || (len != size)) {
|
if (err || (len != size)) {
|
||||||
ath3k_log_failed_loading(err, len, size);
|
ath3k_log_failed_loading(err, len, size, count);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -356,7 +357,7 @@ static int ath3k_load_fwfile(struct usb_device *udev,
|
||||||
err = usb_bulk_msg(udev, pipe, send_buf, size,
|
err = usb_bulk_msg(udev, pipe, send_buf, size,
|
||||||
&len, 3000);
|
&len, 3000);
|
||||||
if (err || (len != size)) {
|
if (err || (len != size)) {
|
||||||
ath3k_log_failed_loading(err, len, size);
|
ath3k_log_failed_loading(err, len, size, count);
|
||||||
kfree(send_buf);
|
kfree(send_buf);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue