diff mbox series

[v2,RESEND] Bluetooth: btusb: Fix triggering coredump implementation for QCA

Message ID 1711354309-27605-1-git-send-email-quic_zijuhu@quicinc.com
State Accepted
Commit e00fc2700a3fa0a506666741279c969ae4ba5551
Headers show
Series [v2,RESEND] Bluetooth: btusb: Fix triggering coredump implementation for QCA | expand

Commit Message

quic_zijuhu March 25, 2024, 8:11 a.m. UTC
btusb_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: 20981ce2d5a5 ("Bluetooth: btusb: Add WCN6855 devcoredump support")
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
---
V1 -> V2: Correct commit message

 drivers/bluetooth/btusb.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

patchwork-bot+bluetooth@kernel.org April 11, 2024, 2:39 p.m. UTC | #1
Hello:

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

On Mon, 25 Mar 2024 16:11:49 +0800 you wrote:
> btusb_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: 20981ce2d5a5 ("Bluetooth: btusb: Add WCN6855 devcoredump support")
> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
> 
> [...]

Here is the summary with links:
  - [v2,RESEND] Bluetooth: btusb: Fix triggering coredump implementation for QCA
    https://git.kernel.org/bluetooth/bluetooth-next/c/e00fc2700a3f

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index c391e612b83b..9e9b9fc84211 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -3485,13 +3485,12 @@  static void btusb_dump_hdr_qca(struct hci_dev *hdev, struct sk_buff *skb)
 
 static void btusb_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: triggle 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: triggle crash failed (%d)", __func__, err);
 }
 
 /*