Bluetooth: btintel: Define a macro for Intel Reset vendor command
PATCH 1/1 Bluetooth: btintel: Define a macro for Intel Reset vendor command
Use macro for Intel Reset command (0xfc01) instead of hard coded value.
--- drivers/bluetooth/btintel.c | 4 ++-- drivers/bluetooth/btintel.h | 2 ++ drivers/bluetooth/btintel_pcie.c | 12 ++++++------ drivers/bluetooth/btusb.c | 8 ++++---- drivers/bluetooth/hci_intel.c | 10 +++++----- 5 files changed, 19 insertions(+), 17 deletions(-)
drivers/bluetooth/btintel.c +2 -2
@@ -889,7 +889,7 @@ int btintel_send_intel_reset(struct hci_dev *hdev, u32 boot_param) params.boot_param =cpu_to_le32 (boot_param); - skb =__hci_cmd_sync (hdev,0xfc01 ,sizeof (params), ¶ms, + skb =__hci_cmd_sync (hdev,BTINTEL_HCI_OP_RESET ,sizeof (params), ¶ms,HCI_INIT_TIMEOUT );if (IS_ERR (skb)) {bt_dev_err (hdev,"Failed to send Intel Reset command" );
@@ -1287,7 +1287,7 @@ static void btintel_reset_to_bootloader(struct hci_dev *hdev) params.boot_option =0x00 ; params.boot_param =cpu_to_le32 (0x00000000 ); - skb =__hci_cmd_sync (hdev,0xfc01 ,sizeof (params), + skb =__hci_cmd_sync (hdev,BTINTEL_HCI_OP_RESET ,sizeof (params), ¶ms,HCI_INIT_TIMEOUT );if (IS_ERR (skb)) { bt_dev_err(hdev, "FW download error recovery failed (%ld)",
drivers/bluetooth/btintel.h +2 -0
@@ -52,6 +52,8 @@ struct intel_tlv {u8 val[]; } __packed; +#define BTINTEL_HCI_OP_RESET 0xfc01 +#define BTINTEL_CNVI_BLAZARI 0x900#define BTINTEL_CNVI_BLAZARIW 0x901#define BTINTEL_CNVI_GAP 0x910
drivers/bluetooth/btintel_pcie.c +6 -6
@@ -1977,12 +1977,12 @@ static int btintel_pcie_send_frame(struct hci_dev *hdev,struct hci_command_hdr *cmd = (void *)skb->data;__u16 opcode =le16_to_cpu (cmd->opcode); -/* When the 0xfc01 command is issued to boot into -* the operational firmware, it will actually not -* send a command complete event. To keep the flow +/* When the BTINTEL_HCI_OP_RESET command is issued to +* boot into the operational firmware, it will actually +* not send a command complete event. To keep the flow * control working inject that event here. */ -if (opcode ==0xfc01 ) +if (opcode ==BTINTEL_HCI_OP_RESET )btintel_pcie_inject_cmd_complete (hdev, opcode); }/* Firmware raises alive interrupt on HCI_OP_RESET */
@@ -2017,10 +2017,10 @@ static int btintel_pcie_send_frame(struct hci_dev *hdev, }if (type ==BTINTEL_PCIE_HCI_CMD_PKT && - (opcode ==HCI_OP_RESET || opcode ==0xfc01 )) { + (opcode ==HCI_OP_RESET || opcode ==BTINTEL_HCI_OP_RESET )) { old_ctxt = data->alive_intr_ctxt; data->alive_intr_ctxt = - (opcode ==0xfc01 ?BTINTEL_PCIE_INTEL_HCI_RESET1 : + (opcode ==BTINTEL_HCI_OP_RESET ?BTINTEL_PCIE_INTEL_HCI_RESET1 :BTINTEL_PCIE_HCI_RESET ); bt_dev_dbg(data->hdev, "sent cmd: 0x%4.4x alive context changed: %s -> %s", opcode, btintel_pcie_alivectxt_state2str(old_ctxt),
drivers/bluetooth/btusb.c +4 -4
@@ -2605,12 +2605,12 @@ static int btusb_send_frame_intel(struct hci_dev *hdev, struct sk_buff *skb)else urb =alloc_ctrl_urb (hdev, skb); -/* When the 0xfc01 command is issued to boot into -* the operational firmware, it will actually not -* send a command complete event. To keep the flow +/* When the BTINTEL_HCI_OP_RESET command is issued to +* boot into the operational firmware, it will actually +* not send a command complete event. To keep the flow * control working inject that event here. */ -if (opcode ==0xfc01 ) +if (opcode ==BTINTEL_HCI_OP_RESET )inject_cmd_complete (hdev, opcode); }else { urb =alloc_ctrl_urb (hdev, skb);
drivers/bluetooth/hci_intel.c +5 -5
@@ -1029,12 +1029,12 @@ static struct sk_buff *intel_dequeue(struct hci_uart *hu)struct hci_command_hdr *cmd = (void *)skb->data;__u16 opcode =le16_to_cpu (cmd->opcode); -/* When the 0xfc01 command is issued to boot into -* the operational firmware, it will actually not -* send a command complete event. To keep the flow -* control working inject that event here. +/* When the BTINTEL_HCI_OP_RESET command is issued to boot into +* the operational firmware, it will actually not send a command +* complete event. To keep the flow control working inject that +* event here. */ -if (opcode ==0xfc01 ) +if (opcode ==BTINTEL_HCI_OP_RESET )inject_cmd_complete (hu->hdev, opcode); }
Signature · 1 line
2.43.0
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=981453
---Test result---
Test Summary:
CheckPatch PENDING 0.41 seconds GitLint PENDING 0.25 seconds SubjectPrefix PASS 0.08 seconds BuildKernel PASS 24.12 seconds CheckAllWarning PASS 26.94 seconds CheckSparse PASS 29.95 seconds BuildKernel32 PASS 24.25 seconds TestRunnerSetup PASS 470.33 seconds TestRunner_l2cap-tester PASS 25.32 seconds TestRunner_iso-tester PASS 35.94 seconds TestRunner_bnep-tester PASS 6.01 seconds TestRunner_mgmt-tester FAIL 130.21 seconds TestRunner_rfcomm-tester PASS 9.24 seconds TestRunner_sco-tester PASS 16.71 seconds TestRunner_ioctl-tester PASS 9.93 seconds TestRunner_mesh-tester FAIL 11.46 seconds TestRunner_smp-tester PASS 8.56 seconds TestRunner_userchan-tester PASS 6.18 seconds IncrementalBuild PENDING 0.64 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: 484 (98.8%), Failed: 2, Not Run: 4
Failed Test Cases
LL Privacy - Add Device 3 (AL is full) Failed 0.225 seconds LL Privacy - Set Flags 3 (2 Devices to RL) Failed 0.201 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.156 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
This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:
Quoted 10 lines · On Fri, 11 Jul 2025 15:37:25 +0530 you wrote:
Use macro for Intel Reset command (
0xfc01) instead of hard coded value.Signed-off-by Kiran K <[email protected]>--- drivers/bluetooth/btintel.c | 4 ++-- drivers/bluetooth/btintel.h | 2 ++ drivers/bluetooth/btintel_pcie.c | 12 ++++++------ drivers/bluetooth/btusb.c | 8 ++++---- drivers/bluetooth/hci_intel.c | 10 +++++----- 5 files changed, 19 insertions(+), 17 deletions(-)
Here is the summary with links:
- [v1] Bluetooth: btintel: Define a macro for Intel Reset vendor command
https://git.kernel.org/bluetooth/bluetooth-next/c/5578eec92cbb
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html