public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: btrtl: fix rtl_dump.fw_version for firmware v2
@ 2025-08-14  2:55 Jiajia Liu
  2025-08-14  3:26 ` bluez.test.bot
  2025-08-14  6:12 ` [PATCH] " Paul Menzel
  0 siblings, 2 replies; 3+ messages in thread
From: Jiajia Liu @ 2025-08-14  2:55 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz
  Cc: linux-bluetooth, linux-kernel, Jiajia Liu

rtl_dump.fw_version is not set for firmware v2. Since
rtl_epatch_header_v2.fw_version seems to be different with the
release version, set it to the fw version read after downloading
firmware.

Signed-off-by: Jiajia Liu <liujiajia@kylinos.cn>
---
 drivers/bluetooth/btrtl.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
index 6abd962502e3..6ad3ba7901e9 100644
--- a/drivers/bluetooth/btrtl.c
+++ b/drivers/bluetooth/btrtl.c
@@ -822,6 +822,7 @@ static int rtl_download_firmware(struct hci_dev *hdev,
 	int j = 0;
 	struct sk_buff *skb;
 	struct hci_rp_read_local_version *rp;
+	struct btrealtek_data *coredump_info = hci_get_priv(hdev);
 
 	dl_cmd = kmalloc(sizeof(*dl_cmd), GFP_KERNEL);
 	if (!dl_cmd)
@@ -873,6 +874,9 @@ static int rtl_download_firmware(struct hci_dev *hdev,
 	rp = (struct hci_rp_read_local_version *)skb->data;
 	rtl_dev_info(hdev, "fw version 0x%04x%04x",
 		     __le16_to_cpu(rp->hci_rev), __le16_to_cpu(rp->lmp_subver));
+	if (coredump_info->rtl_dump.fw_version == 0)
+		coredump_info->rtl_dump.fw_version =
+			__le16_to_cpu(rp->hci_rev) << 16 | __le16_to_cpu(rp->lmp_subver);
 	kfree_skb(skb);
 
 out:
-- 
2.50.1


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

* RE: Bluetooth: btrtl: fix rtl_dump.fw_version for firmware v2
  2025-08-14  2:55 [PATCH] Bluetooth: btrtl: fix rtl_dump.fw_version for firmware v2 Jiajia Liu
@ 2025-08-14  3:26 ` bluez.test.bot
  2025-08-14  6:12 ` [PATCH] " Paul Menzel
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2025-08-14  3:26 UTC (permalink / raw)
  To: linux-bluetooth, liujiajia

[-- Attachment #1: Type: text/plain, Size: 2455 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=991280

---Test result---

Test Summary:
CheckPatch                    PENDING   0.31 seconds
GitLint                       PENDING   0.25 seconds
SubjectPrefix                 PASS      0.09 seconds
BuildKernel                   PASS      23.71 seconds
CheckAllWarning               PASS      26.02 seconds
CheckSparse                   PASS      29.35 seconds
BuildKernel32                 PASS      23.70 seconds
TestRunnerSetup               PASS      468.21 seconds
TestRunner_l2cap-tester       PASS      24.54 seconds
TestRunner_iso-tester         PASS      36.30 seconds
TestRunner_bnep-tester        PASS      5.85 seconds
TestRunner_mgmt-tester        FAIL      127.16 seconds
TestRunner_rfcomm-tester      PASS      9.21 seconds
TestRunner_sco-tester         PASS      14.66 seconds
TestRunner_ioctl-tester       PASS      9.76 seconds
TestRunner_mesh-tester        FAIL      11.40 seconds
TestRunner_smp-tester         PASS      8.44 seconds
TestRunner_userchan-tester    PASS      6.12 seconds
IncrementalBuild              PENDING   0.45 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 490, Passed: 483 (98.6%), Failed: 3, Not Run: 4

Failed Test Cases
Add Ext Advertising - Success 22 (LE -> off, Remove) Failed       0.134 seconds
Set Device ID - Power off and Power on               Failed       0.124 seconds
Set Device ID - SSP off and Power on                 Failed       0.122 seconds
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner
Output:
Total: 10, Passed: 8 (80.0%), Failed: 2, Not Run: 0

Failed Test Cases
Mesh - Send cancel - 1                               Timed out    2.227 seconds
Mesh - Send cancel - 2                               Timed out    1.998 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] Bluetooth: btrtl: fix rtl_dump.fw_version for firmware v2
  2025-08-14  2:55 [PATCH] Bluetooth: btrtl: fix rtl_dump.fw_version for firmware v2 Jiajia Liu
  2025-08-14  3:26 ` bluez.test.bot
@ 2025-08-14  6:12 ` Paul Menzel
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Menzel @ 2025-08-14  6:12 UTC (permalink / raw)
  To: Jiajia Liu
  Cc: Marcel Holtmann, Luiz Augusto von Dentz, linux-bluetooth,
	linux-kernel, Alex Lu, Hilda Wu

[Cc: +Alex, +Hilda]

Dear Jiajia,


Thank you for the patch.

Am 14.08.25 um 04:55 schrieb Jiajia Liu:
> rtl_dump.fw_version is not set for firmware v2. Since
> rtl_epatch_header_v2.fw_version seems to be different with the
> release version, set it to the fw version read after downloading
> firmware.

What is the released version, and what value does it have?

Please add, how your patch can be tested.

> Signed-off-by: Jiajia Liu <liujiajia@kylinos.cn>
> ---
>   drivers/bluetooth/btrtl.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
> index 6abd962502e3..6ad3ba7901e9 100644
> --- a/drivers/bluetooth/btrtl.c
> +++ b/drivers/bluetooth/btrtl.c
> @@ -822,6 +822,7 @@ static int rtl_download_firmware(struct hci_dev *hdev,
>   	int j = 0;
>   	struct sk_buff *skb;
>   	struct hci_rp_read_local_version *rp;
> +	struct btrealtek_data *coredump_info = hci_get_priv(hdev);
>   
>   	dl_cmd = kmalloc(sizeof(*dl_cmd), GFP_KERNEL);
>   	if (!dl_cmd)
> @@ -873,6 +874,9 @@ static int rtl_download_firmware(struct hci_dev *hdev,
>   	rp = (struct hci_rp_read_local_version *)skb->data;
>   	rtl_dev_info(hdev, "fw version 0x%04x%04x",
>   		     __le16_to_cpu(rp->hci_rev), __le16_to_cpu(rp->lmp_subver));
> +	if (coredump_info->rtl_dump.fw_version == 0)
> +		coredump_info->rtl_dump.fw_version =
> +			__le16_to_cpu(rp->hci_rev) << 16 | __le16_to_cpu(rp->lmp_subver);
>   	kfree_skb(skb);
>   
>   out:


Kind regards,

Paul

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

end of thread, other threads:[~2025-08-14  6:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-14  2:55 [PATCH] Bluetooth: btrtl: fix rtl_dump.fw_version for firmware v2 Jiajia Liu
2025-08-14  3:26 ` bluez.test.bot
2025-08-14  6:12 ` [PATCH] " Paul Menzel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox