Commit 6abf9dd2 authored by Zijun Hu's avatar Zijun Hu Committed by Luiz Augusto von Dentz

Bluetooth: qca: Fix triggering coredump implementation

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: 06d3fdfc ("Bluetooth: hci_qca: Add qcom devcoredump support")
Signed-off-by: default avatarZijun Hu <quic_zijuhu@quicinc.com>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent 7dcd3e01
...@@ -1807,13 +1807,12 @@ static int qca_power_on(struct hci_dev *hdev) ...@@ -1807,13 +1807,12 @@ static int qca_power_on(struct hci_dev *hdev)
static void hci_coredump_qca(struct hci_dev *hdev) static void hci_coredump_qca(struct hci_dev *hdev)
{ {
int err;
static const u8 param[] = { 0x26 }; static const u8 param[] = { 0x26 };
struct sk_buff *skb;
skb = __hci_cmd_sync(hdev, 0xfc0c, 1, param, HCI_CMD_TIMEOUT); err = __hci_cmd_send(hdev, 0xfc0c, 1, param);
if (IS_ERR(skb)) if (err < 0)
bt_dev_err(hdev, "%s: trigger crash failed (%ld)", __func__, PTR_ERR(skb)); bt_dev_err(hdev, "%s: trigger crash failed (%d)", __func__, err);
kfree_skb(skb);
} }
static int qca_get_data_path_id(struct hci_dev *hdev, __u8 *data_path_id) static int qca_get_data_path_id(struct hci_dev *hdev, __u8 *data_path_id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment