2024-02-04 05:16:06

by quic_zijuhu

[permalink] [raw]
Subject: [PATCH v1] Bluetooth: btusb: Fix triggering coredump implementation for QCA

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 <[email protected]>
---
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



2024-02-04 06:07:36

by bluez.test.bot

[permalink] [raw]
Subject: RE: [v1] Bluetooth: btusb: Fix triggering coredump implementation for QCA

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=822830

---Test result---

Test Summary:
CheckPatch PASS 0.61 seconds
GitLint PASS 0.28 seconds
SubjectPrefix PASS 0.10 seconds
BuildKernel PASS 28.02 seconds
CheckAllWarning PASS 30.64 seconds
CheckSparse PASS 36.48 seconds
CheckSmatch PASS 99.47 seconds
BuildKernel32 PASS 27.02 seconds
TestRunnerSetup PASS 496.23 seconds
TestRunner_l2cap-tester PASS 17.02 seconds
TestRunner_iso-tester PASS 33.58 seconds
TestRunner_bnep-tester PASS 4.78 seconds
TestRunner_mgmt-tester FAIL 106.91 seconds
TestRunner_rfcomm-tester PASS 7.31 seconds
TestRunner_sco-tester PASS 11.23 seconds
TestRunner_ioctl-tester PASS 7.78 seconds
TestRunner_mesh-tester PASS 5.89 seconds
TestRunner_smp-tester PASS 6.83 seconds
TestRunner_userchan-tester PASS 4.95 seconds
IncrementalBuild PASS 25.80 seconds

Details
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 497, Passed: 486 (97.8%), Failed: 5, Not Run: 6

Failed Test Cases
Read Ext Controller Info 1 Failed 0.082 seconds
Read Ext Controller Info 2 Failed 0.091 seconds
Read Ext Controller Info 3 Failed 0.085 seconds
Read Ext Controller Info 4 Failed 0.081 seconds
Read Ext Controller Info 5 Failed 0.099 seconds


---
Regards,
Linux Bluetooth

2024-02-23 02:47:31

by quic_zijuhu

[permalink] [raw]
Subject: [PATCH v2] Bluetooth: btusb: Fix triggering coredump implementation for QCA

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 <[email protected]>
---
Changes since v1:
- Correct commit message

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


2024-03-25 13:39:42

by quic_zijuhu

[permalink] [raw]
Subject: [PATCH v2 RESEND] Bluetooth: btusb: Fix triggering coredump implementation for QCA

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 <[email protected]>
---
V1 -> V2: Correct commit message

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 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);
}

/*
--
2.7.4


2024-03-25 14:53:26

by bluez.test.bot

[permalink] [raw]
Subject: RE: [v2,RESEND] Bluetooth: btusb: Fix triggering coredump implementation for QCA

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=837786

---Test result---

Test Summary:
CheckPatch PASS 1.06 seconds
GitLint PASS 0.20 seconds
SubjectPrefix PASS 0.07 seconds
BuildKernel PASS 28.98 seconds
CheckAllWarning PASS 31.31 seconds
CheckSparse PASS 36.60 seconds
CheckSmatch PASS 100.76 seconds
BuildKernel32 PASS 27.90 seconds
TestRunnerSetup PASS 526.29 seconds
TestRunner_l2cap-tester PASS 18.03 seconds
TestRunner_iso-tester PASS 30.78 seconds
TestRunner_bnep-tester PASS 4.81 seconds
TestRunner_mgmt-tester FAIL 117.35 seconds
TestRunner_rfcomm-tester PASS 7.38 seconds
TestRunner_sco-tester PASS 15.03 seconds
TestRunner_ioctl-tester PASS 8.02 seconds
TestRunner_mesh-tester FAIL 6.13 seconds
TestRunner_smp-tester PASS 7.42 seconds
TestRunner_userchan-tester PASS 4.96 seconds
IncrementalBuild PASS 27.28 seconds

Details
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 492, Passed: 489 (99.4%), Failed: 1, Not Run: 2

Failed Test Cases
LL Privacy - Remove Device 4 (Disable Adv) Timed out 2.643 seconds
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner
Output:
Total: 10, Passed: 9 (90.0%), Failed: 1, Not Run: 0

Failed Test Cases
Mesh - Send cancel - 1 Failed 0.108 seconds


---
Regards,
Linux Bluetooth

2024-04-11 14:41:12

by patchwork-bot+bluetooth

[permalink] [raw]
Subject: Re: [PATCH v2 RESEND] Bluetooth: btusb: Fix triggering coredump implementation for QCA

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <[email protected]>:

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 <[email protected]>
>
> [...]

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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html