* [PATCH v2] HCI: coredump: Log devcd dumps into the monitor
@ 2025-03-18 16:14 Luiz Augusto von Dentz
2025-03-18 16:36 ` [v2] " bluez.test.bot
2025-03-18 20:43 ` [PATCH v2] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2025-03-18 16:14 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This logs the devcd dumps with hci_recv_diag so they appear in the
monitor traces with proper timestamps which can then be used to relate
the HCI traffic that caused the dump:
= Vendor Diagnostic (len 174)
42 6c 75 65 74 6f 6f 74 68 20 64 65 76 63 6f 72 Bluetooth devcor
65 64 75 6d 70 0a 53 74 61 74 65 3a 20 32 0a 00 edump.State: 2..
43 6f 6e 74 72 6f 6c 6c 65 72 20 4e 61 6d 65 3a Controller Name:
20 76 68 63 69 5f 63 74 72 6c 0a 46 69 72 6d 77 vhci_ctrl.Firmw
61 72 65 20 56 65 72 73 69 6f 6e 3a 20 76 68 63 are Version: vhc
69 5f 66 77 0a 44 72 69 76 65 72 3a 20 76 68 63 i_fw.Driver: vhc
69 5f 64 72 76 0a 56 65 6e 64 6f 72 3a 20 76 68 i_drv.Vendor: vh
63 69 0a 2d 2d 2d 20 53 74 61 72 74 20 64 75 6d ci.--- Start dum
70 20 2d 2d 2d 0a 74 65 73 74 20 64 61 74 61 00 p ---.test data.
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..............
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
net/bluetooth/coredump.c | 28 +++++++++++++++++++++++-----
1 file changed, 23 insertions(+), 5 deletions(-)
diff --git a/net/bluetooth/coredump.c b/net/bluetooth/coredump.c
index c18df3a08607..819eacb38762 100644
--- a/net/bluetooth/coredump.c
+++ b/net/bluetooth/coredump.c
@@ -240,6 +240,26 @@ static void hci_devcd_handle_pkt_pattern(struct hci_dev *hdev,
bt_dev_dbg(hdev, "Failed to set pattern");
}
+static void hci_devcd_dump(struct hci_dev *hdev)
+{
+ struct sk_buff *skb;
+ u32 size;
+
+ bt_dev_dbg(hdev, "state %d", hdev->dump.state);
+
+ size = hdev->dump.tail - hdev->dump.head;
+
+ /* Emit a devcoredump with the available data */
+ dev_coredumpv(&hdev->dev, hdev->dump.head, size, GFP_KERNEL);
+
+ /* Send a copy to monitor as a diagnostic packet */
+ skb = bt_skb_alloc(size, GFP_ATOMIC);
+ if (skb) {
+ skb_put_data(skb, hdev->dump.head, size);
+ hci_recv_diag(hdev, skb);
+ }
+}
+
static void hci_devcd_handle_pkt_complete(struct hci_dev *hdev,
struct sk_buff *skb)
{
@@ -256,7 +276,7 @@ static void hci_devcd_handle_pkt_complete(struct hci_dev *hdev,
bt_dev_dbg(hdev, "complete with size %u (expect %zu)", dump_size,
hdev->dump.alloc_size);
- dev_coredumpv(&hdev->dev, hdev->dump.head, dump_size, GFP_KERNEL);
+ hci_devcd_dump(hdev);
}
static void hci_devcd_handle_pkt_abort(struct hci_dev *hdev,
@@ -275,8 +295,7 @@ static void hci_devcd_handle_pkt_abort(struct hci_dev *hdev,
bt_dev_dbg(hdev, "aborted with size %u (expect %zu)", dump_size,
hdev->dump.alloc_size);
- /* Emit a devcoredump with the available data */
- dev_coredumpv(&hdev->dev, hdev->dump.head, dump_size, GFP_KERNEL);
+ hci_devcd_dump(hdev);
}
/* Bluetooth devcoredump state machine.
@@ -391,8 +410,7 @@ void hci_devcd_timeout(struct work_struct *work)
bt_dev_dbg(hdev, "timeout with size %u (expect %zu)", dump_size,
hdev->dump.alloc_size);
- /* Emit a devcoredump with the available data */
- dev_coredumpv(&hdev->dev, hdev->dump.head, dump_size, GFP_KERNEL);
+ hci_devcd_dump(hdev);
hci_devcd_reset(hdev);
--
2.48.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [v2] HCI: coredump: Log devcd dumps into the monitor
2025-03-18 16:14 [PATCH v2] HCI: coredump: Log devcd dumps into the monitor Luiz Augusto von Dentz
@ 2025-03-18 16:36 ` bluez.test.bot
2025-03-18 20:43 ` [PATCH v2] " patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2025-03-18 16:36 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 2116 bytes --]
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=945229
---Test result---
Test Summary:
CheckPatch PENDING 0.38 seconds
GitLint PENDING 0.35 seconds
SubjectPrefix FAIL 0.40 seconds
BuildKernel PASS 24.11 seconds
CheckAllWarning PASS 29.35 seconds
CheckSparse PASS 30.36 seconds
BuildKernel32 PASS 24.02 seconds
TestRunnerSetup PASS 432.34 seconds
TestRunner_l2cap-tester PASS 21.31 seconds
TestRunner_iso-tester PASS 33.28 seconds
TestRunner_bnep-tester PASS 4.80 seconds
TestRunner_mgmt-tester FAIL 122.51 seconds
TestRunner_rfcomm-tester PASS 8.11 seconds
TestRunner_sco-tester PASS 12.32 seconds
TestRunner_ioctl-tester PASS 8.53 seconds
TestRunner_mesh-tester PASS 6.12 seconds
TestRunner_smp-tester PASS 7.35 seconds
TestRunner_userchan-tester PASS 4.97 seconds
IncrementalBuild PENDING 0.82 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 490, Passed: 485 (99.0%), Failed: 1, Not Run: 4
Failed Test Cases
LL Privacy - Set Flags 3 (2 Devices to RL) Failed 0.181 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] HCI: coredump: Log devcd dumps into the monitor
2025-03-18 16:14 [PATCH v2] HCI: coredump: Log devcd dumps into the monitor Luiz Augusto von Dentz
2025-03-18 16:36 ` [v2] " bluez.test.bot
@ 2025-03-18 20:43 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2025-03-18 20:43 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Tue, 18 Mar 2025 12:14:14 -0400 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> This logs the devcd dumps with hci_recv_diag so they appear in the
> monitor traces with proper timestamps which can then be used to relate
> the HCI traffic that caused the dump:
>
> = Vendor Diagnostic (len 174)
> 42 6c 75 65 74 6f 6f 74 68 20 64 65 76 63 6f 72 Bluetooth devcor
> 65 64 75 6d 70 0a 53 74 61 74 65 3a 20 32 0a 00 edump.State: 2..
> 43 6f 6e 74 72 6f 6c 6c 65 72 20 4e 61 6d 65 3a Controller Name:
> 20 76 68 63 69 5f 63 74 72 6c 0a 46 69 72 6d 77 vhci_ctrl.Firmw
> 61 72 65 20 56 65 72 73 69 6f 6e 3a 20 76 68 63 are Version: vhc
> 69 5f 66 77 0a 44 72 69 76 65 72 3a 20 76 68 63 i_fw.Driver: vhc
> 69 5f 64 72 76 0a 56 65 6e 64 6f 72 3a 20 76 68 i_drv.Vendor: vh
> 63 69 0a 2d 2d 2d 20 53 74 61 72 74 20 64 75 6d ci.--- Start dum
> 70 20 2d 2d 2d 0a 74 65 73 74 20 64 61 74 61 00 p ---.test data.
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..............
>
> [...]
Here is the summary with links:
- [v2] HCI: coredump: Log devcd dumps into the monitor
https://git.kernel.org/bluetooth/bluetooth-next/c/5fa10370a7c1
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-03-18 20:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-18 16:14 [PATCH v2] HCI: coredump: Log devcd dumps into the monitor Luiz Augusto von Dentz
2025-03-18 16:36 ` [v2] " bluez.test.bot
2025-03-18 20:43 ` [PATCH v2] " patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).