Skip to content

Commit 6abf9dd

Browse files
Zijun HuVudentz
authored andcommitted
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: 06d3fdf ("Bluetooth: hci_qca: Add qcom devcoredump support") Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
1 parent 7dcd3e0 commit 6abf9dd

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

drivers/bluetooth/hci_qca.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1807,13 +1807,12 @@ static int qca_power_on(struct hci_dev *hdev)
18071807

18081808
static void hci_coredump_qca(struct hci_dev *hdev)
18091809
{
1810+
int err;
18101811
static const u8 param[] = { 0x26 };
1811-
struct sk_buff *skb;
18121812

1813-
skb = __hci_cmd_sync(hdev, 0xfc0c, 1, param, HCI_CMD_TIMEOUT);
1814-
if (IS_ERR(skb))
1815-
bt_dev_err(hdev, "%s: trigger crash failed (%ld)", __func__, PTR_ERR(skb));
1816-
kfree_skb(skb);
1813+
err = __hci_cmd_send(hdev, 0xfc0c, 1, param);
1814+
if (err < 0)
1815+
bt_dev_err(hdev, "%s: trigger crash failed (%d)", __func__, err);
18171816
}
18181817

18191818
static int qca_get_data_path_id(struct hci_dev *hdev, __u8 *data_path_id)

0 commit comments

Comments
 (0)