diff mbox series

[v1] Bluetooth: qca: Fix triggering coredump implementation

Message ID 1706259624-12518-1-git-send-email-quic_zijuhu@quicinc.com
State Accepted
Commit 5e35f82bf3f384134f81270ce774bde687217459
Headers show
Series [v1] Bluetooth: qca: Fix triggering coredump implementation | expand

Commit Message

Zijun Hu Jan. 26, 2024, 9 a.m. UTC
hci_coredump_qca() uses __hci_cmd_sync() to send a vendor-specific command
to trigger firmware coredump, but the command does not have any event as
its sync response, so it is not suitable to use __hci_cmd_sync(), fixed by
using __hci_cmd_send().

Fixes: 06d3fdfcdf5c ("Bluetooth: hci_qca: Add qcom devcoredump support")
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
---
 drivers/bluetooth/hci_qca.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

bluez.test.bot@gmail.com Jan. 26, 2024, 9:33 a.m. UTC | #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=820176

---Test result---

Test Summary:
CheckPatch                    PASS      0.63 seconds
GitLint                       PASS      0.31 seconds
SubjectPrefix                 PASS      0.12 seconds
BuildKernel                   PASS      28.79 seconds
CheckAllWarning               PASS      31.41 seconds
CheckSparse                   PASS      37.45 seconds
CheckSmatch                   PASS      100.85 seconds
BuildKernel32                 PASS      27.83 seconds
TestRunnerSetup               PASS      446.56 seconds
TestRunner_l2cap-tester       PASS      23.27 seconds
TestRunner_iso-tester         PASS      42.48 seconds
TestRunner_bnep-tester        PASS      6.86 seconds
TestRunner_mgmt-tester        PASS      159.17 seconds
TestRunner_rfcomm-tester      PASS      10.84 seconds
TestRunner_sco-tester         PASS      14.46 seconds
TestRunner_ioctl-tester       PASS      12.13 seconds
TestRunner_mesh-tester        PASS      8.75 seconds
TestRunner_smp-tester         PASS      9.79 seconds
TestRunner_userchan-tester    PASS      7.26 seconds
IncrementalBuild              PASS      26.58 seconds



---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org Feb. 2, 2024, 7:10 p.m. UTC | #2
Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Fri, 26 Jan 2024 17:00:24 +0800 you wrote:
> hci_coredump_qca() uses __hci_cmd_sync() to send a vendor-specific command
> to trigger firmware coredump, but the command does not have any event as
> its sync response, so it is not suitable to use __hci_cmd_sync(), fixed by
> using __hci_cmd_send().
> 
> Fixes: 06d3fdfcdf5c ("Bluetooth: hci_qca: Add qcom devcoredump support")
> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
> 
> [...]

Here is the summary with links:
  - [v1] Bluetooth: qca: Fix triggering coredump implementation
    https://git.kernel.org/bluetooth/bluetooth-next/c/5e35f82bf3f3

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 94b8c406f0c0..f989c05f8177 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1806,13 +1806,12 @@  static int qca_power_on(struct hci_dev *hdev)
 
 static void hci_coredump_qca(struct hci_dev *hdev)
 {
+	int err;
 	static const u8 param[] = { 0x26 };
-	struct sk_buff *skb;
 
-	skb = __hci_cmd_sync(hdev, 0xfc0c, 1, param, HCI_CMD_TIMEOUT);
-	if (IS_ERR(skb))
-		bt_dev_err(hdev, "%s: trigger crash failed (%ld)", __func__, PTR_ERR(skb));
-	kfree_skb(skb);
+	err = __hci_cmd_send(hdev, 0xfc0c, 1, param);
+	if (err < 0)
+		bt_dev_err(hdev, "%s: trigger crash failed (%d)", __func__, err);
 }
 
 static int qca_get_data_path_id(struct hci_dev *hdev, __u8 *data_path_id)