All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] Bluetooth: btusb: Fix triggering coredump implementation for QCA
@ 2024-02-04  5:14 Zijun Hu
  2024-02-04  6:07 ` [v1] " bluez.test.bot
  2024-02-23  2:46 ` [PATCH v2] " Zijun Hu
  0 siblings, 2 replies; 6+ messages in thread
From: Zijun Hu @ 2024-02-04  5:14 UTC (permalink / raw)
  To: luiz.dentz, marcel; +Cc: linux-bluetooth, Zijun Hu

btusb_coredump_qca() uses __hci_cmd_sync() to send a vendor-specific
command to trigger firmware coredump, but the command does not have event
HCI_Command_Status or HCI_Command_Complete as its response, actually, it
does not have any sync response event at all, 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>
---
 drivers/bluetooth/btusb.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index edfb49bbaa28..ff282cc25710 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -3469,13 +3469,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);
 }
 
 /*
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-04-11 14:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-04  5:14 [PATCH v1] Bluetooth: btusb: Fix triggering coredump implementation for QCA Zijun Hu
2024-02-04  6:07 ` [v1] " bluez.test.bot
2024-02-23  2:46 ` [PATCH v2] " Zijun Hu
2024-03-25  8:11   ` [PATCH v2 RESEND] " Zijun Hu
2024-03-25 10:57     ` [v2,RESEND] " bluez.test.bot
2024-04-11 14:39     ` [PATCH v2 RESEND] " patchwork-bot+bluetooth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.