All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/2] Bluetooth: btintel: print friendly error message for acpi errors
@ 2023-06-20 23:52 Kiran K
  2023-06-20 23:52 ` [PATCH v1 2/2] Bluetooth: btintel: Add comment for DSM metbods Kiran K
  2023-06-21  1:24 ` [v1,1/2] Bluetooth: btintel: print friendly error message for acpi errors bluez.test.bot
  0 siblings, 2 replies; 3+ messages in thread
From: Kiran K @ 2023-06-20 23:52 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: ravishankar.srivatsa, chethan.tumkur.narayan, pmenzel, Kiran K

Print user friendly error messages for errors returned by ACPI
methods.

Signed-off-by: Kiran K <kiran.k@intel.com>
---
 drivers/bluetooth/btintel.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index dd1e48808ee2..1110289ccd02 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -2463,28 +2463,29 @@ static int btintel_acpi_reset_method(struct hci_dev *hdev)
 
 	status = acpi_evaluate_object(ACPI_HANDLE(GET_HCIDEV_DEV(hdev)), "_PRR", NULL, &buffer);
 	if (ACPI_FAILURE(status)) {
-		bt_dev_err(hdev, "Failed to run _PRR method");
+		bt_dev_err(hdev, "Failed to run _PRR method: %s", acpi_format_exception(status));
 		ret = -ENODEV;
 		return ret;
 	}
 	p = buffer.pointer;
 
 	if (p->package.count != 1 || p->type != ACPI_TYPE_PACKAGE) {
-		bt_dev_err(hdev, "Invalid arguments");
+		bt_dev_err(hdev, "Invalid arguments: count: %u type: 0x%x", p->package.count,
+			   p->type);
 		ret = -EINVAL;
 		goto exit_on_error;
 	}
 
 	ref = &p->package.elements[0];
 	if (ref->type != ACPI_TYPE_LOCAL_REFERENCE) {
-		bt_dev_err(hdev, "Invalid object type: 0x%x", ref->type);
+		bt_dev_err(hdev, "Object type is not ACPI_TYPE_LOCAL_REFERENCE: 0x%x", ref->type);
 		ret = -EINVAL;
 		goto exit_on_error;
 	}
 
 	status = acpi_evaluate_object(ref->reference.handle, "_RST", NULL, NULL);
 	if (ACPI_FAILURE(status)) {
-		bt_dev_err(hdev, "Failed to run_RST method");
+		bt_dev_err(hdev, "Failed to run_RST method: %s", acpi_format_exception(status));
 		ret = -ENODEV;
 		goto exit_on_error;
 	}
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-21  1:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-20 23:52 [PATCH v1 1/2] Bluetooth: btintel: print friendly error message for acpi errors Kiran K
2023-06-20 23:52 ` [PATCH v1 2/2] Bluetooth: btintel: Add comment for DSM metbods Kiran K
2023-06-21  1:24 ` [v1,1/2] Bluetooth: btintel: print friendly error message for acpi errors bluez.test.bot

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.