Bluetooth: btintel: print friendly error message for acpi errors
PATCH 1/2 Bluetooth: btintel: print friendly error message for acpi errors
Print user friendly error messages for errors returned by ACPI methods.
Signed-off-by Kiran K <[email protected]>
--- drivers/bluetooth/btintel.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/bluetooth/btintel.c +5 -4
@@ -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; }
Signature · 1 line
2.25.1
PATCH 2/2 Bluetooth: btintel: Add comment for DSM metbods
1. Add comment about reset method types.
2. Minor indentation and typo fixes.
Signed-off-by Kiran K <[email protected]>
--- drivers/bluetooth/btintel.c | 8 ++++++-- drivers/bluetooth/btusb.c | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-)
drivers/bluetooth/btintel.c +6 -2
@@ -2500,10 +2500,14 @@ static void btintel_set_dsm_reset_method(struct hci_dev *hdev, {struct btintel_data *data =hci_get_priv (hdev);acpi_handle handle =ACPI_HANDLE (GET_HCIDEV_DEV (hdev)); -u8 reset_payload[4 ] = {0x01 ,0x00 ,0x01 ,0x00 }; +u8 reset_payload[4 ] = {0x01 ,0x00 ,0x01 ,0x00 };union acpi_object *obj, argv4;enum { +/* supported from TigerLake platform onwards on both discrete +* and integrated solutions +*/ RESET_TYPE_WDISABLE2 , +/* supported from MeteorLake platform with GalePeak2 NIC only */ RESET_TYPE_VSEC };
@@ -2533,7 +2537,7 @@ static void btintel_set_dsm_reset_method(struct hci_dev *hdev,return ; } argv4.integer.type =ACPI_TYPE_INTEGER ; -/* delay required to toggle BT power */ +/* delay between WDISABLE2 pin assertion and deassertion */ argv4.integer.value =160 ; obj =acpi_evaluate_dsm (handle, &btintel_guid_dsm,0 ,DSM_SET_WDISABLE2_DELAY , &argv4);
drivers/bluetooth/btusb.c +1 -1
@@ -864,7 +864,7 @@ static void btusb_intel_cmd_timeout(struct hci_dev *hdev)if (intel_data->acpi_reset_method) {if (test_and_set_bit (INTEL_ACPI_RESET_ACTIVE , intel_data->flags)) { -bt_dev_err (hdev,"acpi: last reset failed ? Not resetting again" ); +bt_dev_err (hdev,"acpi: last reset failed? Not resetting again" );return ; }
Signature · 1 line
2.25.1
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=758885
---Test result---
Test Summary:
CheckPatch PASS 1.99 seconds GitLint PASS 0.78 seconds SubjectPrefix PASS 0.28 seconds BuildKernel PASS 45.04 seconds CheckAllWarning PASS 48.94 seconds CheckSparse PASS 55.45 seconds CheckSmatch PASS 148.52 seconds BuildKernel32 PASS 43.23 seconds TestRunnerSetup PASS 614.41 seconds TestRunner_l2cap-tester PASS 21.98 seconds TestRunner_iso-tester PASS 32.43 seconds TestRunner_bnep-tester PASS 7.66 seconds TestRunner_mgmt-tester PASS 165.66 seconds TestRunner_rfcomm-tester PASS 12.41 seconds TestRunner_sco-tester PASS 11.16 seconds TestRunner_ioctl-tester PASS 13.26 seconds TestRunner_mesh-tester PASS 9.71 seconds TestRunner_smp-tester PASS 10.97 seconds TestRunner_userchan-tester PASS 8.08 seconds IncrementalBuild PASS 48.11 seconds
---
Regards,
Linux Bluetooth